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

create buttons w/ modals and panels & table examples #92

Merged
merged 9 commits into from
Jan 22, 2025

Conversation

asun1234
Copy link
Contributor

@asun1234 asun1234 commented Jan 5, 2025

Issue

Developers can be easily tripped up by buttons, especially how they should be used within structures like Modals and Panels. Here's examples to help developers see what's possible, to make it easier for them to build things that match our design system.

product and design pattern guidance:

  • Buttons should be left aligned with the primary button placed leftmost
  • Primary button should be the main action for the modal, secondary button actions should be less critical
  • Primary button should only be used once on each surface. Do not pair the Primary button with a Destructive button. Primary + secondary can be paired, and destructive + secondary

To merge examples together, added changes from #91

Modal and Panel Examples:
Screenshot 2025-01-05 at 12 16 35 PM

Screenshot 2025-01-05 at 12 06 47 PM

Copy link
Collaborator

@banderson banderson left a comment

Choose a reason for hiding this comment

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

A couple recommended changes, then it looks good. Sync up with Amelia and Aanchal on the README before merging!

@@ -0,0 +1,17 @@
# HubSpot Getting Started Project Template
Copy link
Collaborator

Choose a reason for hiding this comment

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

I mentioned this for Heather's examples as well: can you check in with @aanchalHS and Amelia on what the contents of this README should be? I don't have a strong take there, and we should make it consistent with the others.

/>
));

// Define the Extension component, taking in runServerless, context, & sendAlert as props
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd kill his comment. We automatically generate it, but it looks outdated to me 🤔 I'll see if we need to update the template we use for new projects to address this upstream, but might as well remove it from here

Suggested change
// Define the Extension component, taking in runServerless, context, & sendAlert as props

Comment on lines 32 to 33
Working with buttons within panels and modals can get tricky
Here are some examples that we suggest you to follow.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: typo?

Suggested change
Working with buttons within panels and modals can get tricky
Here are some examples that we suggest you to follow.
Working with buttons within panels and modals can get tricky.
Here are some examples that we suggest you follow.

<TableCell>
When users need context from the page below, for longer forms
and multi-step flows. These pair well with the Table component.
Follow the same guidance as recommended above, but in this case, we suggest using buttons in the footer. </TableCell>
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: line wrapping

<Flex direction="column" gap="small">
<Text>
When we get all the 0's and 1's line up, a link will show in
your&nbsp;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: unintentional  ? I haven't seen one of those in a minute!

Suggested change
your&nbsp;
your

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was intentional bc adding a manual space wasn't rendering properly with the next <Text> block

<PanelSection>
<Text>
When we get all the 0's and 1's line up, a link will show in
your&nbsp;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: nbsp;👾

Suggested change
your&nbsp;
your

@asun1234 asun1234 requested a review from weaverhe January 17, 2025 17:02
Copy link
Collaborator

@weaverhe weaverhe left a comment

Choose a reason for hiding this comment

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

The code within the components looks good, just don't forget to migrate the Modal + Panel each into their own card.

</Text>
. Also, just to be sure, you're gonna get a confirmation email.
</Text>
<Input label="Label *" name="label" placeholder="Placeholder" />
Copy link

Choose a reason for hiding this comment

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

is having the same input multiple times intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it matches design's mock

Copy link

@Randyjp Randyjp 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. Just make sure to move examples into their own cards

@asun1234
Copy link
Contributor Author

closing to merge together with new structure changes

@asun1234 asun1234 closed this Jan 21, 2025
@asun1234 asun1234 reopened this Jan 21, 2025
@asun1234 asun1234 force-pushed the asun/buttons-panel-modal-example branch from 8488486 to daf6a55 Compare January 21, 2025 18:09
@asun1234 asun1234 changed the title Create buttons within panels and modal examples create buttons w/ modals and panels & table examples Jan 21, 2025
@asun1234
Copy link
Contributor Author

@weaverhe waiting on 👍 from design/product before merging, hold tight

@weaverhe weaverhe merged commit 20f36ec into HubSpot:main Jan 22, 2025
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.

4 participants