Make registry viewer autosize to viewport with resizable sidebar#217
Merged
Conversation
Contributor
Test Results840 tests - 3 838 ✅ - 3 1m 49s ⏱️ +6s Results for commit bfaa4a2. ± Comparison against base commit 68a35ff. This pull request removes 4 and adds 1 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #217 +/- ##
==========================================
- Coverage 95.37% 95.36% -0.02%
==========================================
Files 142 142
Lines 11428 11402 -26
Branches 623 622 -1
==========================================
- Hits 10899 10873 -26
Misses 399 399
Partials 130 130 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replace the fixed-pixel pn.Row layout with a panel_material_ui.Page that fills the viewport and provides a draggable sidebar/main divider. Inner widgets that had hardcoded widths (HTML panes, JSONEditor) now use sizing_mode='stretch_width' so they grow with the viewer panel. The browser is wrapped in a scrolling Column inside the sidebar so large registries remain navigable. Long type names, paths, and field entries get overflow-wrap:anywhere to prevent horizontal overflow when the panel is narrowed. Hard breaks: - ModelRegistryViewer params browser_height and viewer_width removed. - CLI flags --browser-height and --viewer-width removed. - Added a 'title' param and corresponding --title flag. Signed-off-by: Pascal Tomecek <pascal.tomecek@cubistsystematic.com>
feussy
approved these changes
May 27, 2026
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
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.
Replaces the fixed-pixel
pn.Rowlayout in theccflow.uiregistry viewer with apanel_material_ui.Pagethat fills the viewport and provides a draggable sidebar/main divider out of the box.Changes
ModelRegistryViewer.__panel__()now returns apmui.Pagewith the registry browser in the sidebar and the model viewer in the main slot.ModelTypeViewer._pane,ModelConfigViewer._metadata,ModelViewer._json_editor) now usesizing_mode='stretch_width'and the stretch is propagated through their parent Columns.JSONEditorgetsmin_width=400to guard against the known zero-width-when-initially-hidden measurement bug.overflow-wrap:anywhereadded to<code>/<li>blocks that render long type names, paths, and field rows so they wrap instead of forcing horizontal overflow when the sidebar is narrowed.pn.Column(..., sizing_mode='stretch_both', scroll=True)inside the sidebar so large registries remain navigable.Hard breaks
ModelRegistryViewerparamsbrowser_heightandviewer_widthremoved.--browser-heightand--viewer-widthremoved.titleparam +--titleflag for the page header (default"ccflow Model Registry").Notebook usage note
pmui.Pageis a template — designed to be the root of a served document, not embedded inline in a Jupyter output cell. For interactive inline inspection of a registry or model use the existingBaseModel.get_widget()(IPython.display.JSON). For the full interactive UI, run the CLI orpn.serve(viewer.__panel__())/viewer.__panel__().show().Verification
make lintclean.ccflow/tests/ui/pass.code-reviewagent; one finding (unwrapped field-list<code>blocks) addressed before commit.panel serveagainst a registry with nested subregistries and long field names — sidebar resize, scroll, and content wrapping all behave as expected.