[3.0] Theme split (wave 4, part 14) — make the search board picker a disclosure widget - #9432
Open
albertlast wants to merge 1 commit into
Open
[3.0] Theme split (wave 4, part 14) — make the search board picker a disclosure widget#9432albertlast wants to merge 1 commit into
albertlast wants to merge 1 commit into
Conversation
The panel that chooses which boards to search was a title bar, a link, a hidden arrow and a div, wired together by an smc_Toggle generated into the page. All of that is what a details element does on its own, so it is one now, and the ~25 lines of script go away with it. Worth having beyond the tidy-up: the old link was an <a href="#"> whose only behaviour came from the script, so the panel could not be opened by keyboard in any sensible way and did not open at all without JavaScript. A summary does both. The two bar classes end up on the one element, and since .titlebg comes later in index.css with a background of its own, the bar's background is named again in a rule for the summary. That rule also has to put overflow back to visible, because .titlebg hides it and would clip the disclosure triangle away. Verified against release-3.0 with computed styles: background, background-image, colour, padding, border, font weight, font family and the bar's height, width and position are all identical, the panel still starts closed when every board is selected, and a search with the picker open still submits its brd[] values and returns results. Signed-off-by: Mathias Albert <mathiaspapealbert@hotmail.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
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 #7933 split (wave 4, part 14). Search area.
The panel that chooses which boards to search was a title bar, a link, a hidden
arrow and a div, wired together by an
smc_Togglegenerated into the page. Thatis what a
<details>element does on its own, so it is one now, and the ~25lines of script go with it.
Worth having beyond the tidy-up: the old control was an
<a href="#">whose onlybehaviour came from the script, so the panel could not be opened by keyboard in
any sensible way, and did not open at all without JavaScript. A
<summary>doesboth.
On the one CSS rule
The two bar classes end up on a single element now (
<summary class="title_bar titlebg">rather than adiv.title_barwrapping anh4.titlebg)..titlebgcomes later in
index.cssand setsbackground: none, so the bar's ownbackground is named again in a rule for the summary. That rule also puts
overflowback tovisible, because.titlebghides it and would otherwiseclip the disclosure triangle away.
Testing
Computed styles compared against
release-3.0:release-3.0rgb(255, 255, 255)rgb(255, 255, 255)nonenonergb(85, 85, 85)rgb(85, 85, 85)6px 12px 5px6px 12px 5px1.71429px rgb(255, 148, 0)1.71429px rgb(255, 148, 0)700 Tahoma, sans-serif700 Tahoma, sans-serif34 / 729 / 9134 / 729 / 91The panel still starts closed when every board is selected, opening it reveals
the list, the per-category
selectBoards()links still work, and a search runwith the picker open submits its
brd[]values and returns results.Noticed while testing, not fixed here
?action=search;topic=Nwithout aboardin the URL is a 500 onrelease-3.0as well —
Typed property SMF\Board::$id must not be accessed before initialization, the same shape as #9413. Untouched by this branch; worth its ownfix.
Issues References (Fixes|Related|Closes)
Related to #7933