Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Emotion] Convert EuiFormRow #7968

Merged
merged 15 commits into from
Aug 19, 2024
Merged

[Emotion] Convert EuiFormRow #7968

merged 15 commits into from
Aug 19, 2024

Commits on Aug 15, 2024

  1. [tech debt] Convert EuiFormRow from a class to a function component

    + update unnecessary onFocus/onBlur child behavior - these events already bubble in React, so we just need to set them on a wrapper instead of cloning the children directly
    cee-chen committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    296d1c3 View commit details
    Browse the repository at this point in the history
  2. [tests tech debt] Convert Enzyme to RTL + update behavior tests to ac…

    …count for focus changes
    cee-chen committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    9323d7f View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2024

  1. Convert basic styles

    cee-chen committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    6e20d9a View commit details
    Browse the repository at this point in the history
  2. Convert basic differentiated styles between row and column layout

    + convert margins to flex gap instead
    cee-chen committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    a91903a View commit details
    Browse the repository at this point in the history
  3. Convert remaining row vs column styles

    - switch width to flex-basis so we don't need to use logical property
    
    - simplify line-height, it's more centered without the 1px
    
    - remove unnecessary display block unset and margin-bottom (nothing to unset)
    cee-chen committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    d726757 View commit details
    Browse the repository at this point in the history
  4. Convert center display styling

    - honestly not sure why this prop is even here but oh well!
    
    - use fancy JS getters since we're no longer setting `row` as the default CSS
    cee-chen committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    be845c5 View commit details
    Browse the repository at this point in the history
  5. Convert column switch-specific CSS

    - use CSS `:has` instead of a separate display prop (deprecate eventually)
    
    - simplify margin logic, I found the existing CSS harder to follow than
    
    - remove unnecessary duplicated CSS (width/min-width), simplify line-height
    cee-chen committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    019b3d1 View commit details
    Browse the repository at this point in the history
  6. Update docs to mark rowCompressed and columCompressedSwitch displ…

    …ay props as deprecated
    
    + remove them from docs examples
    cee-chen committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    9f95c6e View commit details
    Browse the repository at this point in the history
  7. Convert hasEmptyLabelSpace styles

    - replace margin with an EuiSpacer instead, so we can take advantage of the new gap CSS instead of having to add up to get 20px
    
    - use some trickery to duplicate existing `center` CSS (since this is essentially what the min-height/justify-content does - except doing it this way will allow it to work for column layouts as well)
    
    - remove padding-bottom, not doing anything
    
    - delete `.euiFormRow__fieldWrapperDisplayOnly` className while here, no usages in Kibana
    cee-chen committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    5a7f84a View commit details
    Browse the repository at this point in the history
  8. Delete Sass files

    cee-chen committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    f8b64fa View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    dfa9f10 View commit details
    Browse the repository at this point in the history
  10. Update downstream snapshots

    cee-chen committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    b0cb928 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. Configuration menu
    Copy the full SHA
    f2bb478 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    58f3255 View commit details
    Browse the repository at this point in the history
  3. [misc] fix prepend/append bug

    - wasn't introduced in this PR but in the previous EuiFormLayout one - might as well fix it while we're here
    cee-chen committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    82c1ca8 View commit details
    Browse the repository at this point in the history