Skip to content

Conversation

@sarahill
Copy link
Contributor

@sarahill sarahill commented Jul 5, 2022

WHY are these changes introduced?

Fixes #6413

  • Updates the documentation for Links on polaris.shopify.com
  • Removes the external link icon from the Link's external property

External link example
image

New guidance in best practices
image

WHAT is this pull request doing?

  • Removed external link icon and logic
  • Updated examples and descriptions for default and external links on polaris.shoify.com
  • Added best practices guidance for external links

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

Copy-paste this code in playground/Playground.tsx:
import React from 'react';
import {Page, FooterHelp, Link} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
        <FooterHelp>
            Learn more about <Link url="https://help.shopify.com/manual" external>orders</Link>
        </FooterHelp>
    </Page>
  );
}

🎩 checklist

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2022

size-limit report 📦

Path Size
polaris-react-cjs 199.16 KB (-0.08% 🔽)
polaris-react-esm 132.96 KB (-0.31% 🔽)
polaris-react-esnext 188.15 KB (-0.25% 🔽)
polaris-react-css 41.77 KB (-0.1% 🔽)

@sarahill sarahill added 🤖Skip Changelog Causes CI to ignore changelog update check. Feature request Documentation labels Jul 8, 2022
@alex-page alex-page force-pushed the main branch 7 times, most recently from a3a40bb to 0281d22 Compare July 14, 2022 05:31
@sarahill sarahill requested a review from chloerice August 8, 2022 16:12
Copy link
Member

@chloerice chloerice left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this @sarahill!! The guidance you added for this is excellent 🙌🏽 🚀 Just made a few non-blocking copy suggestions.

@sarahill sarahill changed the title [WIP] Remove external link icon and update docs Remove external link icon and update docs Aug 11, 2022
Copy link
Contributor

@jjgali jjgali left a comment

Choose a reason for hiding this comment

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

Left one tiny comment—looks fantastic!


Avoid using the [external link icon](/icons?icon=ExternalMinor&q=exter), as it can add unnecessary visual load inside a sentence or when accompanied by other content. Instead, add clarity to external links through clear link text and predictable placement of the link in a merchant’s workflow.

Edge case: External icons should not be used as an indicator that a new tab or window will be opened. However, they may be used sparingly in features where symbols help merchants scan and pick from a list of several kinds of navigation options, like the admin's global search results.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be “External link icons”?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. The icon name is "external" so that's why we'd went with that but they are just used for external links right now. The thing that is a little confusing is that the "Promote" icon looks an awful like the external icon 🤔
http://localhost:3000/icons?icon=ExternalSmallMinor&q=external

Copy link
Contributor

Choose a reason for hiding this comment

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

A gotcha—if that's the icon name, then that makes sense! I thought it was “external link icon” based on line 63. Also, I think the link may be broken on that same line. Looks like the end of the URL got cut off.

@emily-broughton
Copy link

A few small comments:

  • "Links should be indicated as external..." wondering if "indicated" makes you think of indicating with the icon. What would "External links should be used when merchants are:"

  • Change "Edge cases: External icons should not be used as an indicator..." to "Edge cases: External icon should not be used to indicate a new tab or window is being opened."

@sarahill
Copy link
Contributor Author

@emily-broughton I made the changes you suggested! Thank you 👏

Copy link

@emily-broughton emily-broughton 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!

@sarahill sarahill merged commit 8f51592 into main Aug 11, 2022
@sarahill sarahill deleted the external-link-updates branch August 11, 2022 20:32
@github-actions github-actions bot mentioned this pull request Aug 11, 2022
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] Remove external link icon and clarify documentation

5 participants