-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ [#36] Set up styling for scrollable progress indicator on mobile
This is quite involved as there are some styling edge cases to consider: * form title that overflows and is truncated with ellipsis - if you're not careful, this can cause a horizontal scrollbar * form title that is long and the main content being scrollable - this can also cause a small horizontal scrollbar due to the ellipsis situation * the progress indicator content itself should be scrollable, independent from the main content * possibly there is an external header/footer that may take up some vertical space, which limits the amount of vertical space available for our progress indicator The implementation now passes a ref to the button element in React, which allows us to calculate the height of the button (our 'menu' bar) AND its offset to the top of the page, in case there is another external UI element taking space. We then allocate a maximum block size (= vertical space) as the dynamic viewport block (100dvb, dynamic taking into account the address bar that can dissapear on actual mobile devices) minues the vertical/block spacing reserved for the button and possible third party content. When scrolling down, our button may overlay the third party content (due to the position: sticky) and this frees up a little bit of space below the progress indicator - this is deliberate. Users are allowed to interact with buttons below it and simplifies us having to track more things in React.
- Loading branch information
1 parent
3b31fbb
commit e0ab43e
Showing
6 changed files
with
134 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters