Skip to content

Update components to new DS theme#207

Draft
VictoriaBeilsten-Edmands wants to merge 9 commits into
feature/diamond-ds-themefrom
vbe/ds-theme-components
Draft

Update components to new DS theme#207
VictoriaBeilsten-Edmands wants to merge 9 commits into
feature/diamond-ds-themefrom
vbe/ds-theme-components

Conversation

@VictoriaBeilsten-Edmands

Copy link
Copy Markdown
Collaborator

No description provided.

@VictoriaBeilsten-Edmands VictoriaBeilsten-Edmands requested review from akademy and removed request for akademy June 5, 2026 15:20
Comment thread src/components/navigation/Breadcrumbs.tsx Outdated
Comment thread src/components/navigation/Footer.tsx
@akademy akademy self-requested a review June 8, 2026 09:14
@VictoriaBeilsten-Edmands VictoriaBeilsten-Edmands force-pushed the vbe/ds-theme-components branch 3 times, most recently from e4957ee to b375210 Compare June 8, 2026 10:10

@akademy akademy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've added a few things. Also got the following questions (not about specific lines/files)

  • AppTitleBar, no longer matches the NavBar colours. Is there some way to set it to the correct colours and add it as a Storybook example?
  • Footer seems to have an odd background colour now. (You can see original matched the NavBar too https://diamondlightsource.github.io/sci-react-ui/?path=/docs/components-navigation-footer--docs )
  • The ColourSchemeButton no longer looks cool. All the hover colours have gone. This is a sad day.
  • The ColourSchemeButton also no longer matches the styling of the User control (i.e. with a filled background)

Comment thread src/components/controls/Bar.stories.tsx Outdated
Comment thread src/components/controls/Bar.test.tsx

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the significance of the name change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

To make it less confusing what "dark" means - is it dark text in the logo, or dark theme? Maybe a better name would be logo-on-dark-surface and logo-on-light-surface

Comment thread src/components/navigation/Footer.tsx Outdated
Comment thread src/components/controls/Bar.tsx Outdated
onClick={(event) => {
setColourScheme(isDark() ? ColourSchemes.Light : ColourSchemes.Dark);
if (props.onClick) props.onClick(event);
setMode?.(isDark ? "light" : "dark");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

When is setMode not defined? Also is mode also undefined? What happens then?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Before the colour scheme context if fully initialized.
https://mui.com/material-ui/customization/css-theme-variables/configuration/

Comment thread src/components/controls/Logo.tsx Outdated
style={style}
/>
)
<img

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this nolonger using ImageColourSchemeSwitch ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I was dealing with the issue of brand-coloured background which is dark in both light/dark mode. I should be able to update ImageColourSchemeSwitch to deal with this though.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is using ImageColourSchemeSwitch again.

},
};

export const DifferentBackgroundColour: Story = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we pretending you can't change the background colour or can you actually not do this now?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Just pretending

VictoriaBeilsten-Edmands and others added 2 commits June 8, 2026 14:18
Co-authored-by: Matthew Wilcoxson <akademy@users.noreply.github.com>
@VictoriaBeilsten-Edmands

Copy link
Copy Markdown
Collaborator Author

AppTitleBar, Footer, Breadcrumbs and Navbar all use the Bar component and can use all the colours (variant + surface combinations) that are available in Bar. They have their own defaults. I've added some stories for these.
The ColourSchemeButton and User Avatar styling are similar now. The hover colours are still gone though. @zohar was talking about potentially having a 'highlight' colour.

The tests have been updated to pass, but not updated to test any new logic.

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.

3 participants