open-reaction-database / ord-schema

Schema for the Open Reaction Database
https://open-reaction-database.org
Apache License 2.0
95 stars 27 forks source link

Updates to the editor navigation bar #406

Closed skearnes closed 4 years ago

skearnes commented 4 years ago

Related to #404

NOTE: The dynamic sidebar selection is quite complicated---how do you decide which section you're "in"? As a way of sidestepping this issue I chose to highlight the names of any sections that are currently visible:

image

codecov[bot] commented 4 years ago

Codecov Report

Merging #406 into main will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #406   +/-   ##
=======================================
  Coverage   77.20%   77.20%           
=======================================
  Files          21       21           
  Lines        2264     2264           
  Branches      471      471           
=======================================
  Hits         1748     1748           
  Misses        378      378           
  Partials      138      138           
skearnes commented 4 years ago

Update: I played with this some more and have a mostly functional single-selection sidebar working. It jumps around a bit when scrolling by the smaller sections but generally behaves as you'd expect.

connorcoley commented 4 years ago

I like the scrolling to the position but I do find the behavior of the sidebar a little unintuitive now. It seems to select whichever section has most recently come into frame. If you try to navigate to Notes after being further down, for example, you end up with "Notes" selected. If you navigate to Notes after being further up, you can end up with Outcomes selected depending on the size of your window and display resolution. Notes will be at the top of the page though, which is good

skearnes commented 4 years ago

Yeah it's going to be tricky to get that right, I think. What do you think of the multi-selection option from the original description?

connorcoley commented 4 years ago

I don't think the multi-selection is a bad idea necessary...it would highlight anything that's visible on the page. It will be pretty useful when we have individual inputs listed under Inputs

skearnes commented 4 years ago

OK, I reverted to the original multi-selection proposal. We can fix single-selection later if we want. PTAL.