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

fix(link): remove visited styles by default #5239

Merged
merged 2 commits into from
Feb 3, 2020

Conversation

tw15egan
Copy link
Collaborator

@tw15egan tw15egan commented Jan 31, 2020

Closes #3581

Removes :visited styles by default. If the link has a bx--link--visited class, it will receive visited styles once a link has been visited.

Not sure if bx--link--visited is the greatest name, since it will have that class before it is actually visited, so open to suggestions.

Changelog

New

  • bx--link--visited, which will add :visited styles once a link has been clicked
  • visited prop that will add the class that will allow visited styles when using React Link

Removed

  • Links will no longer receive :visited styles by default.

Testing / Reviewing

Click the first link, and see that it does not change to visited styles.
Click the second link, and see that it does receive visited styles.

@tw15egan tw15egan requested a review from a team as a code owner January 31, 2020 19:35
@ghost ghost requested review from dakahn and joshblack January 31, 2020 19:35
@tw15egan tw15egan requested review from a team and aagonzales and removed request for a team January 31, 2020 19:36
@netlify
Copy link

netlify bot commented Jan 31, 2020

Deploy preview for the-carbon-components ready!

Built with commit ee8ed54

https://deploy-preview-5239--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Jan 31, 2020

Deploy preview for carbon-elements ready!

Built with commit 91aed79

https://deploy-preview-5239--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Jan 31, 2020

Deploy preview for carbon-components-react ready!

Built with commit 91aed79

https://deploy-preview-5239--carbon-components-react.netlify.com

@joshblack
Copy link
Contributor

joshblack commented Jan 31, 2020

Quick question, do we know when links should have the visited style versus not? Or is it up to a product team versus a system decision

@tw15egan
Copy link
Collaborator Author

Quick question, do we know when links should have the visited style versus not? Or is it up to a product team versus a system decision

I believe we as a system want visited styles disabled but with the added functionality for a team to have visited links if they are required to have them.

@aagonzales
Copy link
Member

Most of the time in product links don't have a visited state because they aren't one time instances. They're intended for the user to visit anytime they need too. I actually don't really understand when you would use a visited state unless it was for learning material and you need to know what you've read already.

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

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

LGTM 👍 assuming making visited state optional is the design intent. Thanks @tw15egan!

@abbeyhrt
Copy link
Contributor

abbeyhrt commented Feb 3, 2020

Do we know why the visited link color change was added? It was added pretty recently, v10.7 or 10.6 I think and it never seemed like anybody on our side wanted it

@laurenmrice
Copy link
Member

I believe that was a v10 design language addition to add the purple visited link option.

@aagonzales
Copy link
Member

We added it for the website I think and somehow it became default in the component/

@abbeyhrt
Copy link
Contributor

abbeyhrt commented Feb 3, 2020

Isn't it overwritten in the website?

@mjabbink
Copy link

mjabbink commented Feb 3, 2020

Would love to see it go away in product for sure. The dot com team may have some research to back up keeping it in their world but not sure if they do. My hunch is it can be removed in dot com experiences as well.

@tw15egan tw15egan merged commit 3c6bff6 into carbon-design-system:master Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Link]: Inline option should be same color as text and underlined by default
9 participants