-
Notifications
You must be signed in to change notification settings - Fork 76
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
refactor(combobox, combobox-item, combobox-group): getElementProp
is refactored out across child components as an outdated pattern in favor of inheritable props set directly on parent
#7562
Merged
Elijbet
merged 9 commits into
main
from
elijbet/6038-refactor-getElementProp-combobox-item
Aug 23, 2023
Merged
Conversation
This file contains 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
…refactored out across child components as an outdated pattern in favor of inheritable props set directly on parent
github-actions
bot
added
the
refactor
Issues tied to code that needs to be significantly reworked.
label
Aug 22, 2023
Elijbet
changed the title
refactor(combobox, combobox-item, combobox-group): getElementProp is refactored out across child components as an outdated pattern in favor of inheritable props set directly on parent
refactor(combobox, combobox-item, combobox-group): Aug 22, 2023
getElementProp
is refactored out across child components as an outdated pattern in favor of inheritable props set directly on parent
Elijbet
added
the
pr ready for visual snapshots
Adding this label will run visual snapshot testing.
label
Aug 22, 2023
driskull
approved these changes
Aug 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. 👏 LGTM!
Elijbet
added
pr ready for visual snapshots
Adding this label will run visual snapshot testing.
and removed
pr ready for visual snapshots
Adding this label will run visual snapshot testing.
labels
Aug 22, 2023
Elijbet
added
skip visual snapshots
Pull requests that do not need visual regression testing.
and removed
pr ready for visual snapshots
Adding this label will run visual snapshot testing.
labels
Aug 22, 2023
benelan
approved these changes
Aug 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
benelan
added a commit
that referenced
this pull request
Aug 24, 2023
…input * origin/main: (29 commits) chore: release next refactor(combobox-item): drop unused variable (#7587) fix(combobox): update combobox height to follow design spec (#7558) fix(split-button): update divider and borders to follow design spec (#7568) fix(segmented-control): refresh items when added dynamically (#7567) chore: release next feat(action-bar, action-pad, action-group): Add label properties for group context (#7415) test(modal, shell): add delay to recent unstable stories (#7589) chore: release next fix(modal): handle removal of open attribute and prevent multiple beforeClose calls (#7470) fix(tree-item): move focus outline to item label area (#7581) chore: add explainers to disabled jsx-sort-props on ref prop (#7584) fix(chip-group): Add existence checks (#7586) refactor(combobox, combobox-item, combobox-group): `getElementProp` is refactored out across child components as an outdated pattern in favor of inheritable props set directly on parent (#7562) build(deps): update dependency eslint-plugin-react to v7.33.2 (#7565) build(deps): update dependency quicktype-core to v23.0.71 (#7566) chore: release next fix(date-picker): set start of week to monday in zh-CN (#7578) chore: update translations (#7542) build: update browserslist db (#7554) ...
benelan
added a commit
that referenced
this pull request
Aug 24, 2023
…-failsafe * origin/main: (29 commits) chore: release next refactor(combobox-item): drop unused variable (#7587) fix(combobox): update combobox height to follow design spec (#7558) fix(split-button): update divider and borders to follow design spec (#7568) fix(segmented-control): refresh items when added dynamically (#7567) chore: release next feat(action-bar, action-pad, action-group): Add label properties for group context (#7415) test(modal, shell): add delay to recent unstable stories (#7589) chore: release next fix(modal): handle removal of open attribute and prevent multiple beforeClose calls (#7470) fix(tree-item): move focus outline to item label area (#7581) chore: add explainers to disabled jsx-sort-props on ref prop (#7584) fix(chip-group): Add existence checks (#7586) refactor(combobox, combobox-item, combobox-group): `getElementProp` is refactored out across child components as an outdated pattern in favor of inheritable props set directly on parent (#7562) build(deps): update dependency eslint-plugin-react to v7.33.2 (#7565) build(deps): update dependency quicktype-core to v23.0.71 (#7566) chore: release next fix(date-picker): set start of week to monday in zh-CN (#7578) chore: update translations (#7542) build: update browserslist db (#7554) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
refactor
Issues tied to code that needs to be significantly reworked.
skip visual snapshots
Pull requests that do not need visual regression testing.
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.
Related Issue: #6038
Summary
getElementProp
is refactored out across child components as an outdated pattern in favor of inheritable props set directly on the parent.Instead of the
combobox-item
andcombobox-group
looking up the parent for scale, these get set by the combobox parent.The logic for setting these props thus moves to the parent, getting rid of the
getElementProp altogether
. The parent component gets a mutation observer to do this as well as watchers for when it needs to modify the children.Inherited props addressed:
scale
selectionMode