You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Payment due 11-9] [$250] FAB - FAB shows the contrasting color when hovered after changing app theme #72890
Version Number: 9.2.33-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#72714 Email or phone of affected tester (no customers):sdjoisnjdsonsjndos@gmail.com Issue reported by: Applause Internal Team Device used: Mac 15.5 / Chrome App Component: Other
Action Performed:
Go to staging.new.expensify.com
Go to Account > Preferences.
Click Theme.
Select the other theme (If dark, then light. If light, then dark).
Hover over FAB + button.
Expected Result:
FAB will not show the contrasting color when hovered after changing app theme.
Actual Result:
FAB shows the contrasting color when hovered after changing app theme.
When hovering, backgroundColor is directly overridden on top of animatedStyle, and when the hover ends, it resets to the initial.backgroundColor value from animatedStyle. This initial value doesn’t change even when the value inside useAnimatedStyle updates.
Please re-state the problem that we are trying to solve in this issue.
When a user changes the app theme (light ↔ dark) in Account > Preferences > Theme, the FAB + button shows the wrong hover color - it displays the old theme's hover color instead of the new theme's hover color.
What is the root cause of that problem?
The animatedStyle worklet (lines 70-77) captures the theme color values (buttonDefaultBG and buttonHoveredBG) when it's first created. These captured values are used in interpolateColor to animate the backgroundColor based on the isActive state. When the theme changes, the component re-renders with new theme colors, but the worklet continues using the old captured colors.
At line 120, the style array applies both:
animatedStyle - with old theme colors baked into the worklet
hovered && {backgroundColor: buttonHoveredBG} - with new theme colors
This creates a conflict where hovering applies the new color, but the underlying animated backgroundColor still uses old colors, resulting in the contrasting color bug.
What changes do you think we should make in order to solve the problem?
Remove backgroundColor interpolation from animatedStyle and handle backgroundColor separately based on hover state using current theme values.
changed the title [-]FAB - FAB shows the contrasting color when hovered after changing app theme[/-][+][$250] FAB - FAB shows the contrasting color when hovered after changing app theme[/+]on Oct 20, 2025
changed the title [-][$250] FAB - FAB shows the contrasting color when hovered after changing app theme[/-][+][Payment due 11-9] [$250] FAB - FAB shows the contrasting color when hovered after changing app theme[/+]on Nov 5, 2025
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: no offending PR
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Oct 17, 2025
Triggered auto assignment to @Christinadobrzyn (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.dmkt9 commentedon Oct 18, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
FAB shows the contrasting color when hovered after changing app theme.
What is the root cause of that problem?
backgroundColoris set insideanimatedStyle.App/src/components/FloatingActionButton.tsx
Lines 70 to 77 in 10e9cd3
When hovering,
backgroundColoris directly overridden on top ofanimatedStyle, and when the hover ends, it resets to theinitial.backgroundColorvalue fromanimatedStyle. Thisinitialvalue doesn’t change even when the value insideuseAnimatedStyleupdates.App/src/components/FloatingActionButton.tsx
Lines 119 to 120 in 10e9cd3
What changes do you think we should make in order to solve the problem?
When not active, we should explicitly override the
backgroundColorfromanimatedStyle.App/src/components/FloatingActionButton.tsx
Lines 119 to 120 in 10e9cd3
What alternative solutions did you explore? (Optional)
Instead of directly overriding on hover, we update the
backgroundColorthrough changes inanimatedStyle.App/src/components/FloatingActionButton.tsx
Lines 70 to 71 in 10e9cd3
App/src/components/FloatingActionButton.tsx
Lines 118 to 120 in 10e9cd3
2025-10-18.15-16-00.mp4
abbasifaizan70 commentedon Oct 18, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user changes the app theme (light ↔ dark) in Account > Preferences > Theme, the FAB + button shows the wrong hover color - it displays the old theme's hover color instead of the new theme's hover color.
What is the root cause of that problem?
The
animatedStyleworklet (lines 70-77) captures the theme color values (buttonDefaultBGandbuttonHoveredBG) when it's first created. These captured values are used ininterpolateColorto animate the backgroundColor based on theisActivestate. When the theme changes, the component re-renders with new theme colors, but the worklet continues using the old captured colors.At line 120, the style array applies both:
animatedStyle- with old theme colors baked into the worklethovered && {backgroundColor: buttonHoveredBG}- with new theme colorsThis creates a conflict where hovering applies the new color, but the underlying animated backgroundColor still uses old colors, resulting in the contrasting color bug.
What changes do you think we should make in order to solve the problem?
Remove backgroundColor interpolation from
animatedStyleand handle backgroundColor separately based on hover state using current theme values.src/components/FloatingActionButton.tsx
Change 1 - Lines 70-77: Remove backgroundColor from animation
const animatedStyle = useAnimatedStyle(() => { - const backgroundColor = interpolateColor(sharedValue.get(), [0, 1], [buttonDefaultBG, buttonHoveredBG]); - return { transform: [{rotate: `${sharedValue.get() * 135}deg`}], - backgroundColor, }; });Change 2 - Line 120: Always set backgroundColor based on current theme
<Animated.View style={[ styles.floatingActionButton, {borderRadius}, styles.floatingActionButtonSmall, + {backgroundColor: hovered ? buttonHoveredBG : buttonDefaultBG}, animatedStyle, - hovered && {backgroundColor: buttonHoveredBG} ]} testID="fab-animated-container" >This separates concerns: the animation handles rotation, while backgroundColor is controlled by hover state using current theme values.
Alternative
Add dependency array
[buttonDefaultBG, buttonHoveredBG]touseAnimatedStyleThis approach attempts to recreate the worklet when theme colors change. However, it still causes the same issue because:
animatedStyleand the hover style simultaneously try to control backgroundColoranimatedStylefirst, then the hover styleOutput Video
https://www.loom.com/share/735f981268044057a20949c750bdcd41?sid=3fdf75d0-7d32-4bd7-89e7-f565422a0a24
[-]FAB - FAB shows the contrasting color when hovered after changing app theme[/-][+][$250] FAB - FAB shows the contrasting color when hovered after changing app theme[/+]melvin-bot commentedon Oct 20, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021980409101764896340
melvin-bot commentedon Oct 20, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @FitseTLT (
External)14 remaining items
dmkt9 commentedon Oct 25, 2025
The PR is ready.
Christinadobrzyn commentedon Oct 28, 2025
following - #73479
Christinadobrzyn commentedon Nov 5, 2025
The PR was just merged yesterday. Payment will be 11-9
[-][$250] FAB - FAB shows the contrasting color when hovered after changing app theme[/-][+][Payment due 11-9] [$250] FAB - FAB shows the contrasting color when hovered after changing app theme[/+]Christinadobrzyn commentedon Nov 5, 2025
@FitseTLT do we need a regression test for this?
FitseTLT commentedon Nov 5, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: no offending PR
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/566711
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Christinadobrzyn commentedon Nov 10, 2025
Payment summary wasn't deployed for this
Payment Summary
Contributor: @dmkt9 paid $250 via Upwork (https://www.upwork.com/nx/wm/offer/109459491) PAID
Contributor+: @FitseTLT due $250 via Upwork (Paid)
@dmkt9 how are you paid?
dmkt9 commentedon Nov 11, 2025
@Christinadobrzyn Thanks. I still received the payment from Upwork.
Christinadobrzyn commentedon Nov 13, 2025
Thanks @dmkt9! Can you please accept this offer? https://www.upwork.com/nx/wm/offer/109459491
dmkt9 commentedon Nov 13, 2025
@Christinadobrzyn I've just requested payment. Thanks.
Christinadobrzyn commentedon Nov 13, 2025
Thanks @dmkt9!
Payment summary here - #72890 (comment)
Regression test here - #72890 (comment)
Closing