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

Improve our 'Creating widgets' section #407

Merged
merged 12 commits into from
Apr 21, 2024
Merged

Conversation

lucyleeow
Copy link
Collaborator

@lucyleeow lucyleeow commented Apr 16, 2024

References and relevant issues

Follow on from #68

Description

  • adds more info on when you would want to choose each type of widget, clarifying that widgets with access to the native QWidget are equally extensible.
  • clarify you can use create_widget in any widget class
  • Move the "Avoid imports with forward references" info to plugin best practices, where we already have a section about avoiding unnecessary imports
  • Move 'magicgui function widgets as plugin contributions' to be next to the intro to magicgui function widgets

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 16, 2024
@lucyleeow
Copy link
Collaborator Author

cc @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.

@lucyleeow did a round of review!

[](magicgui-return-annotations) for information how to use `napari` types to add
output to the napari viewer.

Note all type annotations *require* that the resulting widget be added to a
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this mean? Why does the widget have to be added to a viewer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was definitely from Talley, and I wonder if it is a magicgui thing? Where the type annotation magic doesn't work until its added to a window? 🤷

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Amended, hopefully that is okay

docs/howtos/extending/magicgui.md Outdated Show resolved Hide resolved
docs/howtos/extending/magicgui.md Outdated Show resolved Hide resolved
docs/howtos/extending/magicgui.md Outdated Show resolved Hide resolved
docs/howtos/extending/magicgui.md Outdated Show resolved Hide resolved
@psobolewskiPhD psobolewskiPhD added this to the 0.5.0 milestone Apr 17, 2024
@lucyleeow
Copy link
Collaborator Author

Thank @DragaDoncila , I think I've addressed everything!

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.

Looks good to me! 🎉

@psobolewskiPhD psobolewskiPhD merged commit 9968121 into napari:main Apr 21, 2024
8 checks passed
@lucyleeow lucyleeow deleted the widget branch April 21, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants