You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract moderation tools from the unified <select> to icon buttons:
built-in tools
custom tools selection (if any are defined), which opens the <select>
Handle submit logic
As the moderation bar is only used to identify the concrete tool to use - in connection with <input type="checkbox"> checked or cookie-stored item IDs - the form can be submitted upon tool selection.
Default tools can behave like native <button> elements submitting the <form>, without JavaScript involvement.
Custom tools selection using <select> would be followed by:
submitting the <form> using JavaScript
making the submit button visible (which may replace the custom selection button) for no-JavaScript clients (e.g. using :user-valid on the element and sibling)
Remains non-sticky if state cannot be reliably detected.
hide tool selection for empty item selections
Remains visible if state cannot be reliably detected.
Notably, the thread tools in the thread view may be visually overwhelming when not intended to be used, and can be hidden by default (e.g. using <details>).
Targets:
post moderation tools
thread view
search view
thread moderation views
forum view
thread view
search view
The text was updated successfully, but these errors were encountered:
Discussed techniques to determine item selection state without JavaScript:
CSS selector :has(:checked) on the sibling element with a list of items
a server-side class/attribute added to the moderation tools element when a stored selection is non-empty
The second method may yield false positives when the stored selection is de-selected client-side.
Therefore, the sticky position may be best applied:
using JavaScript, when all selected items are known (managed cookie values)
using CSS, when the server-side flag indicates empty stored selection, and items are selected in the DOM (avoids suggesting that the current-page selection is exhaustive)
Conversely, the tool selection may be hidden:
using JavaScript, when all selected items are known (managed cookie values)
using CSS, when the server-side flag indicates empty stored selection, and no items are selected in the DOM
The tool would be shown by default, and conditionally hidden via CSS to avoid breaking the feature in case of selector failure.
Extract moderation tools from the unified
<select>
to icon buttons:<select>
Handle submit logic
As the moderation bar is only used to identify the concrete tool to use - in connection with
<input type="checkbox">
checked or cookie-stored item IDs - the form can be submitted upon tool selection.Default tools can behave like native
<button>
elements submitting the<form>
, without JavaScript involvement.Custom tools selection using
<select>
would be followed by:<form>
using JavaScript:user-valid
on the element and sibling)Adapt tool selection UX to item selection state
apply
position: sticky
for non-empty item selectionsRemains non-sticky if state cannot be reliably detected.
hide tool selection for empty item selections
Remains visible if state cannot be reliably detected.
Notably, the thread tools in the thread view may be visually overwhelming when not intended to be used, and can be hidden by default (e.g. using
<details>
).Targets:
post moderation tools
thread moderation views
The text was updated successfully, but these errors were encountered: