-
Notifications
You must be signed in to change notification settings - Fork 293
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
Make getHeaderHeightWithoutNav()
more robust to avoid errors seen in the wild.
#6674
Comments
|
@techanvil I left a review on the PR that I reopened as a draft. Let's use that to inform a new IB, which could involve keeping the same PR (which is now against |
Thanks @aaemnnosttv, you raised some good points there. I've replied on the PR, and also made the discussed changes. I've also updated the IB - I think it makes sense to continue using this branch considering the amount of detailed discussion that has already taken place on it. |
@techanvil there's a duplicate conflicting section for test coverage – I'll remove the older one. IB ✅ |
QA Update ✅
Recording.273.mp4 |
Feature Description
Since the release of version 1.95.0 a handful of errors have been reported from installed sites (four at the time of writing).
These evidently relate to the work done via #6109 which was included in this release.
Although it's not been possible to recreate these issues in our testing we should add some defensive logic to
getHeaderHeightWithoutNav()
to prevent these errors.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
getHeaderHeightWithoutNav()
function should be updated so that it doesn't return anything other than a positive number or zero.Implementation Brief
position
style property viagetComputedStyle()
.getHeaderHeightWithoutNav()
cannot return anything but a finite positive integer or0
.getHeaderHeightWithoutNav()
to be more readable.getHeaderHeightWithoutNav()
as a failsafe - useMath.abs()
, similar to how it's used inWidgetAreaRenderer
.getHeaderHeightWithoutNav()
andgetHeaderHeight()
togetStickyHeaderHeightWithoutNav()
andgetStickyHeaderHeight()
to be more explicit.getHeaderHeightWithoutNav()
function more defensive. #6672 which implements the above.Test Coverage
getStickyHeaderHeightWithoutNav()
and backfill test coverage forgetStickyHeaderHeight()
.QA Brief
view_notification
GA event being sent for Banner Notifications that are dismissed or hidden #6109.Changelog entry
IntersectionObserver
error in banner notifications.The text was updated successfully, but these errors were encountered: