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 137 forks source link

UX review of Tearsheet and Create tearsheet #6194

Open oliviaflory opened 1 week ago

oliviaflory commented 1 week ago

To do:

RichKummer commented 6 days ago

Notes

RichKummer commented 5 days ago

Kenny chat 10/15/24

  1. Kenny's opinion is that tearsheet should go into the Core library as variant of modal, rather than its own separate component. If you take out all the Product-specific pieces of Tearsheet, it's essentially a type of modal, with some style changes such as being pinned to the bottom and transitioning up from the bottom of the screen.

    • We could add a transition variation to the existing modal for the animation.
    • Tearsheet would be a variant that acts as a container. Consider everything below the header as an open space to populate content (including the grid influencer). Product would then fill the canvas with the functionality needed.
      • Modal has its own header, similar to what Tearsheet has.
      • Tearsheet should inherit base functionality of modal.
  2. Tearsheet is too complex to move into core’s component library as-is. It should be simplified when brought to Core.

    • The only other component as complex in Core is data table.
  3. If the team sees internal components used in products library, then you should consider bringing to Core.

    1. Ex.) Status indicators

Elysia chat 10/15/24

  1. Should tearsheet also bring in its stepping functionality to the Core library? Teams would likely have to add this themselves for Tearsheet.
  2. The interstitial screen for Novice to Pro uses a modal, but has similar features to tearsheet: progress indicator, action footer. Should we consider porting the actions into modal as well?
RichKummer commented 4 days ago

Wide / Narrow comparison

Element Wide Narrow
Header
Label
Title
Description
AI label
Close
Header actions 🚫
Tabs ✅ (We show this in docs, but not Storybook)
Main structure
Main area (scrollable)
Footer actions / Navigation buttons ✅ (Recommend up to two buttons)
Influencers 🚫
Stacking

Doc review

Types of dialogues: tearsheet, modal, side panel

Influencer

Header

Image

Divider (create flow only)

Image

Other thoughts

RichKummer commented 3 days ago

Matt G Dev discussion 10/17/24

  1. Create flow comes with a divider → are team’s using this?
    1. The divider is outdated. The CreateTearsheet used to have a switch in the influencer to show all the steps at once. The divider would be used to separate out each step only when they were shown this way.
      1. The team removed it the switch, but haven’t removed the divider yet. The thinking was that you couldn’t show steps together if certain steps have validation.
      2. We can probably remove the divider styling/functionality from the code.
  2. Mentioned teams are looking for more composibility on button footer.
    1. Some team products use a large amount of steps: 40 steps for example. Some teams want a custom “Skip” button to move between steps.
    2. In CreateTearsheet, the buttons are out of their control. From a dev perspective, we should have the button footer as a slot which could have any button needed.
      1. Currently, we’re very prescriptive with the buttons that can go into CreateTearsheet.
  3. For the influencer, could adopters pass in a child influencer component?
    1. Tearsheet does this a little better than CreateTearsheet, with Tearsheet being closer what teams want. In that, the influencer has a prop that adopters can pass in what they want.
  4. Should we consider allowing for both stacking and stepping in base tearsheet?
    1. It would be nice to bring stepping into base tearsheet. Adopters can technically do it but they would have customize it. It would be nice to have a way to have tearsheet handle it from the base level.
    2. At the same time, it would be nice if the component didn’t handle the stepping logic internally. It would be easier for systems team if adopters could handle that
    3. Another idea: maybe some of what we have in CreateTearsheet could be added to Tearsheet.
  5. Are there other issues you’ve seen with Tearsheet?
    1. Focus handling with Tearsheet always has issues. I think it stems from the stacking functionality.
      1. If we port over the stacking functionality to Tearsheet, we need to clean up that code.
    2. Lee’s looked into using the browser dialogue for tearsheet. The stacking with that works more seamlessly because they’re dialogue elements.
      1. Lee’s PR is looking to change modal and tearsheet to using dialogue.
      2. We might benefit from treating it as a web dialogue but would need to look into it.
    3. A good portion of our tearsheet code is just for stacking.
  6. Are actions in the header for Tearsheet used frequently?
    1. We don’t hear a lot of questions with actions in the header. Maybe it doesn’t get used as much?
  7. In the header, we always force the description to be truncated at two lines.
    1. For the Wide variant this is fine, but in Narrow it doesn’t really make sense. Maybe the truncation rules are not on us, but rather the adopter teams themselves.
  8. The biggest portions of Tearsheet that need refactoring/rethinking:
    1. Stacking
    2. Slots for influencers and actions
    3. Focus handling

Image

RichKummer commented 3 days ago

Telemetry data (Dec 2023 → Oct 2024)

Component/Pattern Repos Metrics
Tearsheet 1,570 552,556
CreateTearsheet 1,871 10,609
CreateTearsheetStep 1,871 27,394

Image