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

RelativeTime: Remove title from Storybook stories #5685

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

TylerJDev
Copy link
Contributor

@TylerJDev TylerJDev commented Feb 10, 2025

Context https://github.com/github/accessibility-audits/issues/10169

Adds new stories:

Question for reviewers: Should we add any other stories to showcase usage of RelativeTime without title?

Changelog

New

  • Adds story to show off RelativeTime without title

Changed

  • Add noTitle to RelativeTime stories

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

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Feb 10, 2025

⚠️ No Changeset found

Latest commit: f8b6bc9

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

Copy link
Contributor

size-limit report 📦

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

Copy link
Contributor

@khiga8 khiga8 left a comment

Choose a reason for hiding this comment

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

Looks good to me! It's cool that the relative-time already had the noTitle prop!

I think it's worth documenting the existence of the noTitle prop somewhere (whether the story or the docs).

@kendallgassner
Copy link
Contributor

Is there ever a time we would want a title? Why don't we hard code no-title=true in the component?

@TylerJDev
Copy link
Contributor Author

TylerJDev commented Feb 11, 2025

Thank you @khiga8!

I think it's worth documenting the existence of the noTitle prop somewhere (whether the story or the docs).

I see we have noTitle in our props table, should we add it elsewhere? 🤔

@TylerJDev
Copy link
Contributor Author

Is there ever a time we would want a title? Why don't we hard code no-title=true in the component?

To be honest, not really. The goal is to eventually deprecate the prop and make not having a title the default, regardless of the prop. The only reason why I'm not doing this just yet is because I'm not entirely sure how often it's being used by users today. I'm hoping that by adding a lint rule, we can steer teams to more accessible patterns before removing it completely.

@kendallgassner
Copy link
Contributor

The only reason why I'm not doing this just yet is because I'm not entirely sure how often it's being used by users today. I'm hoping that by adding a lint rule, we can steer teams to more accessible patterns before removing it completely.

Can Primer Query only query github repos? Or can we use it to query for this across GitHub

@TylerJDev
Copy link
Contributor Author

Can Primer Query only query github repos? Or can we use it to query for this across GitHub

Yeah! It seems like we use the title on all instances that exist in Dotcom 😭

@kendallgassner
Copy link
Contributor

Seems like a quick win could be adding noTitle to all use cases though!

@TylerJDev
Copy link
Contributor Author

Seems like a quick win could be adding noTitle to all use cases though!

I agree! Will have a follow-up PR that will add noTitle={true} to the component by default.

@TylerJDev TylerJDev added this pull request to the merge queue Feb 13, 2025
Merged via the queue into main with commit 9318734 Feb 13, 2025
53 of 54 checks passed
@TylerJDev TylerJDev deleted the tylerjdev/remove-relative-time-element-title branch February 13, 2025 17:38
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.

4 participants