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

Fix resizing in main legend when coloring tree by feature metadata gradient with non-numeric warning message #515

Open
fedarko opened this issue May 13, 2021 · 0 comments

Comments

@fedarko
Copy link
Collaborator

fedarko commented May 13, 2021

Opening a new issue since we are deferring this from #484.


A less important problem, but one that may annoy users. Currently, resizing the main legend CSS when a gradient is shown breaks things:

arghcss

This isn't a problem for the barplot legend gradients since those aren't resizable, unlike the main legend.

There are probably multiple good ways of handling this (I just spent some time looking into this). For example, we could prevent resizing the legend CSS, but that will be inconvenient when the default size of the legend is big (e.g. when coloring by Level 7 or something).

For now, one easy solution might be setting the height of the legend SVG here to a constant height, e.g. 15em (matching the barplot-layer-legend class), instead of 100%. This should only be done for the main legend and not for the barplot layer legends -- doing it for those will mess up the formatting and make the default size of the SVGs too large -- so we would need to add a conditional to the Legend JS that checks if this is for the main legend or a barplot layer (this would overlap with the discussion above about making the Legend class aware of if it's used for the main legend or for barplots).

This isn't urgent (I'd be ok merging this PR in without addressing this), so if you'd like to delay it to later that's ok.

Originally posted by @fedarko in #484 (comment)


I vote to hold this off. I'd like to get this PR merged in ASAP so we can do a new release.

Originally posted by @kwcantrell in #484 (comment)

@fedarko fedarko changed the title Fix resizing in main legend when coloring tree by feature metadata gradient Fix resizing in main legend when coloring tree by feature metadata gradient with non-numeric warning message Jun 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant