Simplying EuiAccordion isLoading and isLoadingMessage logic#5896
Merged
1Copenut merged 6 commits intoelastic:mainfrom May 24, 2022
1Copenut:feature/tpierce-accordion-isLoadingUpdate
Merged
Simplying EuiAccordion isLoading and isLoadingMessage logic#58961Copenut merged 6 commits intoelastic:mainfrom 1Copenut:feature/tpierce-accordion-isLoadingUpdate
1Copenut merged 6 commits intoelastic:mainfrom
1Copenut:feature/tpierce-accordion-isLoadingUpdate
Conversation
* Simplifying isLoading logic to show the spinner. * Updating one snapshot test. * Adding last updates for screen reader, defaults, and TS types. * Updated four snapshot tests.
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5896/ |
Contributor
|
@1Copenut What's the potential breaking change here? I see the update in logic being more of a bug fix since it should never have been tied directly to the |
Contributor
Author
|
@cchaos The I felt like this new assumed default could cause issues upstream. |
Contributor
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5896/ |
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5896/ |
cee-chen
pushed a commit
to cee-chen/eui
that referenced
this pull request
May 26, 2022
…5896) * Simplying EuiAccordion isLoading and isLoadingMessage logic * Simplifying isLoading logic to show the spinner. * Updating one snapshot test. * Adding last updates for screen reader, defaults, and TS types. * Updated four snapshot tests. * WIP. Starting to refactor to show loading spinner without extra actions prop. * Refactored logic to show closed accordion spinner on isLoading. * Adding a changelog entry. * Update upcoming_changelogs/5896.md Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
@cchaos
requested a simplerrequested the loading spinner to show on closed accordions even if we do not have anisLoadingandisLoadingMessagelogic in our EuiAccordion component. The state handling has been simplified in this way:extraActiondefined. This PR captures that new logic.isLoadingorextraActionsprops are passed or are not true, the optionalActions DIV is not rendered.isLoadingto true, the loading spinner appears on the right of closed and open accordionsisLoadingto true,extraActionswill be hidden and the loading spinner shownisLoadingto false theextraActionswill be shownUPDATE: The more I look at this, we're not replacing anything, just modifying the logic for showing a spinner. I'm going to remove the
breaking changelabel unless reviewers think we need it. This PR is potentially a breaking change and closes #5893.This PR will be taken out of draft when #5826 is merged and can be folded into this code change.Checklist
Updated the Figma library counterpart