Hide the non-dismissable streaming/spaces indicator in the timeline on mobile
insin opened this issue · comments
Jonny Buchanan commented
With the indicator
Indicator DOM
Timeline DOM
The height of the header is adjusted to offset timeline contents to make room for the indicator
Without the indicator
Indicator DOM
The [role="grid"]
element has [aria-hidden="true"]
Timeline DOM
Header height when there's nothing to offset timeline contents to display
Implementation
- While on the timeline. observe the
[role="grid"]
element for changes to its[aria-hidden]
attribute - Toggle a
Live
class on<body>
based on the presence of an[aria-hidden]
attribute (missing = on, present = off) - Use
body.Live
as a hook to hide the indicator and adjust the timeline header back to its non-indicator height
Jonny Buchanan commented