Feature: add a button to expand/collapse all operations #8932
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.
This PR addresses #7964 : the list of entries is usually long and a handy button to collapse them all can be useful, at the same time a button to expand them all (to use a browser search functionality for instance) can be useful as well.
Description
This PR adds a button to the main page. This button lives with its own state that represents the value of its flag. Once the button gets hit, the flag is toggled and the value is passed as a prop to the
<Operations>
child. This one uses the flag to trigger the visibility of all the<OperationTag>
accordingly. After that the components render lifecycle remains the same as before.Motivation and Context
Fixes #7964
How Has This Been Tested?
Manual test:
docExpansion
set tolist
Screenshots (if appropriate):
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests
Notes
docExpansion
config value: if the entries are expanded on loading because of the config parameter, the global button should start withCollapse All
, and the other way around that in other cases.