Skip to content
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

Tooltips and Popovers #23

Merged
merged 5 commits into from
Jun 30, 2020
Merged

Tooltips and Popovers #23

merged 5 commits into from
Jun 30, 2020

Conversation

rajadain
Copy link
Member

@rajadain rajadain commented Jun 29, 2020

Overview

Ensures that water column tooltips are always on top. Also ensures that thumbnail popovers do not obscure the main content.

See commit messages for details.

Connects #17
Connects #19

Demo

Tooltips on top:

image

Non-obscuring popovers:

image

image

image

Testing Instructions

  • Check out this branch
  • ./scripts/setup.sh
  • vagrant ssh -c 'cd /vagrant && ./scripts/bundle.sh --debug'
  • vagrant ssh -c 'cd /vagrant && ./scripts/server.sh'
  • Make the viewport narrow enough to bring the water column close to the Evapotranspiration and Infiltration label wells
  • Hover over the water column
    • Ensure the tooltips aren't obscured
  • Hover over the thumbnails
    • Ensure the main content is never obscured

This also causes the entire Water Column to be on top of
value wells on narrow screens, but that is a problem for
a future redesign effort.

Refs #17
When a popover is shown below the thumbnail, the arrow
is aligned with the title which has a prominent, non-
white background color. A plain white arrow looks
starkly out of place.

To fix this, we add the NLCD / Soil group name to the
arrow, and if and only if the popover is shown below
the thumbnail, we use the title color's arrow. Else,
we show the regular white arrow, which goes better
with the popover body.
Previously all the popovers would open to the left of
the thumbnail, uniformly. This unfortunately occluded
the main content. To avoid that, now we open the popover
of the left-most thumbnail of every row to the right.
For all the NLCD thumbnails, the popover is opened
below them. For the Soil thumbnails, the popover is
opened above.

This works well for all cases except the right-most
ones, whose content is a little squished for lack of
room. This may be an acceptable compromise given the
client's needs.

Refs #19
@rajadain
Copy link
Member Author

Tagging @designmatty for design review.

Copy link
Contributor

@designmatty designmatty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from a design perspective.

According to this recommendation:
https://www.shellcheck.net/wiki/SC2230
Copy link
Contributor

@mmcfarland mmcfarland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I noted the placement of the column chart over other content on narrow screens, but realize there is a tradeoff to what gets placed on top. Nice job with the popup arrow colors 👍 🌈

@rajadain
Copy link
Member Author

Thanks for reviewing! We have #21 for tackling that overlap.

@rajadain rajadain merged commit 7a99abc into develop Jun 30, 2020
@rajadain rajadain deleted the tt/tooltips-and-popovers branch June 30, 2020 20:32
@mmcfarland mmcfarland assigned rajadain and unassigned mmcfarland Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants