Skip to content

monitr: right window file sorting and UX improvements#454

Open
marcosfrenkel wants to merge 10 commits into
toolsforexperiments:masterfrom
marcosfrenkel:fork/AndreaDuina/monitr-right-window-sorting
Open

monitr: right window file sorting and UX improvements#454
marcosfrenkel wants to merge 10 commits into
toolsforexperiments:masterfrom
marcosfrenkel:fork/AndreaDuina/monitr-right-window-sorting

Conversation

@marcosfrenkel
Copy link
Copy Markdown
Collaborator

@marcosfrenkel marcosfrenkel commented May 28, 2026

Summary

This PR is a cleaned-up version of the work originally proposed in #429 by @AndreaDuina — thank you for the great ideas! The changes have been reworked to keep the scope focused and avoid introducing lab-specific conventions into the general codebase.

What's included

Right window file sorting

  • Files in the right panel are now sorted by type: images first, then markdown, then JSON, then Python scripts, with everything else in between.
  • A new Sort menu in the menu bar lets users toggle between "Sort by type" (default) and "Sort alphabetically" (reverse alphabetical, preserving the previous behaviour).
  • Changing the sort option re-renders the right panel immediately without requiring the user to click away and back.

Copy folder path button

  • A "Copy folder path" button is now shown in the right panel when a folder is selected, making it easy to copy the path to the clipboard for use in analysis scripts.

Monospace rendering for .mono.md files

  • Files whose name ends with .mono.md (e.g. log.mono.md) are rendered in monospace font (Courier New, 10pt). This is useful for files containing tabular or fixed-width text.
  • The convention is documented in the TextEditWidget docstring and surfaced as a tip in the "Add Comment" name dialog.

Copy data paths button label

  • Renamed the existing "Copy Path" button in the left panel to "Copy data paths" to better reflect what it copies (the .ddh5 data file paths of all currently shown items).

What was changed relative to #429

  • Removed the paths.md convention for registering alternative paths — this was a lab-specific pattern that would be undiscoverable to other users without broader documentation.
  • Removed the CopyPathSection class which was defined but never used.
  • Removed several unused imports (copy, importlib, Process, Iterable, all_datadicts_from_hdf5, unwrap_optional).
  • The hardcoded lab-specific filenames in the sort logic (qpu_old.json, qpu_new.json, param_dict.json, directry_path.md) were replaced with a general type-based sort.
  • The sort is now user-toggleable via the menu bar rather than being hardcoded.

@marcosfrenkel marcosfrenkel changed the title Fork/andrea duina/monitr right window sorting monitr: right window file sorting and UX improvements May 28, 2026
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.

2 participants