use app-model for file menu#4865
Merged
DragaDoncila merged 174 commits intonapari:mainfrom Sep 13, 2023
Merged
Conversation
for more information, see https://pre-commit.ci
…into use-app-model
Contributor
|
CI failures here seem to be spurious: "Error: The operation was canceled." |
DragaDoncila
approved these changes
Sep 3, 2023
Contributor
There was a problem hiding this comment.
I've pulled this down again and tested with pyqt5, pyqt6, pyside5 and pyside6 and it's all working as expected. Thank you for all your work on this @lucyleeow, particularly pulling out the context keys into a separate PR. Would you mind updating the description so that it's ready for merge? Important things to mention I think would be:
- moved preference dialog stuff to
qt_main_window - separated registering of
npe1plugins for easy removal - updated the context key for selected layers so it's not enabled if there's no layers selected (different from main right?)
- maybe a quick note about the autouse fixtures
melissawm
pushed a commit
to melissawm/napari-docs
that referenced
this pull request
Sep 6, 2023
# Description This is a CI change that removes `qtgallery` in favor of a napari-specific scraper. It's not that different but gives us a little more control and is not much code. This seems to fix the error seen in "Build PR Docs" for napari/napari#4865 and also speeds up the docs build quite a bit (~11 min instead of ~25 min). I'm no Qt expert but suspect the main improvements here are related to adding `napari.Viewer.close_all()` (which maybe belongs in the reset fn) and calling `processEvents()` one more time after this. The main drawback right now is that this doesn't capture non-Viewer windows, but this could probably be added if needed. ## Type of change - [x] Fixes or improves workflow, documentation build or deployment # References closes #174 (maybe?) fixes errors in docs build for napari/napari#4865 ## Final checklist: - [x] My PR is the minimum possible work for the desired functionality - [x] I have commented my code, particularly in hard-to-understand areas
Contributor
|
Thanks @DragaDoncila, done! |
Contributor
|
Starting the 24 hour merge clock on this one folks! |
kne42
added a commit
to kne42/napari
that referenced
this pull request
Sep 19, 2023
* main: (26 commits) Fix some typing in napari.components (napari#6203) Use class name for object that does not have qt name (napari#6222) test: [Automatic] Constraints upgrades: `hypothesis`, `magicgui`, `psygnal`, `tensorstore`, `tifffile`, `tqdm`, `virtualenv` (napari#6143) Replace more np.all( ... = ...) with np.array_equal (napari#6213) remove np.all(... == ...) in test_surface.py (napari#6218) Ensure pandas Series is initialized with a list as data (napari#6226) Stop using temporary directory for store array for paint test (napari#6191) Bugfix: ensure thumbnail represents canvas when multiscale (napari#6200) cleanup np.all(... == ...) from test_points.py (napari#6217) [pre-commit.ci] pre-commit autoupdate (napari#6221) use app-model for file menu (napari#4865) Add tests to cover slicing behavior when changing layers and data (napari#4819) [pre-commit.ci] pre-commit autoupdate (napari#6128) Add test coverage for async slicing of labels (napari#5325) Add collision check when set colors for labels layer (napari#6193) Update "toggle ndview" text (napari#6192) Prevent layer controls buttons changing layout while taking screenshots with flash effect on (napari#6194) Fix typing in napari.utils.perf (napari#6132) Add GUI test coverage for changes to Labels.show_selected_label (napari#5372) Fix types in 'napari.utils.colormaps.categorical_colormap' (napari#6154) ...
DragaDoncila
pushed a commit
that referenced
this pull request
Sep 20, 2023
Reference: #4865 (comment) Move `test_file_menu.py` to new app model location, as `file_menu` no longer exists in `napari/_qt/menus` and this folder is scheduled to be removed as we move to app model. Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
DragaDoncila
pushed a commit
that referenced
this pull request
Sep 27, 2023
# References and relevant issues Clean up of missed items from #4865 # Description * use `:` instead of `.` between words in command ID, to make consistent with all other commands which all use `:` (and fix tests) * replace `&` with `&&` in full menu title, not just the sample display name
This was referenced Oct 10, 2023
Czaki
pushed a commit
that referenced
this pull request
Oct 25, 2023
# Description This is a CI change that removes `qtgallery` in favor of a napari-specific scraper. It's not that different but gives us a little more control and is not much code. This seems to fix the error seen in "Build PR Docs" for #4865 and also speeds up the docs build quite a bit (~11 min instead of ~25 min). I'm no Qt expert but suspect the main improvements here are related to adding `napari.Viewer.close_all()` (which maybe belongs in the reset fn) and calling `processEvents()` one more time after this. The main drawback right now is that this doesn't capture non-Viewer windows, but this could probably be added if needed. ## Type of change - [x] Fixes or improves workflow, documentation build or deployment # References closes #174 (maybe?) fixes errors in docs build for #4865 ## Final checklist: - [x] My PR is the minimum possible work for the desired functionality - [x] I have commented my code, particularly in hard-to-understand areas
jni
pushed a commit
that referenced
this pull request
Aug 9, 2024
# References and relevant issues closes #7165 # Description Correctly handles `stack` parameter in `_open_files_dialog`. This was due to a bad refactor in #4865 I noticed that we don't test any of the `QtViewer` `open_files...` or `open_folder...` methods. (Some are tested with the file menu but none of these seem to be tested in isolation?) I've added a new test file for these but only added a test for this instance. Maybe additional tests can be added in a follow up PR, in order to get this fix in quicker?
snorkelopstesting4-web
pushed a commit
to snorkel-marlin-repos/napari_napari_pr_4865_04cdc43f-8d5d-4379-9be4-6f952515fcd3
that referenced
this pull request
Oct 22, 2025
Original PR #4865 by tlambert03 Original: napari/napari#4865
snorkelopstesting3-bot
added a commit
to snorkel-marlin-repos/napari_napari_pr_4865_04cdc43f-8d5d-4379-9be4-6f952515fcd3
that referenced
this pull request
Oct 22, 2025
Merged from original PR #4865 Original: napari/napari#4865
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.
Migrate file menubar to app-model. Changes include:
qt_main_window.pycache_clearto_initialize_pluginsandinit_qactionsinmake_napari_viewerbecause thelru_cachepersisted