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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Link] underlined by default and add removeUnderline prop #3705

Merged
merged 3 commits into from Jan 20, 2021

Conversation

ashwinnarayanan2001
Copy link
Contributor

WHY are these changes introduced?

These changes are introduced after discussions regarding if the link component should be underline by default (#3697), and if color alone is able to convey controls (https://github.com/Shopify/polaris-ux/issues/455). It was determined that making the link component underline by default makes the component more accessible when color is the only way to convey a link is interactive. It was also determined that it would be easier to add a 'removeUnderline' prop if the underline was not required, as opposed to adding an underline prop every time.

Fixes Shopify/polaris-ux#455

WHAT is this pull request doing?

This pull request makes the link component underline by default, and adds a 'removeUnderline' prop that removes the underline on the link.

This screenshot shows the Link component, which is underline by default.
Screen Shot 2020-12-11 at 10 35 33 AM

This screenshot shows the Link component when the removeUnderline prop is added.
Screen Shot 2020-12-11 at 10 34 47 AM

How to 馃帺

馃枼 Local development instructions
馃棐 General tophatting guidelines
馃搫 Changelog guidelines

Copy-paste this code in playground/Playground.tsx:
import React from 'react';

import {Page, Link} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <Link url="https://help.shopify.com/manual">Link default</Link>
    </Page>
  );
}
import React from 'react';

import {Page, Link} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <Link url="https://help.shopify.com/manual" removeUnderline>
        No underline
      </Link>
    </Page>
  );
}

馃帺 checklist

  • Tested on mobile
  • Tested on multiple browsers
  • Tested for accessibility
  • Updated the component's README.md with documentation changes
  • Tophatted documentation changes in the style guide
  • For visual design changes, pinged one of @鈥奌YPD, @鈥妋irualves, @鈥妔arahill, or @鈥妑y5n to update the Polaris UI kit

@github-actions
Copy link
Contributor

github-actions bot commented Dec 11, 2020

馃煛 This pull request modifies 6 files and might impact 5 other files. This is an average splash zone for a change, remember to tophat areas that could be affected.

Details:
All files potentially affected (total: 5)
馃搫 UNRELEASED.md (total: 0)

Files potentially affected (total: 0)

馃搫 src/components/DataTable/README.md (total: 0)

Files potentially affected (total: 0)

馃帹 src/components/Link/Link.scss (total: 5)

Files potentially affected (total: 5)

馃З src/components/Link/Link.tsx (total: 4)

Files potentially affected (total: 4)

馃搫 src/components/Link/README.md (total: 0)

Files potentially affected (total: 0)

馃З src/components/Link/tests/Link.test.tsx (total: 0)

Files potentially affected (total: 0)

@ashwinnarayanan2001 ashwinnarayanan2001 changed the base branch from master to v6.0.0 December 11, 2020 20:12
@kyledurand kyledurand mentioned this pull request Dec 11, 2020
6 tasks
@alex-page alex-page changed the base branch from v6.0.0 to version-6.0.0 December 14, 2020 20:35
UNRELEASED.md Outdated Show resolved Hide resolved
@alex-page alex-page force-pushed the link-default-underline branch 2 times, most recently from f41c8f9 to 663fb37 Compare January 20, 2021 04:50
@Shopify Shopify deleted a comment from kyledurand Jan 20, 2021
@alex-page alex-page self-requested a review January 20, 2021 04:51
@alex-page alex-page changed the title [Link] Make link component underline by default and add removeUnderline prop [Link] underlined by default and add removeUnderline prop Jan 20, 2021
Copy link
Member

@alex-page alex-page left a comment

Choose a reason for hiding this comment

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

This is in a good starting place, happy to finesse the content in iterations.

Co-authored-by: Ashwin Narayanan <ashwin.narayanan@shopify.com>
@alex-page alex-page merged commit c44558b into version-6.0.0 Jan 20, 2021
@alex-page alex-page deleted the link-default-underline branch January 20, 2021 19:22
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.

None yet

2 participants