-
-
Notifications
You must be signed in to change notification settings - Fork 445
Add creating image from clipboard #6532
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
Conversation
@psobolewskiPhD As requested. Any shortcut suggestions? |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6532 +/- ##
==========================================
- Coverage 92.30% 92.20% -0.10%
==========================================
Files 601 601
Lines 53707 53741 +34
==========================================
- Hits 49573 49554 -19
- Misses 4134 4187 +53 ☔ View full report in Codecov by Sentry. |
|
I'm not sure. For example, if I have selected point label, I expect to add something to this layer rather than insert new layer. |
I think we can assume that people only want to paste into a label if they copied from a label. This also won't generalize to nD if you want to somehow convert the image to labels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! A life changer! Highlight feature for me!
Made a small suggestion in the code to the name of the menu item, plus one more here because I can't suggest it:
I checked a number of GUI apps and New Foo...
in their File menus is always at the top, before Open, so I would request the same pattern here to be consistent.
e.g. see Apple UX guidelines:
https://developer.apple.com/design/human-interface-guidelines/the-menu-bar#File-menu
and windows ones:
https://learn.microsoft.com/en-us/windows/win32/uxguide/cmd-menus#standard-menus
For the shortcut, I would suggest Command+N
or Command-Shift+N
which are common for variants of New Foo...
in most apps (and is used by Apple Preview for this), but ImageJ uses Command-Shift+V
which also makes sense to me--either is fine.
Yeah IMO definitely not straight |
Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com>
@Czaki Sorry if I wasn't clear in my review comment. I'd also like to see the new menu item moved to the top of File menu, like the Apple and Windows UX guidelines. |
moved |
Beautiful! |
please do this. |
Seriously killer feature -- this is like a universal image importer 🤣 |
@psobolewskiPhD is that to say that, regarding menu contributions, you would also want our default empty layers and plugin contributions for new layers to live under |
@DragaDoncila Hmm. Tricky! I will note that in my browser Edit: also to be clear, In a new top-level Layers menu, I would expect |
I think in other software this is also true. So like, idk, Google docs opens .docx files but Google documents are not themselves .docx files. The more I think about it the more I guess it could be confusing if you imagine having other |
Makes sense. At the moment we don't have any sort of |
Talked about this in community meeting, but linking the plugin implementation I made. It looks like the same implementation so all is good to me! |
Oo! nice! never saw that plugin 😭 |
I have added information about lack of image, and added the option to paste copied files. |
I love the uRL behavior! copy zarr link, Command-N, boom in napari (with the ome-zarr plugin). Edit3: Interestingly it has to be a link--text of a URL is not sufficient. Edit: also, what about updating the splash/welcome screen? I made a PR to your branch: Edit2: removed ready to merge because there really isn't a rush on this (with it being 0.5.0) and getting everything clear is best |
Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com>
Should I fix this? The required change is to not depend only on |
Update welcome screen
is there an easy way to validate a string as URL? if not then maybe not worth it? Current functionality covers most use cases that could be considered "from Clipboard" vs. a "File > Open URL..." functionality. |
Now you could store a list of your project files in some note (split by line) and just open them all with |
Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com>
Love it! Small comment above I ran into with end-of-line/new-line characters. |
* main: Use blobs instead of random integers (napari#6527) Set default dtype for empty `_ImageSliceResponse` (napari#6552) Add creating image from clipboard (napari#6532) Fix check if plugin is available from conda (napari#6545) Fix generation of layer creation functions docstrings (napari#6558) Print a whole stack if throttler is not finished (napari#6549) Update `app-model`, `babel`, `coverage`, `dask`, `fsspec`, `hypothesis`, `imageio`, `ipython`, `lxml`, `magicgui`, `pandas`, `pint`, `psutil`, `pydantic`, `pyqt6`, `pytest-qt`, `tensorstore`, `tifffile`, `virtualenv`, `xarray` (napari#6478) Minimal changes for mlx (and jax) compatibility for Image layers (napari#6553) [pre-commit.ci] pre-commit autoupdate (napari#6528) Moving IntensityVisualizationMixin from _ImageBase to Image (napari#6548)
# References and relevant issues Depends on napari/napari#6532 # Description This PR adds mentions of the new feature: File menu item `New Image from Clipboard` to the `viewer tutorial` as well as the `getting started` and `quick start` guides. --------- Co-authored-by: Lucy Liu <jliu176@gmail.com> Co-authored-by: Genevieve Buckley <30920819+GenevieveBuckley@users.no 7878 reply.github.com>
References and relevant issues
closes #6531
Description
Add option to create image layer from clipboard