feat(foundations): added new pages#537
Merged
Merged
Conversation
th-94
reviewed
Apr 30, 2026
Collaborator
There was a problem hiding this comment.
do we need these icons? Are they available in sgds icon or we need to add it into sgds icon instead?
th-94
reviewed
Apr 30, 2026
| :key="color.name" | ||
| :class="[ | ||
| 'our-colours-brand-card sgds:flex sgds:flex-col sgds:justify-between sgds:rounded-[var(--sgds-border-radius-2-xl)] sgds:min-h-[var(--sgds-dimension-288)] sgds:max-md:min-h-[15rem] sgds:p-[var(--sgds-padding-2-xl)] sgds:overflow-hidden', | ||
| 'sgds-col-4 sgds-col-sm-4 sgds-col-lg-4 our-colours-brand-card sgds:flex sgds:flex-col sgds:justify-between sgds:rounded-[var(--sgds-border-radius-2-xl)] sgds:min-h-[var(--sgds-dimension-288)] sgds:max-md:min-h-[15rem] sgds:p-[var(--sgds-padding-2-xl)] sgds:overflow-hidden', |
Collaborator
There was a problem hiding this comment.
we should use available css utility classes, for example sgds:p-[var(--sgds-padding-2-xl)] should use sgds:p-2-xl and sgds:rounded-[var(--sgds-border-radius-2-xl)] should use sgds:rounded-2-xl instead and so on.
th-94
requested changes
Apr 30, 2026
…icon library Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
New foundation page mirroring the Storybook theming guide so designers and developers have a single entry point for customising SGDS tokens. CopyCommand gains multi-line support so CSS override snippets can be copied in one click. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…and playgrounds - Add mobile-responsive SegmentedControl with overflow arrows and sliding indicator, used by configuration and structure demos - Add AlertPlayground and ComponentPlayground for interactive exploration of props - Add ThemeControls and scoped theming composable for per-page theme preview - Consolidate AccordionV2 page into shared component-docs structure - Refresh component data (badge variants/outlined/dismissible/icon sections, card/combo-box/table content) and related section components - Add sgds-writing skill for docs copy guidance Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace `sgds-tab-group` with custom SegmentedControl across all foundation token pages (Spacing, Border, FontSize, Icon, Breakpoint, Typography token detail, Elevation, Colour palette). - Add a third "SGDS tailwind token" view alongside CSS variable / Figma token, with per-page mapping helpers that translate each token to its utility class (e.g. `--sgds-text-gap-md` → `sgds:gap-text-md`, `--sgds-bg-default` → `sgds:bg-default`, breakpoints surface as responsive prefixes, icon size shows the `size=""` attribute). - Spacing tokens: surface primitive resolution per breakpoint via per-cell tooltips (e.g. mobile 12px → `--sgds-spacer-4`); switch spacer-scale visual to neutral-surface-default for a more visible bar. - Border tokens: add a Form radius sub-table on the radius page and match the utilities-page bordered transparent preview boxes; carry Usage column with copy from the radius utilities page. - Elevation: remove the now-redundant edge/surface elevation utilities pages and ElevationUtilitiesPage component; remove the matching sidebar group. - Storybook header links: gate behind a token-only allowlist so they appear on token pages only and are hidden from principles pages. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Replace prose-only intro with two anatomy diagrams: hex→primitive name pill (red-400, green-500, blue-600) and a Colour/Scale callout pill that uses circle anchors to point at the word and number inside the token name. Coloured strokes match the segments they point to, with theme-aware overrides for night mode. - Reframe "When to use primitives" to lead with the recommendation against direct use, link out to semantic colour tokens, then list valid use cases (custom brand palette via the colour generator, Figma exploration, defining new semantic tokens). - Move the shade-scale guide under the table heading and add a new "Colour contrast ratios" subsection that explains the WCAG and APCA numbers behind the Contrast column, plus why the ratios matter. - Heading hierarchy aligned to SGDS: h3 = heading-md, h4 = subtitle-md, h5 = subtitle-md for family table titles. CodeToken stays at default size; only the pill diagrams scale up.
Flatten the Colour section of the Foundations sidebar from a nested "Colour tokens" + "Colour utilities" group into five sibling pages: Colour principles, Our colour, Product colour, Primitive colour, Semantic colour, System palette. - Add new pages: our-colour, semantic-colour, system-palette, with their corresponding renderer (SystemPalettePage.vue) and data (system-palette.ts). Includes a semantic theme-resolution image asset. - Consolidate the seven per-property semantic pages (background, border, foreground, form, surface, text + product) into a single semantic-colour.md page. - Remove the three duplicated colour utility pages (background-colour, border-colour, text-colour) and the ColourUtilitiesPage.vue renderer. - Update foundations-sidebar.ts, foundation-docs.ts (token page paths), and search-index.ts to reflect the new layout. - Drop OurColoursPage from ColourPrinciplesPage now that it lives on its own dedicated page.
…agram - Rewrite the "How semantic colour tokens work" intro in plain language that picks up where the primitive page leaves off, replacing CSS-jargon references like "CSS custom properties" and "theme layer" with concrete contrast: primitive names a hex value, semantic names the job that hex value performs. - Add a Raw hex → Primitive → Semantic mapping diagram that uses the same pill+arrow visual as the primitive page, with two themed primitive rows (day blue-600 + night blue-400) converging via curved bezier into a single arrow that lands on --sgds-link-color-default. The semantic pill spans both rows and uses a split swatch to show the dual mapping. - Wire the modifier segment colour to the same theme-aware CSS variable used by the lines and dots, then switch the modifier accent from green to blue (blue-600 day / blue-300 night) so the "default" word stays readable on both light and dark surfaces. - Add a max-width 640px media query that scales the cp-name-anatomy pill, swatch, and callout positions down for mobile, plus white-space: nowrap on the pill so the token text never wraps mid-word. - Tweak the Storybook header link on this page to open in a new tab without rendering the external-link indicator (PageHeader change), and route the page's Storybook link to the foundation-theming docs. - Update page description to match the new intro framing.
- Adds linkable "Custom colour" anchor inside the GovTech tab paragraph that switches tabs and scrolls to the heading - Adds h3 + BETA badge + anchor link header inside the Custom colour tab - Fixes colour generator: activeProductRows now resolves to the custom palette when the page renders standalone via section="brand-custom" - Removes redundant empty wrapper that added 32px to the gap above the GovTech blue colour table - Removes negative top margin so the gap below the page header matches the semantic colour page - Removes the "When to use brand colours" section Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
th-94
force-pushed
the
petrine/fix-foundations
branch
from
May 8, 2026 08:26
ce01464 to
fad6990
Compare
th-94
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of the change and where applicable, the issue you are addressing. Please also include relevant motivation and context. List any dependencies that are required for this change. If necessary, please update documentation (found under the
collectionsfolder) as well.Fixes # (issue number)
Type of change
Please check on the checkbox for those that are relevant (put x between the brackets)
How Has This Been Tested?
Please describe or list the test cases that you ran to verify your changes, and provide instructions so we can reproduce them.