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

Plot legends are compressing and being clipped when the plot is small #3981

Closed
charlesh88 opened this issue Jun 28, 2021 · 13 comments · Fixed by #4302
Closed

Plot legends are compressing and being clipped when the plot is small #3981

charlesh88 opened this issue Jun 28, 2021 · 13 comments · Fixed by #4302

Comments

@charlesh88
Copy link
Contributor

Fix plots in Display Layouts to prevent top and bottom legends from being clipped:

image

@charlesh88 charlesh88 self-assigned this Jun 28, 2021
@unlikelyzero unlikelyzero added this to Needs triage in Bug Tracker via automation Jul 7, 2021
@scottbell scottbell self-assigned this Sep 24, 2021
@scottbell
Copy link
Contributor

Was able to reproduce, investigating now.

@scottbell
Copy link
Contributor

scottbell commented Sep 28, 2021

@charlesh88 Would it be appropriate to set gl-plot-legend min-height to something like 18px? This would at least prevent the top legend from clipping
Sep-28-2021 12-46-05

@scottbell
Copy link
Contributor

Removing myself from this issue to go back to work on
#4196

@nikhilmandlik nikhilmandlik self-assigned this Sep 29, 2021
@nikhilmandlik
Copy link
Contributor

another way to fix is remove overflow: hidden; from .c-plot-legend file 'openmct/src/styles/_legacy-plots.scss'
@charlesh88 any suggestions?
Screen Shot 2021-09-29 at 12 24 23 PM

charlesh88 added a commit that referenced this issue Oct 7, 2021
- Mods to markup and CSS for better approach to overflowing and min-heights;
- WIP!
@charlesh88
Copy link
Contributor Author

charlesh88 commented Oct 7, 2021

@scottbell @nikhilmandlik You guys are both not wrong, but it's a bit more complex than that and we need a better solution than just setting min-height on the legend. There's all sorts of nested scrolling that needs cleaning up. Frankly, it's become kind of a mess over time.

WIP in branch fix-3981.

image

charlesh88 added a commit that referenced this issue Oct 7, 2021
- Refinements to min-height approach;
- CSS cleanups;
@charlesh88 charlesh88 mentioned this issue Oct 7, 2021
8 tasks
Bug Tracker automation moved this from Needs triage to Done Oct 7, 2021
jvigliotta added a commit that referenced this issue Oct 7, 2021
* Fix #3981
- Mods to markup and CSS for better approach to overflowing and min-heights;
- WIP!

* Fix #3981
- Refinements to min-height approach;
- CSS cleanups;

Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
@davetsay
Copy link
Contributor

davetsay commented Oct 8, 2021

needs testing instructions @charlesh88 . I'm not sure what the cut off is to where plot legends should legitimately be clipped or not.

image
don't know if this is okay or if should show legends in this really small resolution.

@charlesh88
Copy link
Contributor Author

Something happened in the merge to master, and what's working in branch fix-3981 is not working the same in master. Looking into this, will add testing notes after I determine what happened.

@unlikelyzero
Copy link
Collaborator

Waiting for feedback from @charlesh88

@charlesh88
Copy link
Contributor Author

charlesh88 commented Oct 29, 2021

Testathon 10-29-21: Fix not yet working right for expanded legend, needs more work. Reopening.

@charlesh88
Copy link
Contributor Author

Testing Notes

  1. Put Stacked and Overlay plots into a Display Layout
  2. Size the each plot frame so that an internal scrollbar appears, like this:
    image
  3. Observe: the legend should be visible even though the plot itself may be clipped.
  4. Expand the legend: the internal scroll should allow the user to scroll through the whole legend and plot, with each visible in a minimal state.

@charlesh88 charlesh88 reopened this Oct 29, 2021
Bug Tracker automation moved this from Done to Needs triage Oct 29, 2021
@akhenry
Copy link
Contributor

akhenry commented Sep 19, 2022

Is this a dupe of #3858?

Bug Tracker automation moved this from Needs triage to Done Feb 1, 2023
@shefalijoshi shefalijoshi added this to the Target:2.1.6 milestone Feb 1, 2023
@charlesh88
Copy link
Contributor Author

Verified fixed Testathon 2023-02-02.

@khalidadil
Copy link
Contributor

Verified Fixed in Testathon on 02/02/23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

9 participants