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

Divider: updated design guidelines #1791

Merged
merged 6 commits into from Dec 2, 2021

Conversation

AlbertCarreras
Copy link
Contributor

@AlbertCarreras AlbertCarreras commented Nov 30, 2021

Summary

Divider: updated design guidelines

Links

  • [Jira](link to Jira ticket(s))
  • [TDD](link to Paper doc)
  • [Figma](link to Figma file)

Checklist

  • Added unit and Flow Tests
  • Added documentation + accessibility tests
  • Verified accessibility: keyboard & screen reader interaction
  • Checked dark mode, responsiveness, and right-to-left support
  • Checked stakeholder feedback (e.g. Gestalt designers)

@AlbertCarreras AlbertCarreras added the patch release Patch release label Nov 30, 2021
@netlify
Copy link

netlify bot commented Nov 30, 2021

✔️ Deploy Preview for gestalt ready!

🔨 Explore the source changes: a617c46

🔍 Inspect the deploy log: https://app.netlify.com/sites/gestalt/deploys/61a91d6dd71ad90008bb4e21

😎 Browse the preview: https://deploy-preview-1791--gestalt.netlify.app

@AlbertCarreras AlbertCarreras marked this pull request as ready for review November 30, 2021 23:32
@AlbertCarreras AlbertCarreras requested a review from a team as a code owner November 30, 2021 23:32
<Page title="Divider">
<PageHeader
name="Divider"
description="If you have two things that need to be separated, put a `Divider` between them."
Copy link
Contributor

Choose a reason for hiding this comment

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

  • "things" is a bit generic…perhaps "elements"?
  • No need for the backticks around Divider — we've moved away from that style for component names

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

