-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
collapsible pin pane #178
base: main
Are you sure you want to change the base?
collapsible pin pane #178
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@ljharb Here's the new PR: use the method already existed to achieve it, just like your suggestion, looking for more tests and ideas. |
@ljharb Done! |
0766845
to
4da66d9
Compare
I feel like the orientation of the arrows in the screenshot is the opposite of what I expect. Specifically, I expect "down" to mean "expanded" in this context. Compare Github's example
|
Ah, good call - i didn't notice before, but you're right. The triangles should match the way the TOC sections already work - which is as you describe. @peterzhangsnail, can you fix? |
@ljharb I run my build and the orientation of the button seems correct. Here's my process below: |
@ljharb It's also easy to 'fix' anyway. Just a little exchange of strings in elements.css. |
@peterzhangsnail when "closed", the arrow should be pointing left/inwards (at the title), not right/outwards. |
@ljharb It's true that an right-facing arrow on the right often means "go to detailed view" but I'm not sure I can think of an example of an left-facing arrow on the right being used for a closed drawer? I think when it's on the right, the norm may be upward/downward—see the "pending reviewers" box on this very page, as well as the Preferences pages for Chrome and FF. |
@rkirsling i'd expect "up/down", or "inwards/downwards". Chrome's preference arrows, at least, aren't expanders, they're navigation "go to"s. this arrow points inwards/downwards, for example(here's some example content) |
Ah, true. Perhaps the "pins" arrow should be on the left, then? |
@ljharb That doesn't match with the toc header below it if we put the arrow on the left. |
@ljharb Here's the upward/downward version of pin arrow: |
@peterzhangsnail those are backwards too; the downwards arrow in an up/down is the one that shows the contents; upwards hides them. |
@ljharb Click a downward/upward arrow then it shows/hides the content. You must click it first. |
@ljharb Here's a gif to show the process: |
Yes, that's backwards. When the content is hidden, the arrow should reflect that by pointing upwards. Clicking it should show the content and thus change it to point downwards, indicating that the content is visible (and that clicking it will make it invisible). |
@ljharb Hope this is what we want: |
@ljharb I have run my build routine with the new commit, everything works just fine. |
The things we have to decide between:
My preference is 1, 2, 3. |
I don't have a strong opinion here, but I'll note that the upward/downward approach used by GitHub/Chrome/Firefox has downward as the closed state (I was momentarily confused by this myself, hence all the edits to my first comment above). |
@rkirsling in content ?
|
@ljharb What? That's not upward/downward. |
@rkirsling right; so what are you referring to that's up/down in those browsers? |
@ljharb I just re-referenced what I described in my first two comments: the screenshots as well as the "pending reviewers" box on this page. |
@rkirsling ah, thanks, i see what you mean. In those cases they're not triangles, they're chevrons, and i think the difference, while subtle, actually matters quite a bit. |
Hmm, that's fair. Maybe that means it's confusing to have a filled triangle flip instead of rotate then? 🤔 In any event, I have no qualms with your order of preference. |
Add an icon to the pin pane to make it collapsable.
Here's how it may look on the ecma doc:
Closes tc39/ecma262#1898