Skip to content

Move help actions under _qt and remove lambdas#6883

Merged
jni merged 5 commits intonapari:mainfrom
lucyleeow:fix_help
May 20, 2024
Merged

Move help actions under _qt and remove lambdas#6883
jni merged 5 commits intonapari:mainfrom
lucyleeow:fix_help

Conversation

@lucyleeow
Copy link
Copy Markdown
Contributor

References and relevant issues

Closes #6744
Related: #6848 (comment)

Description

Move all help actions to _qt/ and remove lambdas and replace with partials.

@lucyleeow lucyleeow added the maintenance PR with maintance changes, label May 2, 2024
@lucyleeow lucyleeow added this to the 0.5.0 milestone May 2, 2024
@github-actions github-actions bot added the qt Relates to qt label May 2, 2024
@github-actions github-actions bot added the tests Something related to our tests label May 2, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.44%. Comparing base (f66fce6) to head (dc286b5).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6883      +/-   ##
==========================================
- Coverage   92.45%   92.44%   -0.02%     
==========================================
  Files         617      616       -1     
  Lines       55156    55150       -6     
==========================================
- Hits        50993    50981      -12     
- Misses       4163     4169       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lucyleeow
Copy link
Copy Markdown
Contributor Author

cc @Czaki @DragaDoncila 🙏

Copy link
Copy Markdown
Contributor

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

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

Works for me! Thanks @lucyleeow ❤️

@jni
Copy link
Copy Markdown
Member

jni commented May 16, 2024

I apologise if this is me being a goldfish 🐠, but why are they moved to Qt? I see nothing Qt related in them, and presumably if we have a different front-end one day, these actions can be used unchanged?

@jni
Copy link
Copy Markdown
Member

jni commented May 16, 2024

Nope, not me being a goldfish, just me not clicking through, or rather clicking "open in new tab" then not looking. 🤦

After discussing with @DragaDoncila, we think all the menu bar actions should be defined in one file in _qt - currently the only non-qt actions are some help menu actions that open a URL. Although these actions technically do not require QT as they are defined for the purpose of living in a menu, it should be considered a 'GUI' action.

@jni
Copy link
Copy Markdown
Member

jni commented May 16, 2024

Anyway I'm not super sure I'm convinced about the design but it's not a hard thing to revert.

@lucyleeow
Copy link
Copy Markdown
Contributor Author

lucyleeow commented May 16, 2024

The new layer menu actions have opened up some questions too. I'm just about to open a PR to start a discussion about this stuff. Please share your views there @jni (i'll ping you)!!

@DragaDoncila
Copy link
Copy Markdown
Contributor

I see nothing Qt related in them, and presumably if we have a different front-end one day, these actions can be used unchanged?

Yeah they're not qt related but they are only useful with a GUI. Since we don't have a "non qt but defs gui" folder, we've decided to move these here so that they're explicitly considered if a time comes when we want to make them available via a different front end.

I'm not in love with this either, but as Lucy says we've run into this question a few times so I think best is to merge this, and think about the separation of headless-gui-qt a bit more carefully in a broader sense.

@DragaDoncila
Copy link
Copy Markdown
Contributor

@jni I will add ready-to-merge here, but please feel free to request changes if you want more discussion

@DragaDoncila DragaDoncila added the ready to merge Last chance for comments! Will be merged in ~24h label May 17, 2024
@jni jni merged commit 2102518 into napari:main May 20, 2024
@github-actions github-actions bot removed the ready to merge Last chance for comments! Will be merged in ~24h label May 20, 2024
@lucyleeow lucyleeow deleted the fix_help branch May 20, 2024 11:02
DragaDoncila pushed a commit that referenced this pull request May 24, 2024
# Description
As menu actions are all one file (see #6848 and #6883), update the file
docstrings to remove mention of 'non-qt' actions.
andy-sweet pushed a commit to andy-sweet/napari that referenced this pull request May 28, 2024
# Description
As menu actions are all one file (see napari#6848 and napari#6883), update the file
docstrings to remove mention of 'non-qt' actions.
snorkelopstesting4-web pushed a commit to snorkel-marlin-repos/napari_napari_pr_6883_4923199f-52c0-4d28-9eb9-7250eb39b522 that referenced this pull request Oct 22, 2025
Original PR #6883 by lucyleeow
Original: napari/napari#6883
snorkelopstesting1-a11y added a commit to snorkel-marlin-repos/napari_napari_pr_6883_4923199f-52c0-4d28-9eb9-7250eb39b522 that referenced this pull request Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance PR with maintance changes, qt Relates to qt tests Something related to our tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove lambdas in help menu actions _help_actions.py

4 participants