Skip to content
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

Clean status message after leave canvas #4607

Merged
merged 13 commits into from
Jun 8, 2022

Conversation

Czaki
Copy link
Collaborator

@Czaki Czaki commented Jun 2, 2022

Description

This PR fix lack of update of status bar when mouse leave canvas or dim slider was updated

Type of change

  • Bug-fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

References

fix #4606

How has this been tested?

  • example: the test suite for my feature covers cases x, y, and z
  • example: all tests pass with my change
  • example: I check if my changes works with both PySide and PyQt backends
    as there are small differences between the two Qt bindings.

Final checklist:

  • My PR is the minimum possible work for the desired functionality
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • If I included new strings, I have used trans. to make them localizable.
    For more information see our translations guide.

@github-actions github-actions bot added the qt Relates to qt label Jun 2, 2022
Comment on lines 177 to 184

def enterEvent(self, event):
self.enter.emit()
super().enterEvent(event)

def leaveEvent(self, event):
self.leave.emit()
super().leaveEvent(event)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vispy does not provide leave/enter events so there is a need to workaround this.

@psobolewskiPhD
Copy link
Member

I like the way the status display works with this PR: showing values if mouseover data, showing coordinates if mouseover canvas, showing nothing if outside canvas.
I think this is intuitive and a nice improvement.

But the other change in behavior is odd? I'm referring to the 2nd issue I mention here:
#4606 (comment)
If the mouse is fixed above a data point, but the slider is moved with arrow keys.
So on live, the status isn't updated at all.
With this PR the value is updated, but not the coordinates; only 1 is changing, that of the slider, the mouse is fixed.

@Czaki
Copy link
Collaborator Author

Czaki commented Jun 2, 2022

But the other change in behavior is odd? I'm referring to the 2nd issue I mention here:

Thanks for pointing this out. I focus only on value and forgot about the cursor position. Could you check the current version?

@psobolewskiPhD
Copy link
Member

psobolewskiPhD commented Jun 3, 2022

Looks good to me!

I wonder if at the same time we could kill another visual glitch:
With cells3D sample open, hover your mouse in the upper right area of the image.
For example, you will get something like nuclei [30 30 30]: 10000
But now move the mouse to the right half and you will get:
nuclei [ 30 30 120]: 10000
Notice there is a space after the first bracket now!
If you watch while sliding the mouse, you will see the extra space pop up.
Edit: the same thing happens if you move your mouse down in y instead of across in x.
It's minor, but somehow eye-catching and bothersome to me 🤣

@Czaki
Copy link
Collaborator Author

Czaki commented Jun 3, 2022

These additional spaces come from this how numpy.ndarray define its __str__ operator. It uses an equal length column. I change the method of print coordinate in the last commit. Could you check?

@psobolewskiPhD
Copy link
Member

Looks good on my end!
🙏
(checked with >100 z slices too, also fine)

@github-actions github-actions bot added the tests Something related to our tests label Jun 3, 2022
@codecov
Copy link

codecov bot commented Jun 4, 2022

Codecov Report

Merging #4607 (684c2b2) into main (7b940da) will increase coverage by 1.62%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #4607      +/-   ##
==========================================
+ Coverage   84.42%   86.04%   +1.62%     
==========================================
  Files         612      584      -28     
  Lines       51549    50012    -1537     
==========================================
- Hits        43519    43032     -487     
+ Misses       8030     6980    -1050     
Impacted Files Coverage Δ
napari/_qt/qt_viewer.py 70.24% <100.00%> (+0.54%) ⬆️
napari/_qt/widgets/qt_welcome.py 87.01% <100.00%> (+1.50%) ⬆️
napari/_tests/test_viewer.py 96.04% <100.00%> (+0.02%) ⬆️
napari/components/_tests/test_viewer_model.py 100.00% <100.00%> (ø)
napari/components/viewer_model.py 96.61% <100.00%> (-0.19%) ⬇️
napari/utils/status_messages.py 96.15% <100.00%> (ø)
napari/utils/tree/node.py 84.09% <0.00%> (-15.91%) ⬇️
napari/layers/tracks/_track_utils.py 88.06% <0.00%> (-3.41%) ⬇️
napari/utils/action_manager.py 83.17% <0.00%> (-0.94%) ⬇️
napari/utils/events/containers/_nested_list.py 92.45% <0.00%> (-0.93%) ⬇️
... and 46 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b940da...684c2b2. Read the comment docs.

