Skip to content

Fix <Toolbar> design - #10960

Merged
slax57 merged 5 commits into
masterfrom
fix-toolbar-default-theme
Sep 26, 2025
Merged

slax57 merged 5 commits into
masterfrom
fix-toolbar-default-theme

Conversation

@djhi

@djhi djhi commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

Problem

Fixes #10959.

The toolbar has a background color with some transparency (introduced here).

This does not look good on mobile for instance where it is sticky. This can be seen on this story, if you make your screen small enough so that the toolbar is sticky and you can scroll:

image

Solution

  • Update our themes so that it looks good on any screen

How To Test

image

For each theme:

  • check that it looks good on large screen (no sticky toolbar)
  • check that it looks good on small screen (with sticky toolbar)

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@djhi djhi added the RFR Ready For Review label Sep 25, 2025
@fzaninotto
fzaninotto requested a review from Copilot September 25, 2025 10:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the toolbar design by updating the background color from a semi-transparent divider color to a solid background color to improve visibility when the toolbar is sticky on mobile devices.

Key changes:

  • Changed toolbar background from transparent divider color to solid background color
  • Added theme-specific toolbar background colors for light, dark, and soft themes

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/ra-ui-materialui/src/theme/defaultTheme.ts Added RaToolbar component overrides with solid background colors for light (grey[100]) and dark (grey[900]) themes
packages/ra-ui-materialui/src/form/Toolbar.tsx Changed default toolbar background from divider color to background.paper
examples/demo/src/themes/softTheme.ts Added RaToolbar override with solid background color for soft dark theme

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@fzaninotto

Copy link
Copy Markdown
Member

You PR changes the background color of the toolbar in some themes (e.g. B&W).

@djhi

djhi commented Sep 25, 2025 •

Copy link
Copy Markdown
Contributor Author

You PR changes the background color of the toolbar in some themes (e.g. B&W).

I reviewed all themes again, there are now some subtle differences due to the removal of opacity but it should be close enough.

Note that the chipTune theme was actually broken in production. I fixed it as well

@slax57 slax57 added this to the 5.11.4 milestone Sep 26, 2025
@slax57
slax57 merged commit 9ed2537 into master Sep 26, 2025
15 checks passed
@slax57
slax57 deleted the fix-toolbar-default-theme branch September 26, 2025 09:51

This branch was successfully deployed

1 active deployment
Preview – react-admin-storybook — 3ba2ad09 Deployed Sep 25, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RaToolbar opacity / color

4 participants