Repository navigation
rustdoc: Simplify tabs handling in "settings" popover - #165714
GuillaumeGomez wants to merge 3 commits into
Conversation
|
Some changes occurred in HTML/CSS/JS. |
2a082e8 to
bc95c1b
Compare
| // We ensure its height is smaller than the window's, but its content's height is bigger. | ||
| store-property: ("#settings .settings .setting", {"offsetHeight": menu_height, "scrollHeight": scroll_height}) | ||
| store-property: ( | ||
| "#settings .tabs", |
There was a problem hiding this comment.
Small changes about the scrolling here: to make it work with only one CSS for all viewport size, I made the tabs labels "sticky", so now the whole content of the popover is scrollable, hence why we look at this selector now.
|
6 lines are added in a GUI test, so it's |
|
@rfcbot fcp merge rustdoc-frontend Okay, I understand the code, and it seems fine. But since this is a plan for a major change in how keyboard interaction works, it'll be an FCP. |
|
@notriddle has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
|
I wonder if I can set a tabindex on the labels directly instead. Worth a try. |
|
I simplified the DOM and the CSS and added JS to handle the tab/space/enter events for the labels. Still simpler that the previous code as it allows to not have to care about setting up JS for the tabs labels as it's done at the top-level directly and will allow to unify this handling for everything which uses the same tab system (looking at you search results). That should also make my life a lot simpler for the help popover menu. Since we're back to the previous tab/space/enter event system, I suppose the FCP can be closed? |
This comment has been minimized.
This comment has been minimized.
2f5896d to
15d7184
Compare
This comment has been minimized.
This comment has been minimized.
15d7184 to
0d64c07
Compare
This comment has been minimized.
This comment has been minimized.
0d64c07 to
fc8ca17
Compare

Follow-up of #163224.
Instead of using JS to change tab, we can just rely on CSS. I got the idea while updating #147909.
You can test it here.
r? @notriddle