owid-grapher icon indicating copy to clipboard operation
owid-grapher copied to clipboard

Table of contents on linear topic pages et al should grey out other content

Open ikesau opened this issue 1 year ago • 16 comments

Occluding content is bad. Can we maybe translate these wide components to the right when we know the sidebar is open?

image

image

ikesau avatar Feb 22 '24 20:02 ikesau

triage

It doesn't only affect wide components: on narrower screens, the regular content column is also masked, and there isn't any horizontal space left to shift content to.

Screenshot 2024-02-27 at 15 48 51

@mrwbkrm We could treat this as a temporary overlay, that readers open, navigate through and close before continuing reading.

Screenshot 2024-02-27 at 15 44 45

We are already one step into that pattern, given that the sidebar closes when clicking on a nav item.

Triaging as "nice to have".

cc @danyx23 @ikesau

mlbrgl avatar Feb 27 '24 16:02 mlbrgl

Yes

Ah, I had this written but not published! So, yes, I +1 but I'll drop in my reasoning.

And I suggested the same, asking: is the user opening the menu to see something else? If so, how much does it matter that something current is covered? Probably not much (ask them, you have a lot I believe). I don't ever like to assume the user's behaviour, but opening a menu probably means the content has served its purpose.

However, IMO, some focus shading would be good in this case as suggested above - I'll show the darker shade here as a different example.

Screenshot 2024-02-27 at 04 20 38

Another possible refinement

Another option here might also be to :hover the chart, allowing the uyser to see it if they wanted to, ie, you could still access a chart with the menu open

Screenshot 2024-02-27 at 10 45 39

Sneaky box-shadow hack ...

:hover {
  z-index: 5;
  box-shadow: 0 0 0 500px rgba(0,0,0,0.6);
}

toni-sharpe avatar Feb 27 '24 16:02 toni-sharpe

@toni-sharpe thanks for the feedback!

I would be careful about triggering such a shift on a casual mouse hover, but that's nevertheless an interesting and creative take on this problem, nice!

mlbrgl avatar Feb 27 '24 17:02 mlbrgl

Works for me @mlbrgl ! Once the user clicks on a section, the overlay closes automatically as it does now, correct?

mrwbkrm avatar Feb 27 '24 17:02 mrwbkrm

@mlbrgl tbh, i don't think I'd do it. The option we agree on, that's the pattern to explore. I'm leaning heavily towards "the user opened the menu because they are finished with the content".

And hover has problems outside the mouse context too, on top of as being a big shift in this case, as you mention.

toni-sharpe avatar Feb 27 '24 17:02 toni-sharpe

@mrwbkrm yep!

mlbrgl avatar Feb 28 '24 19:02 mlbrgl

Raised again today by Lucas in slack

danyx23 avatar Mar 19 '24 11:03 danyx23

Being discussed with Marwa...

danyx23 avatar Apr 02 '24 15:04 danyx23