-
Notifications
You must be signed in to change notification settings - Fork 84
Layout config #806
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
Merged
Merged
Layout config #806
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for volview-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
aabffff to
2626cde
Compare
3af0f13 to
248ec0c
Compare
zachmullen
reviewed
Oct 30, 2025
zachmullen
approved these changes
Nov 3, 2025
axial - coronal sagittal - volume
Add support for configuring view layouts via runtime config JSON with
two approaches:
1. Simple grid layouts using 2D string arrays:
{ "layout": [["axial", "sagittal"], ["coronal", "volume"]] }
2. Nested hierarchical layouts with full control:
{
"layout": {
"direction": "V",
"items": [
"axial",
{ "direction": "H", "items": ["volume", "coronal"] }
]
}
}
Features:
- String shortcuts for common views (axial, coronal, sagittal, volume, oblique)
- Full view objects with custom options (viewDirection, viewUp, orientation)
- Mix strings and full specs in nested layouts
- Backwards compatible with existing gridSize format
Implementation:
- Add Zod schemas for layout config validation
- Add parseGridLayout() and parseNestedLayout() parsers
- Add setLayoutWithViews() method to view store
- Add comprehensive e2e tests (4/4 new tests passing)
Related directories created in volview-backend/files:
- prostate-simple-grid/ - Example 2x2 grid layout
- prostate-custom-layout/ - Example asymmetric nested layout
BREAKING CHANGE: Layout direction values changed from 'H'/'V' to 'row'/'column' Replaces counter-intuitive direction naming with CSS flexbox-aligned semantics: - 'H' → 'column' (items stacked vertically in a column) - 'V' → 'row' (items arranged horizontally in a row) State file version bumped from 6.0.0 to 6.1.0 with automatic migration of old layout directions. External config files must use new values.
248ec0c to
c81cc3a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Layout configuration improvements
Default first view to Axial
Changes the default 2x2 layout from Sagittal → Axial in the top-left position.
Add flexible layout configuration
Adds support for configuring view layouts via runtime config JSON with two approaches:
Simple grid layout:
{ "layout": [["axial", "sagittal"], ["coronal", "volume"]] }Fancy layout
{ "layout": { "direction": "row", "items": [ "axial", { "direction": "column", "items": ["volume", "coronal", "sagittal"] } ] } }Rename layout direction from H/V to row/column
Replaces counter-intuitive 'H' and 'V' layout directions with CSS flexbox-aligned 'row' and 'column' semantics:
Add a disabledViewTypes to configJson
Can remove the 3D view with
{ "disabledViewTypes": ["3D", "Oblique"] }