Repository navigation
Conversation
01666b0 to
ab960fa
Compare
492ae7a to
5c56b01
Compare
88f577a to
0190d4c
Compare
|
I was expecting this to just replace the icons line by line. Can you explain what the additional complexity is trying to achieve? (in particular, all the files in DataDisplay/Icons) |
As far as I understand, it's better to run Lucide Icons through Key icons will be in the theme, but if an app wants to use other icons they can import it from Lucide, and then use |
0190d4c to
dc92db2
Compare
7d18fa5 to
0d22e85
Compare
fe9bba3 to
ce60aa1
Compare
|
I've reworked this branch and force-pushed it as a single commit:
|
ce60aa1 to
38325b5
Compare
douglaswinter
left a comment
There was a problem hiding this comment.
The icons looks good. A few comments enclosed.
There was a problem hiding this comment.
Can you add a story (or more) for icons inside buttons, and take a look at the disabled state, where the icon is darker at the path joints.
There was a problem hiding this comment.
Added with other components too
| @@ -0,0 +1,114 @@ | |||
| import type { Meta, StoryObj } from "@storybook/react-webpack5"; | |||
| import { Box, Stack, Typography } from "@mui/material"; | |||
There was a problem hiding this comment.
@VictoriaBeilsten-Edmands should these be imported from MuiWrapped?
There was a problem hiding this comment.
The MUI stories import from MuiWrapped, but the stories for our own components import from @mui/material. I've followed the second group here. Happy to change if we want one rule for all of them.
There was a problem hiding this comment.
What is the purpose of these wrapped icons? I see that a select few are used in the theme, but what about the rest?
There was a problem hiding this comment.
Good question. MuiWrapped used to wrap the Material icons under their Material names (AddIcon, DeleteIcon and so on), and the stories used those names. When we swapped to Lucide, I pointed those same names at the Lucide icons so the stories kept working.
You're right that most of them weren't needed. I've now removed the rest, and the stories call the Lucide icon directly with LucideIcon. The named icons only stay where they're actually used.
| }} | ||
| > | ||
| <ArrowBackIosNewIcon data-testid="scroll-left-button" /> | ||
| <ChevronLeftIcon data-testid="scroll-left-button" size="md" /> |
There was a problem hiding this comment.
In the story this icon is hard to see when it overlays an image, but it's like that in main too.
There was a problem hiding this comment.
I didn't fix the way it looks here, should I?
- Added `LucideIcon` and `iconSizes`, with icons built via `createIcon` - Exported the icons from the package entry; they stay tree-shakeable - `DiamondDSTheme` uses Lucide by default for `Alert`, `Select`, `NativeSelect`, `Autocomplete`, `Chip` - Components and stories now use the Lucide icons, including the `SidebarNav` story - `lucide-react` is a new peer dependency (`^1.35.0`) - Removed `react-icons` and the `@mui/icons-material` peer and dev dependencies - Updated README, installation docs and changelog
- Drop @mui/icons-material and react-icons - Bump lucide-react to 1.35.0
- Replace removed @mui/icons-material imports
- Use datadisplay to match the folder on case-sensitive filesystems
- Recommend latest lucide-react in install docs - Restructure icons page with contents and Usage section - Add brand icons guidance, re-enable LucideIcon guidance - Changelog: other components, mark ColourSchemeButton test ids breaking
- Add --ds-on-surface-disabled-opacity; --ds-on-surface-disabled now derives from it - LucideIcon, Select, NativeSelect and Chip icons use an opaque colour plus opacity when disabled - Chip delete icon fades with opacity, not MUI's translucent colour - Disabled chips use disabled tokens, so their icons are not faded twice
6b6021a to
64d1664
Compare
- Chip delete icon is a plain X; Chip icons are 18px (16px on small chips) - NumberInput spinner chevrons use the xs icon size (16px, up from 12px) - Add an InComponents story with buttons, chips, alerts, selects and inputs - Rename the LucideIcon story title to Components/Data Display/LucideIcon - Check each Lucide default in the theme test by component, not just defined
- Trim the exported icons from 45 to the 21 the library and docs use - Remove the Material-named icon aliases from MuiWrapped - Stories use LucideIcon with a Lucide icon for the rest
…rtLabel and Tabs - Set Lucide icon defaults in DiamondDSTheme for each component's icon slots - Slot icons are private to the theme, so the exported icon set does not grow - Add render tests that MUI's own default icons no longer appear - Show the components in the InComponents story
…and AccordionSummary - MUI already fades these when disabled, so the icon rule faded them a second time - Icons inside them now keep the parent's colour at full opacity - Add rendered tests for the four components
- Menu story and docs example use the sm icon size (20px), as in User - MenuItem icon box is 28px wide instead of 36px - Add a rendered test and a changelog line
64d1664 to
2a5e2a2
Compare
|
@douglaswinter Thank you for going through this. I've made the following changes:
I've tried to split the commits to different aspects. |
Summary
Library icons now use Lucide instead of Material icons and
react-icons.Changes
LucideIconandiconSizes, exported with the library icons (HomeIcon,SettingsIconand others). Icons remain tree-shakeable.DiamondDSThemenow uses Lucide icons by default forAlert,Select,NativeSelect,AutocompleteandChip.Navbar,NavMenu,Breadcrumbs,User,ScrollableImagesandColourSchemeButtonnow use Lucide icons. TheUsermenu also includes Profile and Logout icons.SidebarNavandMuiWrapped.lucide-reactas a peer dependency (^1.35.0).react-iconsand@mui/icons-materialas library dependencies. The dev app keeps@mui/icons-materialfor Material React Table.lucide-react.@mui/icons-materialandreact-iconsare no longer required unless used by the consuming app. JsonForms users still need@mui/icons-materialfor@jsonforms/material-renderers.ColourSchemeButtontest ids are nowSunIconandMoonIcon.Not in this PR
mrtOptions().