-
Notifications
You must be signed in to change notification settings - Fork 393
change: [M3-9432] - Theme changes to InputBase (DebounceSearchTextField, Autocomplete, TextField) #11807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| export const DebouncedSearchTextField = React.memo( | ||
| (props: DebouncedSearchProps) => { | ||
| const { | ||
| InputProps, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecated - using slotProps
| pr={2} | ||
| top={1} | ||
| /> | ||
| <InputAdornment position="start"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using adornments, let's ensure we use InputAdornment to wrap things for proper theme-level styling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we create a ticket for this? Found several adornments not wrapped in InputAdornment in the codebase:
CopyableTextFieldRegionSelectDatabaseEngineSelectStackScriptLandingTable
| [theme.breakpoints.down('sm')]: { | ||
| textAlign: 'center', | ||
| }, | ||
| top: 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed since alignItems: 'center' made more sense.
| color: theme.tokens.header.Search.Text.Placeholder, | ||
| fontStyle: 'italic', | ||
| slotProps={{ | ||
| htmlInput: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slotProps.htmlInput is the equivalent of inputProps
slotProps.input is the equivalent of InputProps
slots.paper is the equivalent of PaperComponent
| sx: { | ||
| '&:active, &:focus, &.Mui-focused, &.Mui-focused:hover': { | ||
| backgroundColor: theme.tokens.header.Search.Background, | ||
| borderColor: theme.tokens.header.Search.Border.Active, | ||
| color: theme.tokens.header.Search.Text.Filled, | ||
| }, | ||
| '&:hover': { | ||
| backgroundColor: theme.tokens.header.Search.Background, | ||
| borderColor: theme.tokens.header.Search.Border.Hover, | ||
| color: theme.tokens.header.Search.Text.Filled, | ||
| }, | ||
| backgroundColor: theme.tokens.header.Search.Background, | ||
| borderColor: theme.tokens.header.Search.Border.Default, | ||
| color: theme.tokens.header.Search.Text.Filled, | ||
| maxWidth: '100%', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted in the description, the Top Menu search represents a unique styling implementation. While we can revisit this later, these modifications effectively serve as theme overrides.
hkhalil-akamai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ TextFields and Autocompletes across the app look as expected in light and dark mode
✅ Input adornments appearing as expected
✅ Tested multiple variations of the above components as well as LinodeSelect and RegionSelect in storybook -- verified these match the Figma mockups
| pr={2} | ||
| top={1} | ||
| /> | ||
| <InputAdornment position="start"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we create a ticket for this? Found several adornments not wrapped in InputAdornment in the codebase:
CopyableTextFieldRegionSelectDatabaseEngineSelectStackScriptLandingTable
|
@hkhalil-akamai Yes those will need to be updated. Since there's no serious regressions with most of those, I'll tackle in a follow-up. |
|
Coverage Report: ❌ |
bnussman-akamai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Autocomplete Loading state is a bit broken
Screen.Recording.2025-03-12.at.5.22.13.PM.mov
bnussman-akamai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for fixing that loading state issue 🙏
Not blocking: The endAdornment icons are much smaller now (and closer together) which makes them seem a bit harder to click/press
|
Yea the icons only have 4px padding between them and have been reduced in size by design. I will most likely be revisiting this in follow-ups as I have discussions with the UX team. I'll continue to do refinements as I tackle TextField next which is related to this. Edit: The down chevron icon needed to be replaced in the UI package. It's still smaller, but larger than is was 16px > 20px (still a reduction from the 28px that it was) |
|
These tests appear somewhat flaky. All pass except Clone Linode, which I'm looking into. |
Cloud Manager UI test results🔺 2 failing tests on test run #16 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/billing/google-pay.spec.ts" |
||||||||||||||||||||

Description 📝
Update the search field components (
DebouncedSearchTextField) to conform to the new Akamai Design System specifications. This includes standard inputs, adornments, and all relevant states. This PR prioritizesDebouncedSearchTextField, with other component modifications resulting from necessary adjustments to the broaderMuiInputBasetheme.Note
Both
AutocompleteandTextFieldcomponents inherit from the same underlying components:MuiInputBaseandMuiInputAdornment. I've consolidated the core styling in these shared components to minimize duplication. For component-specific styling, use the dedicated theme overrides:MuiAutocompleteandMuiTextField.Changes 🔄
Foundations
MuiInputAdornment: BothTextFieldandAutocompleteuse identical adornment components, which should maintain 20×20 pixel dimensions, with the sole exception of the clear/close icon which requires a smaller 16×16 pixel size.MuiInputBase: Contains core input styling for bothTextFieldandAutocompletefor all relevant component states.MuiOutlinedInput: Removed since this was unused along with other dead styles.Components
Autocomplete: New ChevronDownIcon and reduced adornment sizeDebouncedSearchTextField:InputPropsis deprecated; changed toslotPropsand usinginputSlotPropsfor the component prop.InputAdornmentis being used for all adornmentsStrengthIndicator: Fixed a minor spacing regression from the MUIv6 update affecting the grid-wrapped strength indicator divs. All elements have been properly centered for consistent alignment.HideShowText:InputPropsis deprecated; changed toslotPropsAlgoliaSearchBar: Cleanup - styles handled by themeSearchBar: A unique implementation of our search (Autocomplete) with custom styling and options container. It will require further cleanup/refactoring at another time.Target release date 🗓️
3/25
Preview 📷
Just a sample - there are lots of instances
How to test 🧪
Verification steps
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