-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] Settings - When navigated to wallet page, blue bubble selection option is shown. #41197
Comments
Triggered auto assignment to @JmillsExpensify ( |
We think this issue might be related to the #vip-vsb. |
Adding this to #vip-split and opening up to the community. |
Job added to Upwork: https://www.upwork.com/jobs/~01626cae18fdbd316c |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane ( |
@JmillsExpensify, @sobitneupane Eep! 4 days overdue now. Issues have feelings too... |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@JmillsExpensify, @sobitneupane 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
Waiting Proposal |
@JmillsExpensify @sobitneupane this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@JmillsExpensify, @sobitneupane Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Still waiting for proposals |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
ProposalPlease re-state the problem that we are trying to solve in this issue.When navigated to wallet page, blue bubble selection option is shown. What is the root cause of that problem?I believe that when we push new route in the navigation stack, the old page (with all of the components) still exist in the document tree. We can see the in the Chrome DevTools Hence we can still see the selection even if we move to another screen like in the issue description. If the navigation some how remove the HTML tags from the document tree, we won't see the selection state again. What changes do you think we should make in order to solve the problem?OLD SOLUTION WHICH CAUSES REGRESSIONIf the navigation state change, we should clear out the selection in the window. This can be done in the const handleStateChange = (state: NavigationState | undefined) => {
..... // other stuff
// We want to clear the selection in the window
window.getSelection()?.removeAllRanges();
}; [NEW SOLUTION] Draft PR: #43456 If the navigation state change, we should clear out the selection in the window. This can be done in the const handleStateChange = (state: NavigationState | undefined) => {
..... // other stuff
// We want to clear the selection in the window
clearRedundantSelectionRange();
}; The point is const selection = window.getSelection();
if(!selection || !selection.rangeCount) {
return;
}
let rangesNeedToBeRemove: Range[] = [];
for(let i = 0 ; i < selection.rangeCount; ++i) {
const range = selection.getRangeAt(i);
if(!shouldThisRangeBeRemoved(range)) {
continue;
}
rangesNeedToBeRemove.push(range);
}
rangesNeedToBeRemove.forEach((range) => {
selection.removeRange(range);
}); Since the original issue is related to a feature in Chrome called To check that, we'll need find the closest ancestor of the In case we could find that shouldThisRangeBeRemoved(range) {
const node = range.commonAncestorContainer as HTMLElement
// w
let ancestorNodeToCheck = node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;
while(ancestorNodeToCheck && ancestorNodeToCheck.nodeType !== Node.ELEMENT_NODE) {
ancestorNodeToCheck = ancestorNodeToCheck.parentElement;
}
// couldn't find closest ancestor node that is an element node
if(!ancestorNodeToCheck) {
return document.designMode.toLowerCase() !== 'on'
}
const nodeName = ancestorNodeToCheck.nodeName.toLowerCase();
if(nodeName === 'input' || nodeName === 'textarea' || ancestorNodeToCheck.isContentEditable) {
return false;
}
} Result: android-8MB.mp4In case the selection range is from the Composor, it won't be cleared aw8.mp4What alternative solutions did you explore? (Optional)N/A |
Thanks for the proposal @dominictb It looks like you're new to Expensify. Welcome!
As per the contributing guidelines, new contributor can only work on one issue at a time. Please let me know if you are assigned to a closed issue or an open issue with the |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-06-20. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
It would be great if you guys can explain this. I believe that the risks have already been outweighs the rewards from the beginning, it's just that my initial solution is so naive/simple that I(or we) overlook the risks. But in the second solution, I had fine-tuned the mechanism in the first solution, but not merely based on the regression bug we had, but with careful consideration of other factors to cover all of the scenarios (as I have explained above). What I'm trying to say is that the second solution is not a reaction to the recent regression, but a well-calibrated one which I (somehow) overlooked when proposing the initial solution, so it shouldn't counted as an temporary workaround for the regression, but a (probably) complete solution to this issue without causing any further regression. With that in mind, I believe that it's worth pursuing the second solution as the calculated risks have been lowered. I'm happy with any final decision, but it would be nice to understand thoroughly why we shouldn't go forward with the new solution I proposed. |
I'm unassigning since I'm headed out on extended leave after today. If you need input from another internal engineer feel free to do the 🎀 trick! 👋 |
Payment Summary
BugZero Checklist (@JmillsExpensify)
|
I agree with Amy. I've updated the payment summary above to reflect a payout of $125. |
@dominictb mind sharing your Upwork profile so that I can invite you to the Upwork job? The previous one expired. |
@JmillsExpensify Sure, here's my profile link on Upwork: https://www.upwork.com/freelancers/~01f70bed1934fd35d5 |
Offer sent |
All paid out! @sobitneupane please complete the checklist and request payments in NewDot. |
Whoops @dominictb I'm still waiting for you to accept the offer in Upwork. |
@JmillsExpensify I accepted it, TY |
All paid out! |
Confirming payment summary as follows:
|
$125 approved for @sobitneupane |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.67-0
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
When navigated to wallet page, blue bubble selection option should not be shown.
Actual Result:
When navigated to wallet page, blue bubble selection option is shown.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6464872_1714375428526.cb.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @JmillsExpensifyThe text was updated successfully, but these errors were encountered: