-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[$250] Rules - Empty area next to "Prevent self-approvals" toggle button opens not here page #56643
Comments
Triggered auto assignment to @lschurr ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Rules - Empty area next to "Prevent self-approvals" toggle button opens not here page What is the root cause of that problem?We are passing an array of menus to App/src/pages/workspace/rules/ExpenseReportRulesSection.tsx Lines 169 to 171 in 1652004
What changes do you think we should make in order to solve the problem?We should pass the submenu items if the the feature is available. We should make similar change for all items that has
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?UI bug What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.The empty area next to "Prevent self-approvals" and "Auto-pay approved reports" toggle button is clickable and opens not here page. What is the root cause of that problem?It starts happens from here, We always show the submenu items then it is hidden behind when
What changes do you think we should make in order to solve the problem?We should only render the
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?None What alternative solutions did you explore? (Optional)NA Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
🚨 Edited by proposal-police: This proposal was edited at 2025-02-11 09:26:52 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Rules - Empty area next to "Prevent self-approvals" toggle button opens not here page What is the root cause of that problem?The Accordion is still clickable when it is collapsed App/src/components/Accordion/index.tsx Lines 65 to 73 in 48520ec
What changes do you think we should make in order to solve the problem?Disable clickable when Accordion is collapsed
function Accordion({isActive, children, duration = 300, isToggleTriggered, style}: AccordionProps) {
const isExpanded = useSharedValue(isActive);
useEffect(() => {
isExpanded.set(isActive);
}, [isExpanded, isActive]);
.
.
.
<View
pointerEvents={isActive ? 'auto' : 'none'}
onLayout={(e) => {
height.set(e.nativeEvent.layout.height);
}}
>
{children}
</View> What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Rules - Empty area next to "Prevent self-approvals" toggle button opens not here page What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
const animatedStyle = useAnimatedStyle(() => {
if (!isToggleTriggered.get() && !isExpanded.get()) {
return {
height: 0,
opacity: 0,
pointerEvents: 'none',
};
}
return {
height: !isToggleTriggered.get() ? undefined : derivedHeight.get(),
opacity: derivedOpacity.get(),
pointerEvents: !isExpanded.get() ? 'none' : 'auto',
};
}); What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~021889343459881874746 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.There are clickable areas next to Prevent self-approvals which opens a not found page. What is the root cause of that problem?The rules are rendered using App/src/pages/workspace/workflows/ToggleSettingsOptionRow.tsx Lines 196 to 202 in 5b05237
In Accordion component, we animate the expand/shrink of the sub menu by controlling the height and opacity style. App/src/components/Accordion/index.tsx Lines 64 to 74 in 5b05237
However, the sub menu item is never unmounted, it's still rendered with 0 height and opacity. In our case, the sub menu item of the "Custom report names" rule is clickable. What changes do you think we should make in order to solve the problem?We have 2 options. First, the simplest one is to apply a This is how it will looks (a bit different from the current one) web.mp4OR Don't render anything when the height is 0. The visible initial value will be from
When the animation to height of 0 is completed, we set the visible state to false. App/src/components/Accordion/index.tsx Lines 33 to 36 in 5b05237
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A |
Upon reviewing the proposals, it makes sense to avoid rendering elements that are not supposed to be visible nor interacted with, so we can move forward with @nkdengineer's proposal here. 🎀👀🎀 C+ reviewed. |
Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@akinwale not rendering the elements will break the animation, could you please check again? |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
I'm no longer able to reproduce the issue. I think it's already been solved. @lschurr I'll leave it to you to handle any payment if needed (probably not needed right?) and close this out. 2025-02-19_10-40-45.mp4 |
Yep, looks like this is fixed. Closing! |
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.96-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): applausetester+4508qpo@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Workspace Settings
Action Performed:
Precondition:
Expected Result:
The empty area next to "Prevent self-approvals" and "Auto-pay approved reports" toggle button is not clickable.
Actual Result:
The empty area next to "Prevent self-approvals" and "Auto-pay approved reports" toggle button is clickable and opens not here page.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/7fcd0db1-dd10-4e23-8eb8-9a0e820e7347

View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @lschurrThe text was updated successfully, but these errors were encountered: