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

Move help actions under _qt and remove lambdas #6883

Merged
merged 5 commits into from
May 20, 2024
Merged

Conversation

lucyleeow
Copy link
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
Copy link

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
Contributor Author

cc @Czaki @DragaDoncila 🙏

Copy link
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
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
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
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
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
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
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
37 checks passed
@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.
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