Open lanitochka17 opened 3 days ago
Triggered auto assignment to @yuwenmemon (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
💬 A slack conversation has been started in #expensify-open-source
:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Demoting this as it's pretty minor.
Job added to Upwork: https://www.upwork.com/jobs/~021848826866073504646
Triggered auto assignment to @mallenexpensify (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.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah (External
)
when we calculate opacity for android device, we wrongly compare with isActive prop which is meant for web platforms, on native devices we rely on Index
values of the current tag to select the opacity of the selected tab
isActive
is meant for web platforms and we define it here in the web file below:
https://github.com/Expensify/App/blob/65b739d3befa22d49dec5c142a9fb9745944aa28/src/components/TabSelector/getOpacity/index.ts#L8
We should remove the isActive
check in native file as it is meant for web platforms only:
const getOpacity: GetOpacity = ({routesLength, tabIndex, active, affectedTabs, position}) => {
const activeValue = active ? 1 : 0;
const inactiveValue = active ? 0 : 1;
if (routesLength > 1) {
const inputRange = Array.from({length: routesLength}, (v, i) => i);
return position?.interpolate({
inputRange,
outputRange: inputRange.map((i) => (affectedTabs.includes(tabIndex) && i === tabIndex ? activeValue : inactiveValue)),
});
}
return activeValue;
};
https://github.com/user-attachments/assets/2f0a82e4-9cbb-442f-ad55-c9f75823bb60
Edited by proposal-police: This proposal was edited at 2024-10-22 21:49:27 UTC.
Android -Distance - Distance tab is gray and not highlighted in green when swiping to Distance
useCallback
hook and now the getBackgroundColor
is called unnecessarily whenever the tab items are mapped.useCallback
, the getBackgroundColor
and getOpacity
functions are recreated on every render. This can cause unnecessary recalculations of the background and opacity interpolations, which might cause issues with how Android handles these animations.getOpacity
& getBackgroundColor
at the top level of the component (outside the map function).useCallback
hook.Reviewing 👀
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.52-2 Reproducible in staging?: Y Reproducible in production?: N If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): applausetester+kh1610015@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Distance tab will be highlighted in green when swiping to Distance tab (production behavior)
Actual Result:
Distance tab is gray and not highlighted in green when swiping to Distance tab The tab is only green when it is tapped on This issue also happens in Scan tab when it is swiped from Distance to Scan
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/9d158542-d61b-4a29-af0b-2b8795ade7d6
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @rayane-djouah