return (
<Flex>
<Box paddingX={4}>
<Block title="Discover ideas" text="Use the searh bar to discover ideas, people and trends. Explore suggested topics or search for topics of your own." />
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: s/'searh'/'search'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

</Box>
<Divider />
<Box paddingX={4}>
<Block title="Create Pins" text="Upload an image from your computer or mobile device to create a Pin. You can also create Pins from images yu find online." />
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: s/'yu'/'you'

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm still seeing this typo (here and where the example is repeated below)

<MainSection.Subsection>
<MainSection.Card
description={`
Dividers can be a subtle way to separate content, however, white space can be used to accomplish the same goal. Use dividers sparingly to avoid creating unnecessary clutter. Dividers should be used mainly to separate groups of related content.
Copy link
Contributor

Choose a reason for hiding this comment

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

The first sentence is a bit of a run-on. Perhaps a semi-colon or period between "content" and "however"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

card(<PropTable props={[]} />);
return (
<Flex direction="column" gap={10}>
<Block title="Discover ideas" text="Use the searh bar to discover ideas, people and trends. Explore suggested topics or search for topics of your own." />
Copy link
Contributor

Choose a reason for hiding this comment

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

same typos in these blocks in the various examples

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

docs/pages/divider.js Show resolved Hide resolved
<MainSection.Card
cardSize="md"
type="do"
description="Use whitespace primarily to separate groups of related content"
Copy link
Contributor

Choose a reason for hiding this comment

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

These should end in a period (this example and several others)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

<MainSection.Subsection description="The Divider is not focusable and is treated as decorative. Screen readers on tab navigation don't announce Dividers but do announce them on left/right quick navigation." />
</MainSection>
<MainSection name="Localization">
<MainSection.Subsection description="If you are aligning the Divider to content, ensure that it switches sides according to the contents start-alignment" />
Copy link
Contributor

Choose a reason for hiding this comment

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

"…according to the content's start-end alignment."

  • apostrophe on "content"
  • "start-end" to clarify which alignment we're referring to
  • period at the end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

}
`}
/>
<MainSection name="Usage guidelines">
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this use our standard "Do/Don't" format?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

Copy link
Contributor

Choose a reason for hiding this comment

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

This still needs a "Don't", and part of this "Do" is referring to negative guidance. Can this be split into a "Do"/"Don't" pair?

Copy link
Contributor

Choose a reason for hiding this comment

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

These are now just repeating the first Best Practices pair. Perhaps work with Kate to develop content that captures the original Usage Guidelines without repeating later content?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DISCUSSED, CHANGED

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: if we're not pairing it with a "Don't", I think we can forgo the "Do". When not in counterpoint to anything, the "Do" is superfluous

</Box>
<Divider />
<Box paddingX={4}>
<Block title="Create Pins" text="Upload an image from your computer or mobile device to create a Pin. You can also create Pins from images yu find online." />
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm still seeing this typo (here and where the example is repeated below)

}
`}
/>
<MainSection name="Usage guidelines">
Copy link
Contributor

Choose a reason for hiding this comment

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

This still needs a "Don't", and part of this "Do" is referring to negative guidance. Can this be split into a "Do"/"Don't" pair?

<MainSection.Card
cardSize="md"
type="don't"
description="Inset the Divider in a way that causes it to be free-floating or separated from content."
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: no article needed, just "Inset Divider in a way…"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

<Flex width="100%" height="100%">
<Box paddingX={4}>
<Flex direction="column" gap={2} width={120}>
{["Public profile", "Account settings", "Home feed tuner", "Claim", "Permissions", "Notifications"].map((item, idx) => <Text underline={idx === 0}weight="bold" key={idx} size="md" wrap="none">{item}</Text>)}
Copy link
Contributor

Choose a reason for hiding this comment

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

The underline here is a bit odd…I know it's supposed to indicate the currently-selected item, but it reads as a link, so it's unexpected that it's not a link. Perhaps just remove the underline? Or implement using a Box similar to how it's implemented in Pinboard.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE, changed to Tabs

</MainSection.Subsection>
</MainSection>
<MainSection name="Accessibility">
<MainSection.Subsection description="The Divider is not focusable and is treated as decorative. Screen readers on tab navigation don't announce Dividers but do announce them on left/right quick navigation." />
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: no article needed, just "Divider is not focusable…"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

<MainSection.Subsection description="The Divider is not focusable and is treated as decorative. Screen readers on tab navigation don't announce Dividers but do announce them on left/right quick navigation." />
</MainSection>
<MainSection name="Localization">
<MainSection.Subsection description="If you are aligning the Divider to content, ensure that it switches sides according to the content's start-end alignment." />
Copy link
Contributor

Choose a reason for hiding this comment

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

same nit about no article

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

<MainSection.Subsection
title="Orientation"
columns={2}
description="You can use this component for a visual divider between two elements. Placing it within a [Flex](/flex) layout with a direction of `row` will cause the Divider to become vertical."
Copy link
Contributor

Choose a reason for hiding this comment

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

The copy seems a little off…perhaps something like:
"You can use this component as a vertical divider between two elements. Placing it within a Flex layout with a direction of "row" will shift Divider to a vertical orientation."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}
`}
/>
<MainSection name="Usage guidelines">
Copy link
Contributor

Choose a reason for hiding this comment

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

These are now just repeating the first Best Practices pair. Perhaps work with Kate to develop content that captures the original Usage Guidelines without repeating later content?

<MainSection.Subsection columns={2}>
<MainSection.Card
type="do"
description="- Use Dividers or whitespace subt to seperate groups of related content."
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what "subt" means here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

/>
<MainSection.Card
type="don't"
description="- Overuse Dividers as this can lead to uncessary clutter on the page."
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: "unnecessary"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

<Page title="Divider">
<PageHeader
name="Divider"
description="A light gray 1px horizontal or vertical line which groups and divides content in lists and layouts."
Copy link
Contributor

Choose a reason for hiding this comment

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

ah, missed this previously: this should live as a comment in the component file and get used here as the generated version (generatedDocGen?.description), so users see the description on hover in their IDE

}
`}
/>
<MainSection name="Usage guidelines">
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: if we're not pairing it with a "Don't", I think we can forgo the "Do". When not in counterpoint to anything, the "Do" is superfluous

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch release Patch release
Projects
None yet
2 participants