Skip to content

Conversation

@joverlee521
Copy link
Contributor

@joverlee521 joverlee521 commented Sep 3, 2025

Description of proposed changes

community build in test app

Requested by @huddlej on Slack.

From discussion in person, we want all filtered measurements usually displayed in the scrolling panel as one long panel in the SVG. This does mean the downloaded SVG in "Grid" display is not ideal since the tree and measurement panels have the smaller "Grid" widths while the other panels are all "full" panels.

Checklist

Copy link
Contributor

@huddlej huddlej left a comment

Choose a reason for hiding this comment

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

This is great, @joverlee521! I really like how the tree and measurements panel still retain their original widths from whichever layout the user had selected (full or grid). For cases when we want to recreate the grid view in Illustrator, this implementation detail should simplify that process by keeping the panel sizes at their original proportions.

Overall, the SVG export behaves exactly the way I would expect with the measurement panel outputs reflecting the settings and filters from the interactive Auspice view.

Thanks again for getting this implemented so quickly on such short notice!

@joverlee521 joverlee521 marked this pull request as ready for review September 4, 2025 18:17
Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

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

Thanks @joverlee521 - everything works well except the grid mode (as commented)

Comment on lines +465 to +473
if (panelLayout === "grid") {
width = panels.tree.width + padding + panels.map.width;
height = Math.max(panels.tree.height, panels.map.height);
panels.map.x = panels.tree.width + padding;
} else {
width = Math.max(panels.tree.width, panels.map.width);
height = panels.tree.height + padding + panels.map.height;
panels.map.y = panels.tree.height + padding;
}
Copy link
Member

Choose a reason for hiding this comment

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

In grid mode (with or without a map) the tree & measurements are half-width but on top of each other in the exported SVG. Note that if there are tree, map & measurements panels then the map is full width in grid mode, whereas I think some of these calculations are expecting the tree & map to be side-by-side?

image

Copy link
Member

Choose a reason for hiding this comment

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

This does mean the downloaded SVG in "Grid" display is not ideal since the tree and measurement panels have the smaller "Grid" widths while the other panels are all "full" panels.

🤦 I should have read the PR description better. Ok, this is fine!

joverlee521 and others added 3 commits September 5, 2025 13:54
Fix map panel layout when in the "Grid" display and the measurements panel is 
also displayed. Previously, the "full" map was added next to the "grid" tree in 
the downloaded SVG that was not ideal. This has bee an issue ever since the 
measurements panel was added because the measurements panel is prioritized over 
the map panel in the grid display.
Include measurements panel in the downloaded SVG, always displayed in the "full" 
mode so that all measurements hidden under the interactive scroll panel is 
displayed in the full height. This means the downloaded SVG does have a smaller 
"grid" tree panel that is not ideal, but I'm not wanting to pursue how to 
re-draw the tree for SVG downloads.

Note that the graph and the x-axis are separate SVGs in the measurements panel 
to allow the sticky x-axis, so they are parsed separate for the SVG download.
@jameshadfield jameshadfield force-pushed the measurements-svg-download branch from c69c2e7 to b358c4c Compare September 5, 2025 01:55
@jameshadfield jameshadfield temporarily deployed to auspice-measurements-sv-elnph6 September 5, 2025 01:56 Inactive
@jameshadfield jameshadfield merged commit 8761324 into master Sep 5, 2025
11 of 13 checks passed
@jameshadfield jameshadfield deleted the measurements-svg-download branch September 5, 2025 01:56
@jameshadfield
Copy link
Member

Rebased onto master & added changelog entry

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants