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

New Header for Overlay and Dialog #4138

Closed
wants to merge 6 commits into from

Conversation

tomhazledine
Copy link
Contributor

  • Adds new OverlayHeader component to replace deprecated OverlayPanelCloseButton
  • Updates DialogHeader to match updated Figma spec and deprecate DialogCloseButton

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
saltdesignsystem ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2024 0:19am

Copy link

changeset-bot bot commented Sep 19, 2024

⚠️ No Changeset found

Latest commit: 1557c8f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

/**
* Description text is displayed just below the header
**/
description?: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was a question on the previous PR about why description|header|preheader were limited to strings. (same applies to DialogHeader)

IMO string is the right choice here. The design is very deliberate about only allowing text content in these sections, and I don't think there's a scenario where we would want users to be able to inject any component they like here.

@joshwooding @origami-z @navkaur76 thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

In most cases, pure string would be provided anyway. However, in case teams want to put additional layout, icon or other relevant stuff, we could try to accommodate? A few other components does this

Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather use ReactNode or something similar. It's not worth being restrictive

box-sizing: border-box;
}

.saltOverlayHeader-body {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joshwooding following up on question from previous PR: "Is "body" the correct way to refer to this?"

I think it is, as it's the body of the header (multiple text elements that are wrapped together, discrete from the end adornment). Not a strongly-help opinion, though, so happy to hear counter arguments 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

It needs to be aligned with design @navkaur76

Copy link
Contributor

Choose a reason for hiding this comment

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

In figma, the frame containing the main heading, pre-header and description is called "Block", if that helps? The accent bar sits outside of this frame.

Copy link
Contributor

Choose a reason for hiding this comment

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

Closest block in the system is in stepper input?

/**
* End adornment component
*/
endAdornment?: ReactNode;
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 endAdornment to be consistent with other components. Are there any strong opinions about the name? @joshwooding @origami-z

Copy link
Contributor

Choose a reason for hiding this comment

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

adornment is really only form controls previously... how does design refer to this? @navkaur76

Copy link
Contributor

Choose a reason for hiding this comment

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

It's "Close button" in figma

Copy link
Contributor

Choose a reason for hiding this comment

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

Adornment is also used in grid corner triangle? @bhoppers2008

@joshwooding
Copy link
Contributor

Replaced by other PRs.

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.

5 participants