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

Support link underline preference #3720

Merged
merged 21 commits into from
Oct 7, 2023
Merged

Support link underline preference #3720

merged 21 commits into from
Oct 7, 2023

Conversation

mperrotti
Copy link
Contributor

@mperrotti mperrotti commented Sep 7, 2023

This was initiated by our need for underlined links in blocks of text, and supports dotcom's new user setting to render links with underlines. The link underline setting is currently being tested on dotcom behind a feature flag.

A new setting has been added to the Storybook toolbar that allows us to preview what a component would look like when the user has specified that they prefer link underlines.

Closes https://github.com/github/primer/issues/2536

Screenshots

User who turned link underlines on in their GitHub settings

Screenshot 2023-09-14 at 5 45 07 PM

Additional context about link underline settings

Issue: https://github.com/github/releases/issues/3340
Dotcom PR: https://github.com/github/github/pull/278701

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Changes are SSR compatible
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@mperrotti mperrotti requested review from a team and joshblack September 7, 2023 17:45
@changeset-bot
Copy link

changeset-bot bot commented Sep 7, 2023

🦋 Changeset detected

Latest commit: 90d5f19

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

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

Uh oh! @mperrotti, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@mperrotti mperrotti temporarily deployed to github-pages September 7, 2023 17:52 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3720 September 7, 2023 17:52 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3720 September 7, 2023 17:52 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3720 September 7, 2023 17:57 Inactive
@mperrotti
Copy link
Contributor Author

There are cases where we want links in a single like of text to be underlined. Converting this to a draft until I update this PR to address those cases.

Examples:
CleanShot 2023-09-08 at 16 00 14@2x
CleanShot 2023-09-08 at 16 01 01@2x
Screenshot 2023-09-08 at 10 05 19 AM

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

Uh oh! @mperrotti, the image you shared is missing helpful alt text. Check #3720 (comment).

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@mperrotti mperrotti marked this pull request as draft September 8, 2023 14:05
@mperrotti mperrotti temporarily deployed to github-pages September 8, 2023 14:13 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3720 September 8, 2023 14:13 Inactive
@mperrotti
Copy link
Contributor Author

Just ignore this PR until I mark it as "Ready for review".

We have more changes to make after talking with @ericwbailey about the feature-flagged user preferences for link underlines.

@mperrotti mperrotti temporarily deployed to github-pages September 13, 2023 00:01 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3720 September 13, 2023 00:02 Inactive
@github-actions
Copy link
Contributor

Uh oh! @mperrotti, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@mperrotti mperrotti changed the title Adds Prose component to support styling within text blocks Support link underline preference and add Prose component for blocks of text Sep 14, 2023
@github-actions
Copy link
Contributor

Uh oh! @mperrotti, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@@ -0,0 +1,159 @@
import React from 'react'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm questioning whether PRC even needs this component. It's very rare that we need to render a large block of prose in the apps that use Primer.

Reviewers - do you think we should add a Prose component?

Copy link
Member

Choose a reason for hiding this comment

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

@mperrotti I'd be down to ship with the underline changes that you have with the custom property stuff and then see if we still need something like this in the future 👀 Like you said, it seems like underline behavior is more of a one-off thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @joshblack - I totally missed your comment last week. I'll take out the Prose stuff.

@mperrotti mperrotti marked this pull request as ready for review September 14, 2023 21:54
@primer primer bot temporarily deployed to github-pages October 5, 2023 15:59 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3720 October 5, 2023 16:00 Inactive
@mperrotti mperrotti temporarily deployed to github-pages October 5, 2023 16:06 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3720 October 5, 2023 16:06 Inactive
@mperrotti mperrotti temporarily deployed to github-pages October 6, 2023 15:51 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3720 October 6, 2023 15:52 Inactive
@mperrotti mperrotti enabled auto-merge October 7, 2023 00:34
@mperrotti mperrotti requested a review from joshblack October 7, 2023 00:44
@mperrotti mperrotti added this pull request to the merge queue Oct 7, 2023
Merged via the queue into main with commit 521b02f Oct 7, 2023
@mperrotti mperrotti deleted the mp/prose-component branch October 7, 2023 00:54
This was referenced Oct 7, 2023
joshblack added a commit that referenced this pull request Oct 17, 2023
github-merge-queue bot pushed a commit that referenced this pull request Oct 18, 2023
* Revert "Support link underline preference (#3720)"

This reverts commit 521b02f.

* chore: add changeset

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
joshblack added a commit that referenced this pull request Oct 20, 2023
* adds Prose component and stories

* adds tests and makes some minor changes

* Create happy-rivers-attend.md

* handle link underline preferences

* adds visual regression testing

* fixes storybook ID in Prose docs data

* updates changeset with changed components data

* rm Prose component

* test(vrt): update snapshots

* test(e2e): separate storybook global args by semicolon instead of ampersand

* test(vrt): update snapshots

* update snapshots

---------

Co-authored-by: joshblack <joshblack@users.noreply.github.com>
@joshblack joshblack mentioned this pull request Oct 20, 2023
7 tasks
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.

2 participants