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

ModalAlert: Add documentation and best practices #2450

Merged
merged 5 commits into from
Oct 21, 2022

Conversation

ayeshakmaz
Copy link
Contributor

@ayeshakmaz ayeshakmaz commented Oct 20, 2022

Summary

What changed?

Add documentation and examples for ModalAlert

Why?

Add Best Practice and Variant sandpack examples.
Also updates the padding on Modal and ModalAlert footers

Links

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)

@ayeshakmaz ayeshakmaz added the patch release Patch release label Oct 20, 2022
@netlify
Copy link

netlify bot commented Oct 20, 2022

Deploy Preview for gestalt ready!

Name Link
🔨 Latest commit 7e1c106
🔍 Latest deploy log https://app.netlify.com/sites/gestalt/deploys/6352e600a5712d00095cd4f2
😎 Deploy Preview https://deploy-preview-2450--gestalt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ayeshakmaz ayeshakmaz marked this pull request as ready for review October 21, 2022 05:01
@ayeshakmaz ayeshakmaz requested a review from a team as a code owner October 21, 2022 05:01
@@ -1390,6 +1390,56 @@ const GENERAL_COMPONENT_LIST: $ReadOnlyArray<ListItemType> = [
figma: null,
},
},
{
svg: <Modal />,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using the same svg for now, but will update once I make a new illustration

description="Use language that makes it hard to understand what action is being taken, while adding additional actions that may take the user out of their existing context."
cardSize="lg"
type="do"
description="Use to overlay Page content. ModalAlerts should be horizontally and vertically centered on the screen."
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this one required? I dont think this is specific for ModalAlert but for all Modals?

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 call, removed

primaryAction={{
accessibilityLabel: 'Update credit card info',
label: 'Update credit card',
href: 'https://www.pinterest.com',
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we adding the visit icon to all primary actions with URLs? What;s the intention of the icon?

Copy link
Contributor Author

@ayeshakmaz ayeshakmaz Oct 21, 2022

Choose a reason for hiding this comment

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

The icon showcases that folks are going to be navigated away from the modal to a new page instead of just closing the modal like non-link buttons

@ayeshakmaz ayeshakmaz merged commit 5f6c6c8 into pinterest:master Oct 21, 2022
@ayeshakmaz ayeshakmaz deleted the ayesha/modal-alert-docs branch October 21, 2022 18:51
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
Development

Successfully merging this pull request may close these issues.

2 participants