Skip to content

Fire Mode: Duck.ai and input widget theme overlay#8725

Merged
0nko merged 14 commits into
developfrom
feature/ondrej/fire-mode-search-duckchat-input-theme
Jun 12, 2026
Merged

Fire Mode: Duck.ai and input widget theme overlay#8725
0nko merged 14 commits into
developfrom
feature/ondrej/fire-mode-search-duckchat-input-theme

Conversation

@0nko

@0nko 0nko commented May 30, 2026

Copy link
Copy Markdown
Member

Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1215242220281929?focus=true

Description

Adds Fire mode theme overlays for Duck.ai screens and widgets.

Figma link: https://www.figma.com/design/9S33EK9qIxZdN1FOIFHM5W/%F0%9F%94%A5-Fire-Mode-Tabs--iOS-Android-?node-id=1846-13998&m=dev

Steps to test this PR

  • Enable the Fire tabs FF in dev settings
  • Make sure Search & Duck.ai option is selected in AI settings
  • Make sure the Light mode is set on a test device
  • In the Tab switcher, switch to Fire mode
  • Go back to the browser
  • Verify that the browser is using the light mode but the native input widget is using dark mode colors
  • Verify the action buttons are using the Fire mode orange colors
  • Switch to dark mode on the device
  • Verify the dark mode theme is used everywhere

Note

Low Risk
Theming and layout attribute changes across browser and Duck.ai UI with no auth or data logic; regression risk is visual (Fire vs normal themes, light Fire card contrast).

Overview
Introduces daxInputModeCardThemeOverlay so Duck.ai / native input cards can pick up Fire styling independently of the rest of the screen. In light Fire mode, light Fire sets ThemeOverlay.DuckDuckGo.InputModeCard.DarkFire on the card while the activity stays on the light Fire theme—matching the Figma split (light browser chrome, dark input card, orange accents).

Fire accents are centralized on new daxColorFireModeAccent* and daxColorOmnibarAccentContent theme attrs; Fire themes and omnibar overlays now reference those instead of hard-coded mandarin colors. Input cards and send/outline controls switch from blue primary button colors to daxColorOmnibarAccent / daxColorOmnibarAccentContent.

InputScreenActivity applies the Fire theme when BrowserMode.FIRE; bottom-bar InputScreenButtons are inflated with the card’s themed context via new InputModeWidget.cardContext. Omnibar tracker animations and privacy shield rendering force the dark variant in Fire mode; the tab switcher icon uses ?attr/daxIconTabSwitcher.

Reviewed by Cursor Bugbot for commit 9465d5b. Bugbot is set up for automated code reviews on this repo. Configure here.

@0nko 0nko mentioned this pull request May 30, 2026
23 tasks

0nko commented May 30, 2026

Copy link
Copy Markdown
Member Author

@0nko 0nko force-pushed the feature/ondrej/fire-mode-fire-theme branch from 512e75b to cd5a7f4 Compare June 1, 2026 08:18
@0nko 0nko force-pushed the feature/ondrej/fire-mode-search-duckchat-input-theme branch 2 times, most recently from aa7ba88 to b8d29a5 Compare June 1, 2026 09:28
@0nko 0nko force-pushed the feature/ondrej/fire-mode-fire-theme branch from cd5a7f4 to 9902db7 Compare June 1, 2026 09:28
Comment thread duckchat/duckchat-impl/src/main/res/layout/view_native_input_screen_buttons.xml Outdated
@0nko 0nko force-pushed the feature/ondrej/fire-mode-fire-theme branch from 9902db7 to f283aa0 Compare June 2, 2026 15:40
@0nko 0nko force-pushed the feature/ondrej/fire-mode-search-duckchat-input-theme branch from e607eec to 4ead19a Compare June 2, 2026 15:41
@0nko 0nko mentioned this pull request Jun 2, 2026
10 tasks
Comment thread duckchat/duckchat-impl/src/main/res/layout/view_native_input_screen_buttons.xml Outdated
@0nko 0nko force-pushed the feature/ondrej/fire-mode-fire-theme branch from f283aa0 to 8adda28 Compare June 5, 2026 20:13
@0nko 0nko force-pushed the feature/ondrej/fire-mode-search-duckchat-input-theme branch from 4ead19a to 605d6de Compare June 5, 2026 20:13
@0nko 0nko force-pushed the feature/ondrej/fire-mode-fire-theme branch from 8adda28 to ab607e5 Compare June 9, 2026 13:58
@0nko 0nko force-pushed the feature/ondrej/fire-mode-search-duckchat-input-theme branch from 605d6de to 09cf304 Compare June 9, 2026 13:58

