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

feat(stepper): Use stepper in controlled or uncontrolled mode #2474

Merged

Conversation

Andreas-Tonnessen
Copy link
Contributor

Component Development

Improves usage of 'Stepper' component and gives better control of it since it can be used in a controlled or and uncontrolled way using new optional step props.

Type

  • Feature
  • Fix
  • Hotfix (should release ASAP)
  • Maintenance (deps only)

Reference to assignment

https://statoil-proview.visualstudio.com/Fusion%20-%20Farfetchd/_workitems/edit/60228

Description of assignment

Update the 'Stepper' component so that it can be used both in an uncontrolled and controlled mode.

Description of Proposed Changes

Remove required activeStepKey prop on the 'Stepper' component and replace it with optional stepKey (for controlled use) and optional initialStepKey (for uncontrolled initial step use) props.
This is a breaking change since activeStepKey is previously required and needs to either be removed or replaced with one of the optional step props.

Update README.md and Storybook of 'Stepper' component with new examples of usage.

Checklist

Create User Story(DevOps) or Issue(Github)

  • Describe functional requirements
  • Design plan/suggestion (e.g. images, link to eds design or relevant figma links, mention of eds tokens to use)
  • Communication with UX (evaluate if needed)

Development

  • Describe the component
  • Code funtional requirements
  • Create stories
  • Create snapshots (evaluate if needed)
  • Remove unused imports and commented code
  • Lint code with EsLint (and follow best practises for code quality

Create Pull Request

  • Assign relevant reviewers in Github and Cromatic
  • Inform colleagues of pending reviews. We use Teams for this purpose, under fusion-frontend team please tag involved reviewers in the Code review channel

Review of Pull Request

  • Follow up on comments from code review and implement necessary changes (evaluate if needed)
  • Review approved in github (and chromatic)

Publish Code

  • Increment version number
  • Merge PR
  • Consider letting fusion developers know this this shiny new thing exists

Copy link

changeset-bot bot commented Feb 20, 2025

🦋 Changeset detected

Latest commit: e8fc939

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@equinor/fusion-react-stepper Major
@equinor/fusion-react-components-stories Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Andreas-Tonnessen Andreas-Tonnessen marked this pull request as ready for review February 20, 2025 14:38
Noggling
Noggling previously approved these changes Feb 21, 2025
Copy link
Contributor

@Noggling Noggling left a comment

Choose a reason for hiding this comment

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

👌🍕

@odinr odinr force-pushed the feat/stepper/controlled-component branch from adb58ed to 0dbf436 Compare February 21, 2025 13:34
@eikeland eikeland requested a review from Noggling February 24, 2025 08:59
@eikeland eikeland force-pushed the feat/stepper/controlled-component branch from e420fb7 to e8fc939 Compare February 24, 2025 09:54
@eikeland eikeland merged commit eba9cf6 into equinor:main Feb 24, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants