Skip to content

Conversation

@PaulHax
Copy link
Collaborator

@PaulHax PaulHax commented Oct 22, 2025

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:

  • string shortcuts (axial, coronal, sagittal, volume, oblique)
  • full view objects with custom options.

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:

  • 'H' → 'column' (items stacked vertically)
  • 'V' → 'row' (items arranged horizontally)

Add a disabledViewTypes to configJson

Can remove the 3D view with

{
    "disabledViewTypes": ["3D", "Oblique"]
}

@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit c81cc3a
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/6908b2fb4157810008adb9d4
😎 Deploy Preview https://deploy-preview-806--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PaulHax PaulHax requested a review from zachmullen October 22, 2025 21:00
@PaulHax PaulHax force-pushed the layout-config branch 2 times, most recently from 3af0f13 to 248ec0c Compare October 22, 2025 21:33
  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.
@PaulHax PaulHax added this pull request to the merge queue Nov 3, 2025
Merged via the queue into main with commit 72c34f7 Nov 3, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants