-
Notifications
You must be signed in to change notification settings - Fork 80
feat(flow, flow-item)!: avoids removing flow-items from the DOM and adds selected property #9390
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
Conversation
… removing them from the DOM. #5072
# Conflicts: # packages/calcite-components/src/components/flow-item/flow-item.stories.ts # packages/calcite-components/src/components/flow/flow.stories.ts
# Conflicts: # packages/calcite-components/src/components/flow-item/flow-item.stories.ts
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
# Conflicts: # packages/calcite-components/src/components.d.ts # packages/calcite-components/src/components/flow-item/flow-item.stories.ts # packages/calcite-components/src/components/link/readme.md # packages/calcite-components/src/demos/flow.html
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
# Conflicts: # packages/calcite-components/src/components.d.ts
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
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.
Other than a couple of comments, this LGTM!
Can you move the BREAKING CHANGE
footer to the end of the description? It needs to be placed at the bottom to adhere to the conventional commits spec:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
This can be merged after the Oct milestone wraps up.
const allowRetreatingDirection = oldFlowItemCount > 1; | ||
const allowAdvancingDirection = oldFlowItemCount && newFlowItemCount > 1; | ||
resetFlowDirection = (): void => { | ||
if (this.el.hasAttribute("data-test-disable-animation-reset")) { |
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.
Can you add this under a Build.isTesting
block (see example) so that it doesn't get included in production builds?
When you get a chance, could you help me update this custom flow-item codepen for future reference? |
@jcfranco here's an updated codepen: https://codepen.io/driskull/pen/gOVzLbx |
…dds selected property (#9390) **Related Issue:** #5072 ## Summary - Add `selected` property to `calcite-flow-item`. - Sets the last `calcite-flow-item` as `selected` if no other is `selected. - Requires custom classes implementing `FlowItemLikeElement` to have a `selected` property - Cleans up animation by removing class after animation is complete - update tests - update demo and add placeholder image (the url is slow) - update stories BREAKING CHANGE: The new `selected` property on `calcite-flow-item` must be used to define which `calcite-flow-item` is shown.
Related Issue: #5072
Summary
selected
property tocalcite-flow-item
.calcite-flow-item
asselected
if no other is `selected.FlowItemLikeElement
to have aselected
propertyBREAKING CHANGE: The new
selected
property oncalcite-flow-item
must be used to define whichcalcite-flow-item
is shown.