napari/_qt/qt_viewer.py Outdated Show resolved Hide resolved
napari/_qt/qt_viewer.py Outdated Show resolved Hide resolved
napari/_qt/widgets/qt_welcome.py Outdated Show resolved Hide resolved
@alisterburt
Copy link
Contributor

looks good! requested a few minor changes but will be good to get this in, thanks @Czaki and @psobolewskiPhD !

I re-ran CI to see if we can avoid this Qt viewer cleanup thing

napari/_qt/widgets/qt_welcome.py Outdated Show resolved Hide resolved
napari/_qt/widgets/qt_welcome.py Outdated Show resolved Hide resolved
napari/_qt/widgets/qt_welcome.py Outdated Show resolved Hide resolved
@alisterburt
Copy link
Contributor

alisterburt commented Jun 5, 2022

thanks for that @Czaki - I pushed a few commits fixing some minor typos but otherwise this now looks good to me!

@Czaki
Copy link
Collaborator Author

Czaki commented Jun 5, 2022

thanks for that @Czaki - I pushed a few commits with some minor typos but otherwise this now looks good to me!

One remark. There is an option to commit all such changes in one commit (from Files Change view). This will reduce CI usage.

Copy link
Member

@andy-sweet andy-sweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great and works well! I only have a couple of minor comments, though there may be a missing translation here.

Otherwise, I'll likely merge this in the next 24 hours.

.gitignore Show resolved Hide resolved

def _enter_canvas(self):
"""enable status on canvas enter"""
self.viewer.status = "Ready"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: I'm not convinced how useful this is, so I'd consider removing it. But I don't have strong feelings.

If you do want to keep it then I think it should be a translated string right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is also a lack of translation. Should I replace both places for consistency?

status: str = 'Ready'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that's where this comes from! Thanks for the pointer!

I think my dream would be to define a constant in viewer_model.py like STATUS_DEFAULT = trans._('Ready'), then use that in both places. What do you think? Even you like it, definitely feel free to write up an issue or do that in a separate PR if you want to get this one in without another change.

@alisterburt alisterburt merged commit 5d46dda into napari:main Jun 8, 2022
@alisterburt
Copy link
Contributor

Thanks @Czaki @andy-sweet ! Merge time

@Carreau Carreau added this to the 0.4.17 milestone Jun 9, 2022
@Czaki Czaki deleted the bugfix/status_update branch June 10, 2022 16:30
tlambert03 added a commit to tlambert03/napari that referenced this pull request Jul 8, 2022
* Clean status message after leave canvas (napari#4607)

* Raise error when rgb True but data not correct dims (napari#4630)

* add ci for asv benchmark suite (napari#4554)

* add ci for asv benchmark suite

* ignore git-lfs stuff?

* split qt from non-qt

* asv: provide custom uninstall command too

* fix yml

* matrix goes under strategy!

* ugh, it's 'uninstall', not 'remove'

* disable build_command

* underscore...

* it has to be a binary in PATH?

* use a different null command

* always yes for pip

* setup qt libs

* use xvfb

* try GabrielBB/xvfb-action

* parameterize 'run'

* add asv quick checks to PR CI

* use osx for qt benchmarks?

* adjust conf path

* fix asv check

* better comment

* add asv run quick to see how long it takes

* asv machine first

* split into another job

* oops typo

* move 'asv checks' to comprehensive

* used sed -E for linux/osx compat

* fix time_on_mouse_move

* skip some tests due to OOM on CI

* handle OOM errors in Labels3DSuite too

* increase timeout

* remove None case from TextManagerSuite

* prevent out of bounds error by allowing only one run per setup in time_remove_as_batch

* configure for label-based triggers

* draft support for scheduled runs and workflow_dispatch

* typo

* fix assigned var

* add delegated workflow that enables comments on PR

* message.txt only needed in PRs

* add some more comments

Co-authored-by: andy-sweet <andy-sweet@users.noreply.github.com>

* do not indent that if

* explicit timeout

Co-authored-by: andy-sweet <andy-sweet@users.noreply.github.com>

* Speed up notebook display tests  (napari#4641)

* test: speed up notebook test by not using viewer to check alt text

* style: pre-commit

* Remove sleep and wait with default timeout instead (napari#4638)

* Update installation instruction in documentation (napari#4639)

* update information about minimal python version

* add information about conda PySide2 install

* Update docs/tutorials/fundamentals/installation.md

Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com>

* fix installation command

Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com>

* test: Speed up test_viewer tests, split out pyqt5/pyside2 tests again (napari#4646)

* pull out alt-text parameters from viewer

* test: speed up notebook test by not using viewer to check alt text

* style: pre-commit

* magicgui tests work with xdist

* move magicgui test

* refactor keybindings test

* split tests

* fix mac

* fix tox params, and viewer test

* cancel previous  runs

* bump codecov

* explicit backends

* fix win 3.10

* mac to 3.9

* try pip

* fix extra name

* back to tox

* back to tox

* fix env factors

* undo some changes

* remove more whitespace

* add backend to minreq

* try pyside2 on mac

* back to pyqt5 on mac

* 3.10 for mac

* try xdist

* bump maxfail

* undo xdist change

* Add tests for qt_progress_bar.py (napari#4634)

* add tests for qt_progress_bar.py

* coverage _get_value

* More updates to the ignored translations file and translation CI infrastructure (napari#4596)

* rewrite JSON, sorting keys

* Update logic to not reorder strings.

* update json removing nonexisting strings

* fix a couple of pytest fixtures

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* build: slight updates/de-dups in setupcfg (napari#4645)

* build: slight updates/de-dups in setupcfg

* unpin lxml, remove semgrep

* Restore "show all key bindings" shortcut  (napari#4628)

* cleaning code

* provide consistency in shortcut representation

* add shortcut for shortcuts show

* fix test

* add test for action

* ci: fix tox factor names in tests (napari#4660)

* ci: fix tox factor names in tests

* ci: cancel previous runs

* Limit comprehensive test concurrency to 1. (napari#4655)

Just to make sure we don't block testing PRs with main

Mitigate napari#4653

* Do not run `asv` on push (napari#4656)

* do not run asv on test_comprehensive

* report failures as issue if non-PR

* test: speed up magicgui forward ref tests (napari#4662)

* test: speed up magicgui forward ref tests

* test: fix expected layer methods

* Allow to trigger test_translation manually (napari#4652)

* do not use keyword argument for QListWidgetItem (napari#4661)

* Enable patch coverage reporting (napari#4632)

* enable patch coverage

* set target to 0% to get only information

Co-authored-by: Talley Lambert <talley.lambert@gmail.com>

* Move test examples on end of test run them in different CI job  (napari#4647)

* move test examples on end

* allow test because of test order

* skip examples by marker

* exclude examples from test run

* fix tox after merge

* fix conf

* fix failing test

* proper test order on windows

* Apply suggestions from code review

Co-authored-by: Talley Lambert <talley.lambert@gmail.com>

Co-authored-by: Talley Lambert <talley.lambert@gmail.com>

* Fix docs for shape/points layer properties (napari#4659)

* fix names of future shape/points properties

* Also fix current_opacity to opacity

* shape opacity applies to all shapes

* Update docs/howtos/layers/points.md

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* feat: add codespace (napari#4599)

* feat: add codespace

* fix: fix check manifest

* Alternate fix for alt-text issues (napari#4617)

* Alternate fix for alt-text issues

* Re-escape alt-text

* Re-remove meshzoo

* Update explanatory comments

* add dependabot for github actions (napari#4671)

* ci(dependabot): bump peter-evans/create-pull-request from 3 to 4 (napari#4675)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump docker/build-push-action from 2.5.0 to 3 (napari#4676)

* ci(dependabot): bump docker/build-push-action from 2.5.0 to 3

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.5.0 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@ad44023...e551b19)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update .github/workflows/docker-singularity-publish.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Talley Lambert <talley.lambert@gmail.com>

* ci(dependabot): bump docker/metadata-action from 3 to 4 (napari#4679)

Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 4.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](docker/metadata-action@v3...v4)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump toshimaru/auto-author-assign from 1.3.4 to 1.5.0 (napari#4678)

Bumps [toshimaru/auto-author-assign](https://github.com/toshimaru/auto-author-assign) from 1.3.4 to 1.5.0.
- [Release notes](https://github.com/toshimaru/auto-author-assign/releases)
- [Changelog](https://github.com/toshimaru/auto-author-assign/blob/main/CHANGELOG.md)
- [Commits](toshimaru/auto-author-assign@v1.3.4...v1.5.0)

---
updated-dependencies:
- dependency-name: toshimaru/auto-author-assign
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Multi-color text with color encodings (napari#4464)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Optimization: convert point slice indices to floats (napari#4648)

* ci(dependabot): bump actions/setup-python from 3 to 4 (napari#4677)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add "Processors": (generalize magicgui return type behavior outside of magicgui) (napari#4543)

* formatting

* add setter

* add test

* extend test

* add test

* make clobber False by default

* wip

* wip, converting magicgui processors

* add add_layer

* Update napari/utils/_injection.py

Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* Update napari/utils/_injection.py

Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* Update napari/utils/_injection.py

Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* Update napari/utils/_injection.py

Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* adding tests

* start on worker

* single import

* fix typing

* fix test

* rearrange

* sort lines

* minor

* docs: update docstrings

* use zeros

* get rid of thread

* rename to providers/processors, add decorator

* update docstring

Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* fix: fix manifest reader extensions, ensure that all builtins go through npe2 (napari#4668)

* fix: fix manifest reader extensions

* test: fix tests

* add warning

* add warning

* remove mistake file

* update another test

* fix another test

* revert napari#4575

* some more, but not all, fixed

* remove comment

* change napari builtins display name

* simplify get_potential_readers

* fix one more test

* skip some tests

* fix typecheck

* fix qt tests

* fix another qt test

* remove breakpoint

* remove napari hook implementation

* fix test_get_writer

* sort writer extensions

* remove initialize stuff

* fix cli show test

* bump svg

* allow use of validate_all=True on nested evented models (napari#4551)

* allow validate_all again

* rename to _protocols

* oops

* fix protocol more general

* use normal instance check

* reset source for all fields, not just mutable ones

* recursive source reset

* fix status of nap1 (napari#4685)

* [pre-commit.ci] pre-commit autoupdate (napari#4687)

updates:
- [github.com/asottile/pyupgrade: v2.32.1 → v2.34.0](asottile/pyupgrade@v2.32.1...v2.34.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add new core devs to docs (napari#4691)

* Remove unused points _color state (napari#4666)

* Remove unused function and state

* Also remove unneeded addition

* Add function back

* Clean up PR

* Define different shortcuts for different screenshot actions in file menu (napari#4636)

* test: Cleanup usage of npe2 plugin manager in tests (napari#4669)

* fix: fix manifest reader extensions

* test: fix tests

* add warning

* add warning

* remove mistake file

* update another test

* fix another test

* revert napari#4575

* some more, but not all, fixed

* remove comment

* change napari builtins display name

* simplify get_potential_readers

* fix one more test

* skip some tests

* fix typecheck

* fix qt tests

* fix another qt test

* starting on new pm fixtures.  working sample hook

* update save layers and test reader plugins

* plugins module working

* remove tmp_reader

* more reduction

* finish viewer model

* update qt dialogs

* finish qt_extension2reader

* fix file menu

* add comments

* remove breakpoint

* fix layers

* fix components

* add builtins to examples test

* remove napari hook implementation

* fix test_get_writer

* sort writer extensions

* remove initialize stuff

* fix cli show test

* bump svg

* fix test

* use npe2 0.4.0

* more simplifications

* Update napari/conftest.py

Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com>

* remove xfail

* add comment

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Remove unnecessary uses of make_napari_viewer (replace with ViewerModel) (napari#4690)

* remove from experimental chunk

* two more in qt

* bunch more

* remove more

* add back one

* bump npe2, use new features (napari#4686)

* Remove `restore_settings_on_exit` test util (napari#4673)

* fix: fix manifest reader extensions

* test: fix tests

* add warning

* add warning

* remove mistake file

* update another test

* fix another test

* revert napari#4575

* some more, but not all, fixed

* remove comment

* change napari builtins display name

* simplify get_potential_readers

* fix one more test

* skip some tests

* fix typecheck

* fix qt tests

* fix another qt test

* starting on new pm fixtures.  working sample hook

* update save layers and test reader plugins

* plugins module working

* remove tmp_reader

* more reduction

* finish viewer model

* update qt dialogs

* finish qt_extension2reader

* fix file menu

* add comments

* remove breakpoint

* fix layers

* fix components

* add builtins to examples test

* remove restore_settings_on_exit

* add comment

* remove napari hook implementation

* fix test_get_writer

* sort writer extensions

* remove initialize stuff

* fix cli show test

* bump svg

* fix test

* remove unneeded line

* fix test

* Add modal dialogs for window/application closure (napari#4637)

Co-authored-by: alisterburt <alisterburt@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Juan Nunez-Iglesias <jni@fastmail.com>

* Design issue template assignees (napari#4701)

Issue template for design-related issues now should auto-assign any created issues to Lisa and Isabela (formerly it assigned to Lia)

* Keep order of layers when select to save multiple selected layers (napari#4689)

* honor confirm close settings when quitting (napari#4700)

* honor confirm close settings on quit

* update string

* Update napari/settings/_application.py

Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>

* Update napari/settings/_application.py

Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>

Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>

* Add option to use npe2 shim/adaptor for npe1 plugins (napari#4564)

* add opt-in npe2 shim

* add comment

* show shims in plugin installer

* don't use mock

* fix: fix manifest reader extensions

* test: fix tests

* add warning

* add warning

* remove mistake file

* update another test

* fix another test

* revert napari#4575

* some more, but not all, fixed

* remove comment

* change napari builtins display name

* simplify get_potential_readers

* fix one more test

* skip some tests

* fix typecheck

* fix qt tests

* fix another qt test

* remove breakpoint

* remove napari hook implementation

* fix test_get_writer

* update docs

* add trans

* add requires restart

* use requires_restart

* Use python 3.9 for mac tests until numcodecs 3.10 wheels are available (napari#4707)

* Apply shown mask to points._view_size_scale (napari#4699)

* Apply shown mask to points._view_size_scale

* Added two tests for points related to the view_size and shown

* Add test case for view_size if no point is shown

* Update test to check for the actual dimension as well

* Put a comment explaining the 3 if statements

* Merge two tests into one for view_size

Co-authored-by: Markus Stabrin <markus.stabrin@gmail.com>

* remove print (napari#4718)

* Use `cache: pip` from actions setup-python (napari#4672)

* try pip cache

* more cache

* tox vv

* use cache in comprehensive too

* remove verbose

* use same coverage report like in pull requests (napari#4722)

* fix presentation and enablement of npe1 plugins (napari#4721)

* Improvements on scale bar (napari#4511)

* Background box under scale bar to improve legibility

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Now possible to change the color of scale bar and surrounding box

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* updated test and clean up for box visibility

* scale bar color now managing all allowed color formats. Tests updated

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Removed unused import of Union

* Simplify logic and add docs

* Make colors non-optional

* Fix initial box color

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* napari.viewer.current_viewer fallback ancestor (napari#4715)

* napari.viewer.current_viewer fallback ancestor

The use case is modal dialogs from magicgui.request_values, who have no parent. If they wish to use a layer, they must get that layer from the current viewer.

* Fix test_magicgui_get_viewer

This was broken as it now returns current_viewer where it did not
before. Now, we ensure that a parent-less widget returns current_viewer,
  and a child widget returns its parent viewer

* Test current_viewer behavior

At the request of @ctrueden

* Add NAP-3: Spaces (napari#4684)

* nap 3

* finish up first draft of nap3

* address comments and fix grammar

* incorporate some comments

* Color edit without tooltip fix (napari#4717)

* Fix typo in QColorSwatchEdit

* Add a new test for QColorSwatch

* Use some features from npe2 v0.5.0 (napari#4719)

* bump version

* use npe2pm

* Update translation documentation link in pull request template (napari#4728)

* Refactor label painting by moving code from mouse bindings onto layer, adding staged history and paint event (napari#4702)

* Fix bug in deepcopy of utils.context.Expr (napari#4730)

* add tests for deepcopy of Expr

* fix repr test on 3.8

* fix test again

* Update napari/utils/context/_expressions.py

* try to fix typing

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>

* Tracks tail update fix beyond _max_length (napari#4688)

* Auto-update _max_length upon setting tail_length

* Remove tail_length clipping by _max_length upon update

* Move track display limits to constructor

* - Auto-update _max_length upon setting head_length
- Remove head_length clipping by _max_length upon update

* Add test cases for length change

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* split Image `interpolation` on two properties, `interpoltion2d` and `interpolation3d`  (napari#4725)

* add name migration mechanism

* split interpolation on 2 properties

fix tests

* make interpolation event deprecated

* add remove version to `rename_argument` decorator

* verify if only one name of argument is used

* change to deprecation warnings

* make interpolation getter deprecated

* move intepolation event to new setters

* add type annotation for better refactor support

* fix test

* fix tox file

* fix tox 2

* fix tox 3

* Fix Image parameter docs (napari#4750)

* Fix `_get_state` for empty Vectors and Points layers (napari#4748)

* Add a public API for the setGeometry method of _qt_window (napari#4729)

Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Do not inform about coverage untill all CI jobs are done (napari#4751)

* do not inform about coverage untill all jobs are done

* fix codecov.yaml

* reduce number

* Allow pandas.Series as properties values (napari#4755)

* Allow pandas.Series as properties values

* Add numpy array to the tests and mixed cases

* Add series property tests to points layer

* Adjust according to reviews

* Remove debug prints

* ci(dependabot): bump docker/login-action from 1.9.0 to 2 (napari#4774)

Bumps [docker/login-action](https://github.com/docker/login-action) from 1.9.0 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@28218f9...49ed152)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump bruceadams/get-release from 1.2.2 to 1.2.3 (napari#4773)

Bumps [bruceadams/get-release](https://github.com/bruceadams/get-release) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/bruceadams/get-release/releases)
- [Commits](bruceadams/get-release@v1.2.2...v1.2.3)

---
updated-dependencies:
- dependency-name: bruceadams/get-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump actions/github-script from 5 to 6 (napari#4772)

Bumps [actions/github-script](https://github.com/actions/github-script) from 5 to 6.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](actions/github-script@v5...v6)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump actions/download-artifact from 2 to 3 (napari#4771)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump styfle/cancel-workflow-action from 0.9.1 to 0.10.0 (napari#4770)

Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.9.1 to 0.10.0.
- [Release notes](https://github.com/styfle/cancel-workflow-action/releases)
- [Commits](styfle/cancel-workflow-action@0.9.1...0.10.0)

---
updated-dependencies:
- dependency-name: styfle/cancel-workflow-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Make references to examples link there (napari#4767)

* docs/index: fix references to main branch

* Make references to examples folder link there

* fix clim init for dask arrays (napari#4724)

* fix clim init for dask arrays

* fix tensorstore

* avid double-calculation

* add test for clim

* move test to dask and make sync only

* use normalize_dtype

* Set focus on `QtViewer` object after creating main window (napari#4768)

* Add missed call of `running_as_bundled_app` in `__main__` (napari#4777)

* Add public API for dims transpose (napari#4727)

* Update dims.py

Add public API for dims transpose

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove _transpose usage, deprecate it and fix typos

* Fix typo

* Update napari/components/dims.py

Co-authored-by: Kevin Yamauchi <kevin.yamauchi@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update dims.py

Remove old _transpose private method

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
Co-authored-by: Kevin Yamauchi <kevin.yamauchi@gmail.com>

* Use `npe2 list` to show plugin info (napari#4739)

* use npe2 list for plugin info

* bump npe2

* fix test

* fix test

* Fix source of copied layer events by use `layer.as_layer_data_tuple` (napari#4681)

* Fixing readme typo (napari#4791)

* readd ensure_unique

Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
Co-authored-by: Lucy Liu <jliu176@gmail.com>
Co-authored-by: Jaime Rodríguez-Guerra <jaimergp@users.noreply.github.com>
Co-authored-by: andy-sweet <andy-sweet@users.noreply.github.com>
Co-authored-by: Talley Lambert <talley.lambert@gmail.com>
Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>
Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com>
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Guillaume Witz <guiwitz@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: alisterburt <alisterburt@gmail.com>
Co-authored-by: Juan Nunez-Iglesias <jni@fastmail.com>
Co-authored-by: Lia Prins <53277128+liaprins-czi@users.noreply.github.com>
Co-authored-by: Markus Stabrin <markus.stabrin@mpi-dortmund.mpg.de>
Co-authored-by: Markus Stabrin <markus.stabrin@gmail.com>
Co-authored-by: Pierre Thibault <pierrethibault@users.noreply.github.com>
Co-authored-by: Gabriel Selzer <gjselzer@wisc.edu>
Co-authored-by: cnstt <104427648+cnstt@users.noreply.github.com>
Co-authored-by: Kushaan Gupta <gkushaan@rediffmail.com>
Co-authored-by: David Stansby <dstansby@gmail.com>
Co-authored-by: Curtis Rueden <ctrueden@wisc.edu>
Co-authored-by: Kevin Yamauchi <kevin.yamauchi@gmail.com>
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
@tlambert03 tlambert03 added bug Something isn't working and removed tests Something related to our tests labels Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working qt Relates to qt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coords displayed should update with dimension slider movement
6 participants