carbon-design-system / ibm-products

A Carbon-powered React component library for IBM Products
https://ibm-products.carbondesignsystem.com
Apache License 2.0
97 stars 138 forks source link

[Feature Request]: [CreateFullPage] Add support for 'onClick' for the progress bar #6030

Closed shocquu closed 5 days ago

shocquu commented 2 months ago

The problem

\ utilizes the Carbon Progress Indicator component but doesn't allow for state control or an onClick function. We need to allow users to freely move between steps.

The solution

Add an 'onClick' prop to CreateFullPage that triggers when the user clicks on a progress step.

Design link

No response

Links to other materials

Owner/main maintainer(s)

Lineage team ? idk

Second/backup maintainer(s)

No response

Product/offering

No response

Business priority

None

Code of Conduct

### Tasks
- [x] Expose `onClick` in each create step
- [x] Add tests for CreateFullPage and CreateTearsheet
kingtraceyj commented 1 month ago

We have seen this issue come up before with other teams. This would need an audit of how teams want to use this and then UX explorations for validation states. We will add this to our enhancement backlog for later prioritization.

oliviaflory commented 1 month ago

@shocquu thanks for opening a feature request! Can you provide a few more details?

  1. If the user can freely move between steps, are all the steps optional?
  2. Do you have a designs that we could see the user flow of information that would be included in the steps?

I ask because the progress indicator specifically states not to utilize a progress indicator "when the process may be completed in any order." We may be able to suggest a different way to achieve your goal

shocquu commented 1 month ago
  1. In our scenario, the user can only move in one direction but should be able to move back to completed steps by clicking on the step indicator. If the user is in edit mode, all steps have the status "complete" and should be clickable, unless not all requirements are met. We will handle this on our side by not providing the onClick handler or marking the step as disabled.
  2. Unfortunately, I am unable to share the design, but I can show a video demonstrating how we want it to work.

https://github.com/user-attachments/assets/3ad664f3-31a4-4aca-96dd-2222303580c5

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 7 days with no activity. Remove the stale label or add a comment, otherwise this issue will be closed in 7 days.

shocquu commented 1 month ago

Bump

elycheea commented 3 weeks ago

@devadula-nandan’s comments from refinement 🙂 :

i think we can expose onclick, and let the implementer handle the access with their own validations

shocquu commented 3 weeks ago

Great! 🙂 Alternatively, allowing us to pass a custom WizardProgress would work as well (similar to the influencer from the Carbon tearsheet). I also noticed that CreateFullPageStep accepts an onNext prop, but there’s no equivalent onPrevious. Would it be possible to expose that as well? We use it to track the current step. Thanks in advance!

makafsal commented 2 weeks ago

@shocquu I've exposed the onClick and the onPrevious in this PR. Currently, you cannot pass a custom Influencer like Tearsheet, CreateFullPage design does not support that.