-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Labels
4 - verifiedIssues that have been tested, confirmed as mitigated, and are ready to close.Issues that have been tested, confirmed as mitigated, and are ready to close.estimate - 8Requires input from team, consider smaller steps.Requires input from team, consider smaller steps.low riskIssues with low risk for consideration in low risk milestonesIssues with low risk for consideration in low risk milestonesp - mediumIssue is non core or affecting less that 60% of people using the libraryIssue is non core or affecting less that 60% of people using the libraryrefactorIssues tied to code that needs to be significantly reworked.Issues tied to code that needs to be significantly reworked.
Description
Description
Refactor getElementProp
across child components as an outdated pattern.
Parents should be setting props on the child if it’s a tightly coupled component pair. With this current pattern if the parent prop changes the child doesn't know about the changes to the parent.
For all relevant components props are passed down and children no longer look up for the prop. To achieve this the parent gets a mutation observer to modify children where necessary.
Proposed Advantages
- Bring consistency to child styling, where there is a tightly coupled component pair.
- Children are in sync with parent props.
- Independent components retain autonomy, eg. a large-scale modal with small-scale child components.
Which Component
All coupled components: where the child shares their parent’s name, like list/list-item, flow/flow-item, combobox/combobox-item
.
- accordion-item
-
iconType
-
iconPosition
-
scale
-
selectionMode
-
- combobox-item
-
scale
-
selectionMode
-
- combobox-item-group
-
scale
-
- dropdown-group
-
scale
-
- dropdown-item
-
scale
-
selectionMode
-
- segmented-control-item
-
scale
-
appearance
-
layout
-
- stepper-item
-
icon
-
numbered
-
layout
-
scale
-
- tab-title
-
position
-
scale
-
eriklharper and jcfranco
Metadata
Metadata
Assignees
Labels
4 - verifiedIssues that have been tested, confirmed as mitigated, and are ready to close.Issues that have been tested, confirmed as mitigated, and are ready to close.estimate - 8Requires input from team, consider smaller steps.Requires input from team, consider smaller steps.low riskIssues with low risk for consideration in low risk milestonesIssues with low risk for consideration in low risk milestonesp - mediumIssue is non core or affecting less that 60% of people using the libraryIssue is non core or affecting less that 60% of people using the libraryrefactorIssues tied to code that needs to be significantly reworked.Issues tied to code that needs to be significantly reworked.