fix(widget): correct visibility icon polarity in section menu (JS-9858) - #2341
Open
requilence wants to merge 1 commit into
Open
requilence wants to merge 1 commit into
requilence wants to merge 1 commit into
Conversation
The widget section menu rendered the eye icon inverted relative to the rest of the app: a hidden section showed the slashed eye and a visible one the open eye. Everywhere else the icon depicts the action the click performs — eye0 (open) = "show", eye1 (slashed) = "hide" — as pinned by the labelled call sites (menu/dataview/group/edit.tsx, menu/dataview/ relation/edit.tsx) and by the tooltip in sidebar/page/widgetManage.tsx. Row state is still conveyed by the .isHidden dimming class.
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.
The widget section menu (
src/ts/component/menu/widget/section.tsx) was the wrong one: it rendereditem.isHidden ? 'common/eye1' : 'common/eye0', i.e. a slashed eye on hidden rows and an open eye on visible ones, the exact opposite of the Manage Sections sidebar panel. Everywhere else in the app the eye icon depicts the action the click performs, not the current state —common/eye0is the plain open eye ("show"),common/eye1the slashed eye ("hide"). That is pinned by the two call sites where the icon sits next to an explicit label:menu/dataview/group/edit.tsxpairs Show column witheye0and Hide column witheye1, andmenu/dataview/relation/edit.tsxpairs Hide Property witheye1.sidebar/page/widgetManage.tsxfollows the same rule and its tooltip proves it (isHidden → eye0+ "Show section"), as does the passphrase reveal toggle inform/phrase.tsx. The menu was the only outlier; it also already conveys state independently through the.isHiddendimming class (src/scss/menu/widget.scss), so the icon is free to carry the action. One-token fix, no styling touched.Closes #2244 · JS-9858
The reporter's literal complaint — hidden sections continuing to render in the sidebar — is a false alarm:
sidebar/page/widget.tsxgates onif (ws.isHidden) return null;andS.Common.widgetSectionsSetpersists immediately (no "Done" needed). What they hit was the inverted icon, which made them read "slashed eye" as "already hidden". Worth saying so in the reply to them.How to test
...on a section) → Manage sections, and note the eye icon on a visible row: it is the slashed eye, tooltip "Hide section".widgetSectionmenu with the same list) and check the same rows: visible rows now show the slashed eye and hidden rows the open eye, matching the sidebar panel. Hidden rows also stay dimmed.