-
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
Fix incorrect webpage title on back button press (chrome bug) #11160
Conversation
*/ | ||
const throttledUpdatePageTitleAndUnreadCount = _.throttle(() => { | ||
const totalCount = _.filter(reports, ReportUtils.isUnread).length; | ||
updateUnread(totalCount); | ||
}, 1000, {leading: false}); | ||
}, 100, {leading: false}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this since 1 second is a pretty long time and we are mainly throttling to avoid quick blasts of reports triggering the update when you maybe have hundreds of them that are getting read from Onyx on app init or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and tests well, hope this solves our problems for a while 🙏
I think we'll need someone to post the completed checklist before we can merge. |
Tested on Web & Desktop 👍
|
@marcaaron looks like this was merged without passing tests. Please add a note explaining why this was done and remove the |
🤷♂️ everything is checked and was good to merge before I clicked the merge button. Can see there are like 4 checklist jobs. Not really sure what is up with that. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @marcaaron in version: 1.2.13-0 🚀
|
🚀 Deployed to production by @yuwenmemon in version: 1.2.13-5 🚀
|
…leIndicator Fix incorrect webpage title on back button press (chrome bug)
cc @iwiznia since this bug is really bothering you 😄
Details
This is a workaround for a very annoying bug in the Chrome browser. It is a hack but I am not able to find and alternative and people will not stop complaining about this so it must be done???
Fixed Issues
$ #8005
Tests (Web & Mobile Web Only)
(1)
appears in the document titlePR Review Checklist
PR Author Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
have been tested & I retested again)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)QA Steps
Screenshots
Web
2022-10-04_12-15-08.mp4
Mobile Web - Chrome
2022-10-04_12-25-01.mp4
Mobile Web - Safari
2022-10-04_12-36-04.mp4
Desktop
N/A since there is no
document.title
on this platformiOS
N/A since there is no
document.title
on this platformAndroid
N/A since there is no
document.title
on this platform