Skip to content

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

Merged
merged 26 commits into from
Oct 31, 2024

Conversation

driskull
Copy link
Member

@driskull driskull commented May 21, 2024

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.

@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label May 21, 2024
@driskull driskull changed the title feat(flow, flow-item)!: add selected property to flow-item instead of removing them from the DOM feat(flow, flow-item)!: add selected property to flow-item instead of removing from DOM May 21, 2024
@driskull driskull changed the title feat(flow, flow-item)!: add selected property to flow-item instead of removing from DOM feat(flow, flow-item)!: avoids removing flow-items from the DOM and adds selected property instead May 21, 2024
@driskull driskull added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label May 22, 2024
@driskull driskull marked this pull request as ready for review May 22, 2024 17:25
@driskull driskull requested a review from a team as a code owner May 22, 2024 17:25
@driskull driskull changed the title feat(flow, flow-item)!: avoids removing flow-items from the DOM and adds selected property instead feat(flow, flow-item)!: avoids removing flow-items from the DOM and adds selected property May 22, 2024
driskull added 2 commits May 28, 2024 10:42
# Conflicts:
#	packages/calcite-components/src/components/flow-item/flow-item.stories.ts
#	packages/calcite-components/src/components/flow/flow.stories.ts
@benelan benelan changed the base branch from main to dev June 10, 2024 09:12
Copy link
Contributor

github-actions bot commented Jul 2, 2024

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.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Jul 2, 2024
# 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
@driskull driskull added the breaking change Issues and pull requests with code changes that are not backwards compatible. label Jul 20, 2024
@github-actions github-actions bot removed the Stale Issues or pull requests that have not had recent activity. label Jul 22, 2024
Copy link
Contributor

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.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Jul 29, 2024
@driskull driskull added this to the 2024-09-24 - Sep Main release milestone Aug 1, 2024
@github-actions github-actions bot removed the Stale Issues or pull requests that have not had recent activity. label Aug 2, 2024
# Conflicts:
#	packages/calcite-components/src/components.d.ts
Copy link
Contributor

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.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Sep 30, 2024
@driskull driskull marked this pull request as draft October 1, 2024 21:44
@github-actions github-actions bot removed the Stale Issues or pull requests that have not had recent activity. label Oct 4, 2024
Copy link
Contributor

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.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Oct 16, 2024
@driskull driskull marked this pull request as ready for review October 28, 2024 20:29
@driskull driskull requested a review from jcfranco October 28, 2024 20:29
@github-actions github-actions bot removed the Stale Issues or pull requests that have not had recent activity. label Oct 29, 2024
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.

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")) {
Copy link
Member

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?

@jcfranco
Copy link
Member

When you get a chance, could you help me update this custom flow-item codepen for future reference?

@driskull
Copy link
Member Author

@jcfranco here's an updated codepen: https://codepen.io/driskull/pen/gOVzLbx

@driskull driskull added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Oct 31, 2024
@driskull driskull 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 Oct 31, 2024
@driskull driskull merged commit c150492 into dev Oct 31, 2024
13 checks passed
@driskull driskull deleted the dris0000/flow-item-selected branch October 31, 2024 20:06
benelan pushed a commit that referenced this pull request Feb 8, 2025
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Issues and pull requests with code changes that are not backwards compatible. enhancement Issues tied to a new feature or request. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants