-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add experimental ResponsiveBlockControl component
#16790
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
23807cf
Basic component skeleton
getdave 95bfae8
Adds component demo to Group Block
getdave dd64a53
Make toggle control label dynamic and translatable
getdave 8116762
Adds styles
getdave 4ca0fc5
Automatically render responsive controls based on default control
getdave fe7c77d
Wrap each field group in a `fieldset` element
getdave e051305
Invert toggle and language to be on by default.
getdave 9c6e8b2
Adds initial tests
getdave f2d1bfc
Update tests to resemble how a user interacts with Component
getdave aa1ec5f
Add toggle state test
getdave eb5e9ba
Update to switch toggle to preceed controls
getdave bec9001
Update individual control labels to fully describe control for a11y
getdave 1907640
Fixes form ui to improve alignment
getdave 17eec18
Improves i18n of generated control label
getdave c9c5e08
Improve a11y by leaving DOM intact between state changes.
getdave eb9c5f3
Adds aria description to toggle control for improved a11y context
getdave 238d541
Update tests
getdave 1af87b9
Update toggle of responsive controls internal to the component
getdave 51b43a6
Adds test for responsiveControlsActive setting prop
getdave 20a95b4
Add tests to cover custom labels and custom device sets
getdave a64c2cd
Fix to only build default repsonsive controls when necessary
getdave 9926612
Adds tests to cover rendering of custom responsive controls
getdave d210cfe
Update to make label component part of component’s internal API
getdave b81e605
Adds callback prop to fire when responsive mode state changes
getdave 8605087
Update to utilise withInstanceId HOC
getdave 3ac118d
Removes unused export
getdave 045dd49
Mark as “experimental”
getdave b5bfc06
Remove non exposed component API doc
getdave 5c9841c
Extracts label to be a dedicated component
getdave b2bea8c
Updates to completely switch out DOM when responsive mode is toggled
getdave 827bb82
Update to useCallback to avoid expensive DOM re-renders
getdave 059b5a5
Updates i18n to provide better descriptions for translators
getdave ce3be6f
Updates devices list to contain unique non-translatable slug
getdave 195aef5
Ensure renderDefault controls render prop has access to device details
getdave e821dc9
Begin documentation
getdave 863783c
Rename “legend” prop to “title”
getdave 8ebbd2c
Fix incorrect usage of _x and replace with translator comments
getdave 64e719f
Update internal nomenclature from “device” to “viewport”
getdave e6aad72
Refactor to make component fully controlled
getdave 48529f7
Adds custom hook useResponsiveBlockControl
getdave d72e6af
Revert "Adds custom hook useResponsiveBlockControl"
getdave a46f406
Remove testing implementation in Group Block
getdave 15da1b3
Docs update
getdave File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adds aria description to toggle control for improved a11y context
- Loading branch information
commit eb9c5f3602d2e090a928232dddecd91784448443
There are no files selected for viewing
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.