[3.0] Theme split (wave 4, part 5) — move the collapse toggles out of their headings - #9390
Open
albertlast wants to merge 1 commit into
Open
[3.0] Theme split (wave 4, part 5) — move the collapse toggles out of their headings#9390albertlast wants to merge 1 commit into
albertlast wants to merge 1 commit into
Conversation
Every collapsible panel puts its toggle inside the heading and floats it right, so a control that acts on the whole panel is a child of the panel's title. It reads oddly to a screen reader and it means the heading cannot simply be the heading. Makes .cat_bar and .title_bar flex rows so a sibling can sit beside the heading, and moves the toggles out. Only where the bar is a div: .title_bar is also put on a <tr>, and turning that into a flex row would take the table apart. The category description on the board index is a sibling of its heading too, and belongs under it rather than beside it, so it gets a full-width basis. One small thing fixed on the way: the package browser's advanced toggle carried no toggle_down or toggle_up class at all, only floatright, so it was an empty span with nothing to draw. It now starts collapsed like the identical toggle on the newsletter page. Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part of the split of #7933, wave 4 part 5.
Every collapsible panel in the forum puts its collapse toggle inside the
heading and floats it right:
So a control that acts on the whole panel is a child of the panel's title. It
reads oddly to a screen reader, and it means the heading cannot simply be the
heading.
This makes
.cat_barand.title_barflex rows so a sibling can sit beside theheading, and moves the toggles out. Twelve of them, across nine templates.
Only where the bar is a
div..title_baris also put on a<tr>— thepermissions table is one — and turning that into a flex row would take the table
apart. The selectors are
div.cat_baranddiv.title_barfor that reason, and Ichecked:
tr.title_barstill computes todisplay: table-row.The category description on the board index is a sibling of its heading too, so it
gets
flex-basis: 100%to stay under the heading rather than moving beside it.One small thing fixed on the way
The package browser's advanced toggle carried no
toggle_downortoggle_upclass at all — only
floatright. Those classes are what create the::beforethat draws the icon, so it was an empty span with nothing in it. It now starts
collapsed, like the identical toggle on the newsletter page, and draws a 17×17
icon.
(You need #9389 to see that page at all on a forum that has never fetched the
version list from simplemachines.org.)
Testing
The toggles land in the same place. Board index, measured on both branches:
release-3.0The bar is a pixel shorter and the toggle sits two pixels higher, because it is
now centred in the row rather than floated inside a padded heading. The heading is
narrower because the toggle takes its own space instead of overlapping it.
Across the affected pages, every toggle is 12–13px from the end of its bar, clear
of the heading (no overlap), on the same row, and drawing its icon:
They still work: clicking the membergroup-requests toggle collapses the panel and
flips
toggle_up→toggle_down; clicking the newsletter one expands its paneland flips the other way.
RTL is measured rather than assumed — the toggle is 13px from the right edge under
dir="ltr"and 13px from the left edge underdir="rtl".composer lintis clean on all nine templates.Not done here
The theme branch's version of this block also tokenises the two bars — roughly
forty new
--catbg-*custom properties. That is a separate change and wants itsown PR; one of them (
--catbg-border-colorwhere--catbar-border-colorismeant) is exactly the undefined-token case discussed on #7933, so it needs reading
rather than copying. Only the layout is taken here.
Issues References (Fixes|Related|Closes)
Related to #7933