@malmstein malmstein 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.

did not install or smoke-test the APK — static-only. nice follow-up to #8714: pulling the hardcoded mandarin50/40 values into semantic daxColorFireModeAccent* attrs and adding the daxInputModeCardThemeOverlay "dark island" overlay for the Duck.ai and input-widget cards is clean and consistent with the omnibar overlay pattern. the NativeInputOmnibarController switch to resolving daxColorWindow from the card's themed context (instead of the outer ctx) is the right fix to make the overlay actually take. this also addresses the raw-hex-in-the-theming-file nit I raised on #8714.

no blockers. one question worth a reply before merge: the input-mode-switch card's focus stroke stays daxColorAccentBlue under the fire overlay — looks like it'd read blue in fire mode. the tab-button dimension flip and the palette-file split are minor.

since I haven't run it, I'd smoke-test the input widget and Duck.ai card in both light/dark fire mode before approving — especially the stroke colour.

<color name="mandarin80">#671907</color>
<color name="mandarin90">#47140B</color>
<color name="mandarin100">#290E0A</color>
<color name="mandarin40_translucent">#33FF8D5C</color>

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.

we moved omnibar_card_fire_light/dark into design-system-colors.xml but the mandarin*_translucent pair landed here in the rebrand file — can we keep them together so the fire palette lives in one place?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the split is following the existing two-file convention rather than being accidental: mandarin40/50_translucent are mandarin-scale colours (the mandarin hue at 20% alpha), so they sit in the Mandarin block next to mandarin40/50 in the rebrand palette file. omnibar_card_fire_light/dark aren't part of any named scale (they're bespoke surface greys), so they live in design-system-colors.xml alongside the other raw one-offs like background_omnibar_shadow. moving either group to join the other would pull it out of its conventional home — but if you'd prefer discoverability over the convention, i can add a <!-- Fire mode --> grouping comment or co-locate them. let me know.

android:id="@+id/tabsImageView"
android:layout_width="@dimen/bottomNavIcon"
android:layout_height="@dimen/bottomNavIcon"
android:layout_width="@dimen/toolbarIcon"

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.

deleting the :app copy means this browser-ui layout now wins, and it also changes the ImageView from bottomNavIcon (24dp) to toolbarIcon (40dp). scaleType="center" keeps the drawable at its intrinsic size so it's mostly invisible, but is the dimension change intentional or just fallout from dropping the duplicate?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

intentional — it's needed for the fire-mode icon rather than fallout from dropping the duplicate. daxIconTabSwitcher resolves to ic_tab_fire_mode_24 in fire mode, which is 24×30dp (taller than the 24×24 ic_tab_24). with scaleType="center" the drawable renders at its intrinsic size, so at bottomNavIcon (24dp) the 30dp-tall fire icon clips ~3dp top and bottom; toolbarIcon (40dp) gives it room. the default and highlighted icons are 24×24, which is why the change looks like a no-op for them. the view is match_parent inside a toolbarIcon-sized button either way, so the tab count doesn't shift.

android:clipToPadding="false"
android:theme="?attr/daxInputModeCardThemeOverlay"
app:cardElevation="0dp"
app:strokeColor="?attr/daxColorAccentBlue"

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.

the card now gets daxInputModeCardThemeOverlay, but strokeColor is still pinned to daxColorAccentBlue and the DarkFire overlay only remaps daxColorOmnibarAccent, not daxColorAccentBlue — so the outline stays blue in fire mode while the rest of the card goes orange. is that intended, or should the stroke follow the fire accent too?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

good catch — fixed. the stroke now uses ?attr/daxColorOmnibarAccent instead of daxColorAccentBlue. in the base themes daxColorOmnibarAccent already resolves to daxColorAccentBlue, so non-fire modes are unchanged, and the InputModeCard.DarkFire overlay remaps daxColorOmnibarAccent to the fire accent — so the outline now follows the card into orange. i applied the same change to the two sibling cards that get the overlay in this PR (fragment_contextual_duck_ai.xml and view_native_input_mode_switch_widget.xml, the latter via its :app host) since they had the identical blue-pinned stroke.

@0nko 0nko force-pushed the feature/ondrej/fire-mode-fire-theme branch from 136f0b4 to f3b79d4 Compare June 11, 2026 09:25
@0nko 0nko force-pushed the feature/ondrej/fire-mode-search-duckchat-input-theme branch from 09cf304 to e8ca846 Compare June 11, 2026 09:29

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e8ca846. Configure here.

@0nko 0nko requested a review from malmstein June 11, 2026 10:57
@malmstein

Copy link
Copy Markdown
Contributor

The toggle in the Tab Manager doesn’t look right. We discussed this offline and @0nko will fix it in a separate PR
Screenshot_20260611_141441

@malmstein malmstein 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.

re-review after the five new commits, approving. built the branch locally and installed on a Pixel 7 — it launches healthy with no crash; the device dropped off adb before I could drive into Fire mode, so I didn't get to eyeball the fire theming on-device (stacked PR, no CI APK, fire surfaces need an internal build with the flag on anyway). both of my substantive comments are addressed: the input-card focus strokes now follow daxColorOmnibarAccent so they go orange in Fire mode, and the fire palette colors moved into their semantically correct files. the new daxColorFireModeAccent* / daxColorOmnibarAccentContent attrs are a clean way to handle the accent and the icon-contrast-in-dark-fire case, and the InputModeCard.DarkFire overlay overriding the content colour back to white is exactly right for the dark-card-in-light-app case.

only leftover is the minor one inlined: the tab-switcher button's 24dp→40dp dimension flip from deleting the :app layout — muted by scaleType="center", just worth confirming it's intentional. nothing blocking.

android:id="@+id/tabsImageView"
android:layout_width="@dimen/bottomNavIcon"
android:layout_height="@dimen/bottomNavIcon"
android:layout_width="@dimen/toolbarIcon"

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.

still leaving this from last round so it isn't lost: deleting the :app copy of this layout means this browser-ui one wins, and it also changes the ImageView from bottomNavIcon (24dp) to toolbarIcon (40dp). scaleType="center" keeps the drawable at its intrinsic size so it's mostly invisible, but is the dimension change intentional or just fallout from dropping the duplicate?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

intentional, not fallout. daxIconTabSwitcher resolves to ic_tab_fire_mode_24 in fire mode, which is 24×30dp — taller than the 24×24 ic_tab_24/ic_tab_24_highlighted. with scaleType="center" the drawable draws at its intrinsic size, so a 24dp (bottomNavIcon) container clips the fire icon ~3dp top and bottom; toolbarIcon (40dp) gives it room. the default/highlighted icons are 24×24, which is why it reads as a no-op for them. (re-posting here since the threaded reply from last round landed on the now-outdated thread.)

Base automatically changed from feature/ondrej/fire-mode-fire-theme to develop June 12, 2026 10:44
@0nko

0nko commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

The toggle and the animation background color have both been fixed.

@0nko 0nko force-pushed the feature/ondrej/fire-mode-search-duckchat-input-theme branch from 70eaff9 to 9465d5b Compare June 12, 2026 19:14
@0nko 0nko merged commit e701d55 into develop Jun 12, 2026
13 checks passed
@0nko 0nko deleted the feature/ondrej/fire-mode-search-duckchat-input-theme branch June 12, 2026 19:42
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