Fix resizing in main legend when coloring tree by feature metadata gradient with non-numeric warning message
#515 aperta il 13 mag 2021
Metriche repository
- Star
- (56 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
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:
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 thebarplot-layer-legendclass), instead of100%. 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 https://github.com/biocore/empress/pull/484#discussion_r624398291
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 https://github.com/biocore/empress/pull/484#discussion_r626181648
