Skip to content
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(stepper, stepper-item): getElementProp is refactored out in favor of inheritable props set directly on parent #7593

Merged
merged 27 commits into from
Aug 31, 2023

Conversation

Elijbet
Copy link
Contributor

@Elijbet Elijbet commented Aug 24, 2023

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 stepper-item looking up the parent for icon, layout, numbered, and scale, these get set by the stepper parent.

The logic for setting these props thus moves to the parent, getting rid of the getElementProp altogether. The parent component gets a mutationObserver to do this as well as watchers for when it needs to modify the children.

Inherited props addressed:

  • icon
  • layout
  • numbered
  • scale

… refactored out across child components as an outdated pattern in favor of inheritable props set directly on parent
…oss child components as an outdated pattern in favor of inheritable props set directly on parent
@Elijbet Elijbet added the refactor Issues tied to code that needs to be significantly reworked. label Aug 24, 2023
@Elijbet Elijbet changed the title Elijbet/6038 refactor get element prop stepper item refactor(stepper, stepper-item): getElementProp is refactored out across child components as an outdated pattern in favor of inheritable props set directly on parent Aug 24, 2023
@Elijbet Elijbet changed the title refactor(stepper, stepper-item): getElementProp is refactored out across child components as an outdated pattern in favor of inheritable props set directly on parent refactor(stepper, stepper-item): getElementProp is refactored out in favor of inheritable props set directly on parent Aug 24, 2023
Elijbet and others added 14 commits August 24, 2023 23:31
**Related Issue:** #7574

## Summary

- use dragAndDrop util for more tests.
**Related Issue:** None

## Summary

- catch error when beforeBack promise is rejected
**Related Issue:** #6381

## Summary

- catch error when beforeClose promise is rejected
**Related Issue:** #4738 

## Summary

Adds `single-persist` mode to `calcite-combobox` to allow users to
opt-in to this change in selection behavior (vs making it a breaking
change on the current `single` selection mode).

`clearDisabled` will behave the same way unless we want to make an
exception to this mode.
… for `selection-mode='ancestors'` (#7572)

**Related Issue:** #7291

## Summary

Updates state of `calcite-tree-item` when `selected` prop is changed
programmatically.
**Related Issue:** #4633 ,
#6642

## Summary

This PR will add focus outline for `calcite-rating` component on click.
@Elijbet Elijbet force-pushed the elijbet/6038-refactor-getElementProp-stepper-item branch from 274a60e to 501693b Compare August 30, 2023 17:59
@Elijbet Elijbet marked this pull request as ready for review August 30, 2023 23:21
@Elijbet Elijbet requested a review from a team as a code owner August 30, 2023 23:21
@Elijbet 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 30, 2023
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be good to merge after addressing all comments.

@Elijbet 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 31, 2023
@jcfranco jcfranco 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 31, 2023
@jcfranco jcfranco 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 31, 2023
@jcfranco jcfranco 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 31, 2023
@jcfranco jcfranco merged commit fc2c720 into main Aug 31, 2023
16 checks passed
@jcfranco jcfranco deleted the elijbet/6038-refactor-getElementProp-stepper-item branch August 31, 2023 20:43
@github-actions github-actions bot added this to the 2023 August Priorities milestone Aug 31, 2023
benelan added a commit that referenced this pull request Sep 1, 2023
* origin/main: (35 commits)
  ci: make sure to exit on maitenance milestone failure (#7656)
  chore: release next
  fix(block): provide textual name on collapse and expansion to AT (#7652)
  chore: release main (#7571)
  chore: release next
  fix(block, block-section): improve a11y (#7557)
  chore: release next
  fix: add drag styles for improved UX (#7644)
  fix(input, input-number): correctly sanitize numbers when pasting string with 'e' (#7648)
  chore: release next
  feat(flow): add support for custom flow-item elements (#7608)
  chore: release next
  fix(list, sortable-list, value-list): Emit calciteListOrderChange when dragging between lists (#7614)
  feat(input-number): add integer property (#7646)
  chore: release next
  fix(accordion, accordion-item): improve a11y (#7560)
  refactor(stepper, stepper-item): `getElementProp` is refactored out in favor of inheritable props set directly on parent (#7593)
  docs(contributing): update the commit message format example URL (#7641)
  chore: release next
  feat(input-date-picker): normalize year to current century for user typed values only (#7638)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr ready for visual snapshots Adding this label will run visual snapshot testing. refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants