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

[Storybook] Update Storybook to move DialogV1 to deprecated #4758

Closed
wants to merge 2 commits into from

Conversation

tbenning
Copy link
Contributor

@tbenning tbenning commented Jul 19, 2024

Closes #
This is part of an ongoing deprecation path for DialogV1. I can't link the issue since my work computer is still on the fritz, but it's a part of the Streamline Primer initiative.

Problem/Solution
This a quick patch to help the Developer Experience and provide clarity since we keep getting questions in #primer slack support channels about which Dialog to use since they see 2 in Storybook. This should provide some immediate relief and clarity for the team as we continue to remediate V1 and V2. Ideally, we'd follow the deprecation guide here and move it to the deprecated folder and update all of the tests involved.

Note: I tried to start moving DialogV1 into the deprecation folder, etc. but started breaking a number of tests and need a bit of help to go down this path. Also curious if we have alignment to start the engineering portion of the deprecation cycle for DialogV1.

Changelog

Changed

Moved Components/DialogV1 -> Deprecated/Components/DialogV1

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

This is a brief docs update before we follow the full deprecation path.

Testing & Reviewing

Merge checklist

@tbenning tbenning requested a review from a team as a code owner July 19, 2024 16:18
@tbenning tbenning requested a review from jonrohan July 19, 2024 16:18
Copy link

changeset-bot bot commented Jul 19, 2024

⚠️ No Changeset found

Latest commit: 40b6002

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@tbenning tbenning added the skip changeset This change does not need a changelog label Jul 19, 2024
Copy link
Contributor

github-actions bot commented Jul 19, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 92.4 KB (0%)
packages/react/dist/browser.umd.js 92.72 KB (0%)

@github-actions github-actions bot temporarily deployed to storybook-preview-4758 July 19, 2024 16:22 Inactive
@tbenning tbenning closed this Jul 19, 2024
@tbenning tbenning reopened this Jul 19, 2024
Copy link
Member

@broccolinisoup broccolinisoup left a comment

Choose a reason for hiding this comment

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

Also curious if we have alignment to start the engineering portion of the deprecation cycle for DialogV1.

As far as I know we paused on the work for Dialog v2. Not sure exactly when it is going to be prioritised. That means, it might get a little tricky to deprecate this Dialog when we don't have a "Ready" Dialog component (Alpha or Beta).

I don't know if we want to go down the road to try something different for this. I'll tag @siddharthkp to see what he thinks.

@siddharthkp
Copy link
Member

siddharthkp commented Jul 22, 2024

I'll tag @siddharthkp to see what he thinks.

Thanks! It's a bit awkward because it's not deprecated deprecated. But, for the sake of clarity, we do need to recommend one Dialog over the other.

Dialog v2 is still in @primer/react/experimental, so we need to either
a) promote it to @primer/react/next in the next patch release and then @primer/react in the next major release
b) deprecate it as a "failed experiment" component

My gut reaction is to promote the new component, but I checked and neither of the Dialogs are reviewed for accessibility 😓
Given that we are not working on Dialog v2 right now and Dialog v1 has more usage, maybe it's not that obvious.

I would like (someone) to look into this a bit more from the view of design and accessibility and bless one of them, and then we can start the process of deprecating the other one 😇

@tbenning Maybe you already have?

@tbenning
Copy link
Contributor Author

tbenning commented Jul 22, 2024

@tbenning Maybe you already have?

So far whenever anyone has asked in Slack support channels, we have been recommending folks use Dialog over DialogV1. Though neither have been reviewed for accessibility, I'm curious if the newer one is the path forward and that we will review this one? Maybe folks in accessibility will have more context.

We can elevate this discussion with more folks in Primer, but this feels like a core decision we need to make since Dialog is an important and high usage component.

@TylerJDev
Copy link
Contributor

Though neither have been reviewed for accessibility, I'm curious if the newer one is the path forward and that we will review this one?

Is getting this component reviewed for accessibility the only thing that's blocking us from promoting Dialog v2? I tried looking for a tracking issue for Dialog v2 but couldn't find it. I think if this is the only thing that's blocking us, and there isn't any reason why we need to wait on getting it reviewed, we could potentially go about that process now 🤔

@siddharthkp
Copy link
Member

siddharthkp commented Jul 23, 2024

Is getting this component reviewed for accessibility the only thing that's blocking us from promoting Dialog v2?

That and the fact we haven't scheduled time for it yet. Accessibility remediations might be the push it needs

but this feels like a core decision we need to make since Dialog is an important and high usage component.

Yes! That's why I wanted to pick the version that has more usage, but it feels pretty spread out:

Dialog v1: 206 instances
Dialog v2: 123 instances (85 + 38)

So we can pick either v1 or v2 to remediate. (Assumption that needs validating: we would be able to remediate one of these in-place without breaking changes, instead of creating a new component Dialog v3 😭)

Another deciding factor can be design. Is the design of v2 more in line with our direction?

@jonrohan jonrohan removed their request for review July 23, 2024 16:54
@mperrotti
Copy link
Contributor

Another deciding factor can be design. Is the design of v2 more in line with our direction?

@siddharthkp - v2 is more in line with the design direction

@mperrotti
Copy link
Contributor

Since we're pushing people towards Dialog v2, I'm comfortable moving this to the "Deprecated" section of Storybook even though it's technically still in the main package.

I'd love to see us get Dialog v2 into the main package like @siddharthkp described

a) promote it to @primer/react/next in the next patch release and then @primer/react in the next major release

@@ -7,7 +7,7 @@ import {default as Dialog} from './Dialog'
/* Dialog Version 1*/

export default {
title: 'Components/DialogV1',
title: 'Deprecated/Components/DialogV1',
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're comfortable doing this for Dialog, I think it would be good to do the same for Tooltip. This was mentioned during today's Primer Patterns working session.

Copy link
Contributor Author

@tbenning tbenning Jul 23, 2024

Choose a reason for hiding this comment

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

Yup! I had drafted a PR for this and just flipped it to review

@tbenning
Copy link
Contributor Author

Quick update: I ran this past folks in Primer Patterns today and have support from the group for moving it to deprecated. This change feels low risk since the bulk of the risk will be once we start properly deprecating things, this just pre-empts that work.

@broccolinisoup
Copy link
Member

Quick update: I ran this past folks in Primer Patterns today and have support from the group for moving it to deprecated. This change feels low risk since the bulk of the risk will be once we start properly deprecating things, this just pre-empts that work.

Thanks for sharing that @tbenning! I understand we are looking into gradually doing that deprecation work but It is confusing to me to have a component in the Deprecated folder in Storybook but nothing else indicates its deprecation in the code or in the tools.

We have discussed about deprecation process before and there are a couple of other things that we think are useful in a deprecation process. For example the below items are suitable for this case.

  • Add the @deprecated notice, if possible, to the corresponding export or type
  • Add an eslint rule, or extend an existing one, in order to mark the change as deprecated
  • Update the documentation to reflect the deprecation.

Is there anything blocking us to do such things for Dialog? Especially the @deprecated notice and the docs changes - they are relatively quick changes as well.

@siddharthkp
Copy link
Member

siddharthkp commented Jul 25, 2024

I understand we are looking into gradually doing that deprecation work but It is confusing to me to have a component in the Deprecated folder in Storybook but nothing else indicates its deprecation in the code or in the tools.

+1 to that

Just wanted to add that it would be confusing to think you are importing the Dialog you see in storybook with import { Dialog } from @primer/react and actually get the deprecated Dialog. (because the new Dialog is in @primer/react/experimental)

This is a bit messy, so thanks @tbenning for starting work on this, otherwise it wouldn't get done 😓

@tbenning
Copy link
Contributor Author

tbenning commented Aug 9, 2024

I'm going to close this PR in the meantime, since we're now looking at component status and how we communicate different stages of deprecation. I will likely come back with a PR that has a banner warning about deprecation instead.

@tbenning tbenning closed this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants