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

[EuiAccordion] Split up rendering into sub-components & other cleanups #7161

Merged
merged 12 commits into from
Sep 8, 2023

Commits on Sep 6, 2023

  1. [REFACTOR] Split up accordion trigger into button & arrow sub-components

    - for easier dev readability and atomic styles
    
    + rename generic `iconButton` name to a more accurate `arrow` and remove className modifiers (use `[aria-expanded]` instead of `-isOpen`
    
    + inline some very minimal styles that don't require euiTheme or modifiers (trigger wrapper & optional action - action needs a label to trigger emotion snapshot serializer logic)
    cee-chen committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    a73bede View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5ca4269 View commit details
    Browse the repository at this point in the history
  3. [misc cleanup] EuiAccordion - reorder imports & props

    - order imports by specificity
    
    - order destrucuted props by approximate usage
    
    - remove unnecessary newlines
    cee-chen committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    255b5fb View commit details
    Browse the repository at this point in the history
  4. [REFACTOR] Split up accordion children into sub-components

    - allows us to use more succinct useEffect/useRefs
    
    + remove extra unnecessary div wrapper (not really sure what it was even doing)
    
    + remove extra loading styles in favor of a quick inline one-liner
    cee-chen committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    84d8479 View commit details
    Browse the repository at this point in the history
  5. [refactor] Switch to styles obj instead of modifying a DOM element di…

    …rectly
    
    - this feels more react-y and has the benefit of not requiring an extra useEffect on mount
    cee-chen committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    f7773f4 View commit details
    Browse the repository at this point in the history
  6. [refactor] Remove manual tabbable controls and use inert attribute …

    …instead
    
    - see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inert - this property completely does what we want and full browser support was added in early 2023
    
    - also allows us to remove `visibility` CSS which we were using to hide content from screen readers
    cee-chen committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    87f4faa View commit details
    Browse the repository at this point in the history
  7. [opinionated refactor] Clean up child wrapper styles

    - remove CSS overrides in favor of two separate states
    
    - add missing motion media query around height/opacity transition
    
    - remove complete focus removal in favor of `:focus-visible` selector and existing mixin
    cee-chen committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    8567a31 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a72aa94 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3e82e7e View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Configuration menu
    Copy the full SHA
    e195f62 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. [PR feedback] Reduce CSS overrides on arrow styles

    - add `left` and `right` CSS keys
    
    - add open/closed CSS keys while we're here
    
    - update snapshots
    cee-chen committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    dbcab02 View commit details
    Browse the repository at this point in the history
  2. 🤦 Fix incorrect CSS

    cee-chen committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    2d32730 View commit details
    Browse the repository at this point in the history