Skip to content

Conversation

@halocline
Copy link
Collaborator

@halocline halocline commented Nov 19, 2025

Deploy Preview

What does this PR do?

This is the second of a series of chained PRs building upon #5521. The PRs should be reviewed and merged in order.

  • Scale system
  • Spacing sizes
  • Container sizes
  • Component sizing
  • Refining T-shirt page content + re-wiring all cross-links

This pull request reorganizes and expands the foundation documentation structure for the design system, introducing a new "Spacing" section and improving the categorization of related content. The main changes include moving and reclassifying the "T-shirt sizing" and "Scale system" cards under a new "Layout" category, adding a new "Spacing" card and related documentation, and implementing supporting example components for the new section.

Foundation structure and categorization improvements:

  • Moved the "T-shirt sizing" card from the "Philosophy" category to the new "Layout" category, updated its related content, and reordered it to appear first within the "Layout" section. The "Scale system" card was also moved to "Layout" and reordered accordingly. [1] [2]
  • Added a new "Spacing" card to the "Layout" category, with appropriate description, tags, related content, and preview image, to better represent spacing as a foundational concept.
  • Updated the Foundation page to introduce a dedicated "Layout" subsection grouping the relevant cards.

New documentation and examples for spacing:

  • Added a new spacing.mdx documentation page, providing guidance, best practices, and interactive examples for spacing, including a visual scale and a call-to-action for design tokens.
  • Implemented new example components: SpacingScale, which visually displays the spacing scale; SpacingTokensCTA, a button linking to spacing design tokens; and SpacingBestPractices, for illustrating best and worst practices. These are now exported and used in the new documentation. [1] [2] [3]

Supporting exports and cleanup:

  • Added exports for new spacing-related example components and removed a misplaced export from the tokens examples index. [1] [2]

What are the relevant issues?

Where should the reviewer start?

https://deploy-preview-5573--keen-mayer-a86c8b.netlify.app/foundation/spacing

How should this be manually tested?

Any background context you want to provide?

Screenshots (if appropriate)

Should this PR be mentioned in Design System updates?

Is this change backwards compatible or is it a breaking change?

@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2025

⚠️ No Changeset found

Latest commit: 330b4dd

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

Comment on lines 11 to 14
Spacing guides users' eyes through the page, helping them understand the relationships
between different elements. The HPE Design System minimizes use of borders to separate
content. Instead spacing, typography, and background color are combined to create visual
hierarchy.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Spacing guides users' eyes through the page, helping them understand the relationships
between different elements. The HPE Design System minimizes use of borders to separate
content. Instead spacing, typography, and background color are combined to create visual
hierarchy.
Effective spacing guides a user's eye through the interface, making it easier to understand how elements relate to one another. The HPE Design System minimizes use of borders to separate
content. Instead spacing, typography, and background color are combined to create clear visual
hierarchy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adopted.

Comment on lines 18 to 20
The following spacing scale may be applied to create separation between [content
containers](/insert-link-when-available) (gap), between a content container's boundary
and its content (padding), and within content subsections (gap).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The following spacing scale may be applied to create separation between [content
containers](/insert-link-when-available) (gap), between a content container's boundary
and its content (padding), and within content subsections (gap).
Use spacing to:
- Create separation between content containers (gaps)
- Set space between a container’s boundary and its content (padding)
- Define spacing within subsections of content (gaps)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adopted.

Comment on lines 22 to 34
<Notification
alignSelf="start"
status="warning"
title="Avoid use of margin"
message={
<Paragraph margin="none">
Use of margin can lead to unpredictable responsive and/or adaptive layouts
and should be used with caution, if not avoided. All layouts may be
achieved using gap and padding, resulting in more flexible, predictable,
and maintainable layouts.
</Paragraph>
}
/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we add this in a do's and don't format, under the "spacing best practices" section?
If we want to present this as an "avoid" instead of a don't we can introduce this granularity like material does:

Image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like this idea. Do you have a supporting graphic / illustration in mind? I am blanking on a illustrative scenario at the moment.

Comment on lines 6 to 9
Spacing sizes are a subset of the [scale system](/foundation/scale-system)
using proximity principles to define relationships between content and create
hierarchy within a page. Spacing design tokens define the padding within, margin
around, or gap between content.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Spacing sizes are a subset of the [scale system](/foundation/scale-system)
using proximity principles to define relationships between content and create
hierarchy within a page. Spacing design tokens define the padding within, margin
around, or gap between content.
Spacing sizes are a subset of the [scale system](/foundation/scale-system),
supporting proximity principles to shape relationships between content and establish hierarchy on a page. These principles are applied through [spacing tokens](/design-tokens/layout-and-spacing/spacing), which define the padding within, margin
around, or gap between content.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adopted.

Comment on lines 63 to 65
message: `Use spacing design tokens to style element-level components.
Instead, use component-specific tokens or element tokens which ensure
correct sizing of elements across screen sizes.`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
message: `Use spacing design tokens to style element-level components.
Instead, use component-specific tokens or element tokens which ensure
correct sizing of elements across screen sizes.`,
message: `Use spacing design tokens to style element-level components.
Instead, use component-specific tokens or [element tokens](https://design-system.hpe.design/design-tokens/element) which ensure
correct sizing of elements across screen sizes.`,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adopted.

Comment on lines 28 to 31
Use of margin can lead to unpredictable responsive and/or adaptive layouts
and should be used with caution, if not avoided. All layouts may be
achieved using gap and padding, resulting in more flexible, predictable,
and maintainable layouts.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Use of margin can lead to unpredictable responsive and/or adaptive layouts
and should be used with caution, if not avoided. All layouts may be
achieved using gap and padding, resulting in more flexible, predictable,
and maintainable layouts.
Relying on margin can lead to unpredictable responsive and/or adaptive layouts and should be used with caution, if at all. Most layouts can be achieved using only gap and padding, resulting in more flexible, predictable, and maintainable designs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adopted.

Copy link
Collaborator

@oliverHPE oliverHPE left a comment

Choose a reason for hiding this comment

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

Looks great.

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