Skip to content

Fix autocomplete and select dropdown menu transparency issue in acrylic themes and WSO2 logo icon not visible#508

Merged
jeradrutnam merged 3 commits intowso2:mainfrom
jeradrutnam:main
Mar 17, 2026
Merged

Fix autocomplete and select dropdown menu transparency issue in acrylic themes and WSO2 logo icon not visible#508
jeradrutnam merged 3 commits intowso2:mainfrom
jeradrutnam:main

Conversation

@jeradrutnam
Copy link
Copy Markdown
Member

@jeradrutnam jeradrutnam commented Mar 17, 2026

This pull request addresses UI consistency and branding improvements across the Oxygen UI packages and the sample app. The most significant changes include fixing dropdown menu backgrounds for better visual clarity, updating the WSO2 logo usage, and improving the language selector component for a more modern user experience.

UI Theme and Component Improvements:

  • Adjusted the AcrylicBaseTheme in oxygen-ui to use more transparent backgrounds for paper and acrylic surfaces, and updated the MuiPopover and new MuiAutocomplete overrides to ensure dropdown menus have consistent backgrounds and blur effects. This fixes the dropdown menu background issue. [1] [2] [3]

  • Updated the language selector in the SettingsPage sample to use the Autocomplete component instead of Select, providing a more modern and user-friendly dropdown. [1] [2]

Branding and Icon Updates:

  • Updated the WSO2 logo icon usage in the sample app's footer and imports, ensuring consistent branding and improved visual presentation. [1] [2]

  • Changed the header title from "Developer" to "Console" for more accurate branding in the sample app.

Build and Logging Enhancements:

  • Added clearer logging output in the icon build script to indicate successful icon generation and export locations.

Release Notes:

  • Added a changeset to document the patch updates for the affected packages, summarizing the dropdown and logo fixes.

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed dropdown menu background appearance
    • Fixed WSO2 logo icon display
  • New Features

    • Replaced language selector with searchable autocomplete control for better usability
    • Enhanced dropdown menus with visual blur effects
  • Style

    • Adjusted background colors and transparency values across light and dark themes
    • Updated branding text in app header

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 17, 2026

Walkthrough

This pull request includes version bump metadata, linting comment additions, theme color adjustments for improved transparency and backdrop effects, and UI updates to the sample application including header branding and language selection component replacement.

Changes

Cohort / File(s) Summary
Package Release Metadata
.changeset/strict-regions-judge.md
Version bump changeset for three packages with fixes for dropdown menu background and WSO2 logo icon.
Build Configuration
packages/oxygen-ui-icons-react/scripts/build-icons.js
Added eslint-disable-next-line comments to suppress linting warnings on console.log statements.
Theme Styling
packages/oxygen-ui/src/styles/Themes/AcrylicBaseTheme.ts
Updated background color transparency values in light and dark modes; added backdrop filter effects to MuiPopover and MuiAutocomplete paper components with updated color properties.
Sample Application UI
samples/oxygen-ui-test-app/src/layouts/AppLayout.tsx, samples/oxygen-ui-test-app/src/pages/SettingsPage.tsx
Header branding text changed to "Console"; footer updated with WSO2 icon and copyright layout; language selection component replaced from Select to Autocomplete with value-based option binding.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit hops through colors bright,
Adjusting hues from dark to light,
With autocomplete and backdrop blur,
The UI changes start to stir,
WSO2 badges now do gleam,
Making samples fulfill their dream! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the main changes but does not follow the repository's template structure with required sections like Purpose, Related Issues, Checklist, and Security checks. Reformat the description to match the required template by adding Purpose, Related Issues, Related PRs, Checklist, and Security checks sections with appropriate checkboxes and details.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main issues fixed in this PR: dropdown menu transparency in acrylic themes and WSO2 logo icon visibility, accurately reflecting the primary changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can customize the high-level summary generated by CodeRabbit.

Configure the reviews.high_level_summary_instructions setting to provide custom instructions for generating the high-level summary.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/oxygen-ui/src/styles/Themes/AcrylicBaseTheme.ts (1)

204-221: Consider extracting shared acrylic paper styles to avoid drift.

MuiPopover.paper and MuiAutocomplete.paper now duplicate the same style object; a shared helper would reduce maintenance overhead.

♻️ Optional refactor
+const getAcrylicOverlayPaper = (theme: OxygenTheme) => ({
+  backgroundColor: theme.vars!.palette.background.paper,
+  WebkitBackdropFilter: theme.blur.medium,
+  backdropFilter: theme.blur.medium,
+  backgroundImage: 'none',
+});

...
    MuiPopover: {
      styleOverrides: {
-        paper: ({ theme }: { theme: OxygenTheme }) => ({
-          backgroundColor: theme.vars!.palette.background.paper,
-          WebkitBackdropFilter: theme.blur.medium,
-          backdropFilter: theme.blur.medium,
-          backgroundImage: 'none',
-        })
+        paper: ({ theme }: { theme: OxygenTheme }) => getAcrylicOverlayPaper(theme),
      }
    },
    MuiAutocomplete: {
      styleOverrides: {
-        paper: ({ theme }: { theme: OxygenTheme }) => ({
-          backgroundColor: theme.vars!.palette.background.paper,
-          WebkitBackdropFilter: theme.blur.medium,
-          backdropFilter: theme.blur.medium,
-          backgroundImage: 'none',
-        })
+        paper: ({ theme }: { theme: OxygenTheme }) => getAcrylicOverlayPaper(theme),
       }
     },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/oxygen-ui/src/styles/Themes/AcrylicBaseTheme.ts` around lines 204 -
221, Extract the duplicated acrylic paper style object used in MuiPopover.paper
and MuiAutocomplete.paper into a single shared helper (e.g., acrylicPaperStyles
or getAcrylicPaperStyles) inside AcrylicBaseTheme.ts and have both
styleOverrides call that helper with the theme param; update the MuiPopover: {
styleOverrides: { paper: ({ theme }: { theme: OxygenTheme }) =>
acrylicPaperStyles(theme) } } and MuiAutocomplete: { styleOverrides: { paper: ({
theme }: { theme: OxygenTheme }) => acrylicPaperStyles(theme) } } so the
backgroundColor, WebkitBackdropFilter, backdropFilter and backgroundImage are
defined in one place and reused to prevent drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@samples/oxygen-ui-test-app/src/pages/SettingsPage.tsx`:
- Around line 300-324: Extract the options array into a top-level constant
(e.g., LANGUAGE_OPTIONS) and use it for the Autocomplete's options prop; compute
the controlled value by finding the matching option object from LANGUAGE_OPTIONS
using appearanceSettings.language rather than creating an inline object; and add
an isOptionEqualToValue prop (e.g., (option, value) => option.value ===
value.value) to the Autocomplete so MUI can correctly match the selected value,
then keep the existing onChange to call setAppearanceSettings and handleChange.

---

Nitpick comments:
In `@packages/oxygen-ui/src/styles/Themes/AcrylicBaseTheme.ts`:
- Around line 204-221: Extract the duplicated acrylic paper style object used in
MuiPopover.paper and MuiAutocomplete.paper into a single shared helper (e.g.,
acrylicPaperStyles or getAcrylicPaperStyles) inside AcrylicBaseTheme.ts and have
both styleOverrides call that helper with the theme param; update the
MuiPopover: { styleOverrides: { paper: ({ theme }: { theme: OxygenTheme }) =>
acrylicPaperStyles(theme) } } and MuiAutocomplete: { styleOverrides: { paper: ({
theme }: { theme: OxygenTheme }) => acrylicPaperStyles(theme) } } so the
backgroundColor, WebkitBackdropFilter, backdropFilter and backgroundImage are
defined in one place and reused to prevent drift.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2b4e28d8-de0f-445e-b761-6a3f2050c2cd

📥 Commits

Reviewing files that changed from the base of the PR and between 53fbadb and 3e66854.

⛔ Files ignored due to path filters (1)
  • packages/oxygen-ui-icons-react/icons/wso2.svg is excluded by !**/*.svg
📒 Files selected for processing (5)
  • .changeset/strict-regions-judge.md
  • packages/oxygen-ui-icons-react/scripts/build-icons.js
  • packages/oxygen-ui/src/styles/Themes/AcrylicBaseTheme.ts
  • samples/oxygen-ui-test-app/src/layouts/AppLayout.tsx
  • samples/oxygen-ui-test-app/src/pages/SettingsPage.tsx

Comment on lines +300 to +324
<Autocomplete
value={{ value: appearanceSettings.language, label: {
en: 'English',
es: 'Spanish',
fr: 'French',
de: 'German',
ja: 'Japanese',
zh: 'Chinese'
}[appearanceSettings.language] || 'English' }}
onChange={(_, newValue) => {
if (newValue) {
setAppearanceSettings({ ...appearanceSettings, language: newValue.value })
handleChange()
}
}}
>
<MenuItem value="en">English</MenuItem>
<MenuItem value="es">Spanish</MenuItem>
<MenuItem value="fr">French</MenuItem>
<MenuItem value="de">German</MenuItem>
<MenuItem value="ja">Japanese</MenuItem>
<MenuItem value="zh">Chinese</MenuItem>
</Select>
options={[
{ value: 'en', label: 'English' },
{ value: 'es', label: 'Spanish' },
{ value: 'fr', label: 'French' },
{ value: 'de', label: 'German' },
{ value: 'ja', label: 'Japanese' },
{ value: 'zh', label: 'Chinese' }
]}
renderInput={(params) => <TextField {...params} />}
/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n -A35 -B5 '^\s*<Autocomplete' samples/oxygen-ui-test-app/src/pages/SettingsPage.tsx
rg -n 'isOptionEqualToValue' samples/oxygen-ui-test-app/src/pages/SettingsPage.tsx

Repository: wso2/oxygen-ui

Length of output: 2009


🌐 Web query:

Material-UI Autocomplete isOptionEqualToValue object options required

💡 Result:

When Autocomplete options are objects, MUI’s default equality check is basically reference equality (option === value). If your controlled value comes from elsewhere (API, form state, re-created objects), it won’t be the same object instance as the one in options, so MUI can’t “match” it and may warn: “The value provided to Autocomplete is invalid…”. MUI recommends providing isOptionEqualToValue in this case. [1]

Use a stable key (typically an id) and also provide getOptionLabel:

<Autocomplete
  options={users}
  value={selectedUser}          // should be a user object or null
  getOptionLabel={(o) => o.name ?? ""}   // must return a string
  isOptionEqualToValue={(option, value) => option.id === value.id}
  onChange={(_, v) => setSelectedUser(v)}
  renderInput={(params) => <TextField {...params} label="User" />}
/>

Notes:

  • For “no selection”, set value={null} (not "") to avoid the invalid-value warning. [2]
  • If you intend values that don’t exist in options, consider freeSolo. [1]

Sources: MUI Autocomplete docs [1], Stack Overflow discussion of the invalid-value warning and using null [2].


🏁 Script executed:

#!/bin/bash
# Check if getOptionLabel is used anywhere in this component
rg -n -B2 -A2 'getOptionLabel' samples/oxygen-ui-test-app/src/pages/SettingsPage.tsx

# Check the component structure to see if there are other similar Autocomplete instances
rg -n 'Autocomplete' samples/oxygen-ui-test-app/src/pages/SettingsPage.tsx

Repository: wso2/oxygen-ui

Length of output: 114


Add isOptionEqualToValue and extract language options to prevent unstable value matching.

The value object is recreated on every render (inline object literal), and options array is also recreated on every render (inline array literal). Without isOptionEqualToValue, MUI's default reference equality check (===) will fail to match the value to any option, causing invalid-value warnings and unstable selection behavior.

Extract LANGUAGE_OPTIONS to a constant outside the component or render scope, find the matching option object for the controlled value, and provide isOptionEqualToValue to enable proper equality comparison:

Proposed fix
+const LANGUAGE_OPTIONS = [
+  { value: 'en', label: 'English' },
+  { value: 'es', label: 'Spanish' },
+  { value: 'fr', label: 'French' },
+  { value: 'de', label: 'German' },
+  { value: 'ja', label: 'Japanese' },
+  { value: 'zh', label: 'Chinese' },
+]

...
-                    <Autocomplete
-                      value={{ value: appearanceSettings.language, label: {
-                        en: 'English',
-                        es: 'Spanish',
-                        fr: 'French',
-                        de: 'German',
-                        ja: 'Japanese',
-                        zh: 'Chinese'
-                      }[appearanceSettings.language] || 'English' }}
+                    <Autocomplete
+                      value={
+                        LANGUAGE_OPTIONS.find((opt) => opt.value === appearanceSettings.language)
+                        ?? LANGUAGE_OPTIONS[0]
+                      }
+                      isOptionEqualToValue={(option, value) => option.value === value.value}
                       onChange={(_, newValue) => {
-                        if (newValue) {
-                          setAppearanceSettings({ ...appearanceSettings, language: newValue.value })
-                          handleChange()
-                        }
+                        if (!newValue) return
+                        setAppearanceSettings({ ...appearanceSettings, language: newValue.value })
+                        handleChange()
                       }}
-                      options={[
-                        { value: 'en', label: 'English' },
-                        { value: 'es', label: 'Spanish' },
-                        { value: 'fr', label: 'French' },
-                        { value: 'de', label: 'German' },
-                        { value: 'ja', label: 'Japanese' },
-                        { value: 'zh', label: 'Chinese' }
-                      ]}
+                      options={LANGUAGE_OPTIONS}
                       renderInput={(params) => <TextField {...params} />}
                     />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@samples/oxygen-ui-test-app/src/pages/SettingsPage.tsx` around lines 300 -
324, Extract the options array into a top-level constant (e.g.,
LANGUAGE_OPTIONS) and use it for the Autocomplete's options prop; compute the
controlled value by finding the matching option object from LANGUAGE_OPTIONS
using appearanceSettings.language rather than creating an inline object; and add
an isOptionEqualToValue prop (e.g., (option, value) => option.value ===
value.value) to the Autocomplete so MUI can correctly match the selected value,
then keep the existing onChange to call setAppearanceSettings and handleChange.

@jeradrutnam jeradrutnam merged commit 6cbf04f into wso2:main Mar 17, 2026
6 checks passed
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.

2 participants