Open seankmartin opened 1 year ago
One thing that would be nice to add into the publishing step is some information about the npe2api and how this relates to and forms the backbone of the napari plugin installer menu. For instance, that the installer menu is populated from the summary information for each plugin.
This could also be a good place to bring up bundled napari support - since I think (and please correct me if I have this wrong, I'm not 100% versed on the npe2api) that a napari plugin only supports bundled napari if it exists at https://npe2api.vercel.app/api/conda/{plugin-name} and the conda_platforms information matches your OS.
Also, it would seem to me that all of the plugins in npe2api errors.json can't be used in the napari viewer due to manifest (or other) errors? If that is correct - then we could point out to check this page to make sure your plugin is not there!
This looks outstanding! Wow! Thanks for putting the time into this. I think this is a great idea and a really important issue to adress.
One tiny note, but in that mockup I think it may worth emphasizing and splitting the paths for the two personas even more. I doubt there is any overlap between them in terms of content expectations. Maybe arrange the two persona tiles side by side? or using tabs like some of the other docs where we have pip and conda or something?
This is a possible set of PRs that might be required to achieve this restructure and addition of content. The PR groupings are suggested in the order shown below, but the PRs within each group can be tackled in any order. The main motivation for the groupings are in order to get some potentially high value PRs merged early on, and to provide reference material for later PRs. However, there should be no hard dependencies between PRs in different groups. The PRs are also linked to some existing issues that may be solved by that PR. At the end of this document is a visual representation of which parts of the restructure are being tackled by these PRs.
![PR Heirarchy Proposal](https://github.com/napari/docs/assets/21295664/f667cefc-aa72-4e76-adf1-6c431d382deb)
cc @DragaDoncila @dgmccart
One thing that came to mind is explaining/contrasting plugins vs. widgets. A plugin can have a widget, but you can also make widgets without a plugin.
Tracking related PRs:
📚 New content request
Hello everyone!
The napari plugin ecosystem and the content at napari.org/plugins have been growing rapidly, and it would be beneficial to reorganize the plugin documentation to improve navigation. Here is a proposal for restructuring the existing plugin-related content and introducing new valuable information. This layout has already been shared with @DragaDoncila and the initial round of feedback has been incorporated into this proposal. Please add any suggestions or comments regarding this proposal - I'd love to hear your thoughts!
Mock-up of the plugins main page
Here is a mock-up of the proposed site layout at a top level:
Proposed plugin documentation structure
Click to view the full plugin site layout proposal
![napari-plugin-proposal](https://github.com/napari/docs/assets/21295664/3e0b37b2-a776-4eb2-9ef2-0b72cc67f35a)
Click to view the proposed table of contents
* Getting started * Finding and installing plugins * What plugins can provide * How to use plugins * Getting support for plugins * Tutorials * Filtering plugins on napari hub * Using plugins for cell segmentation * Converting a napari script into a plugin * Building a full plugin * Building a plugin * Your first plugin * Plugin anatomy * Plugin contributions * Key concepts for plugins (e.g. multithreading) * Debugging during plugin development * Best practices * User experience guidelines * Overview of user experience * Consistency with napari * Menus and tooltips * Containers and tabs * Testing and publishing * Testing guidelines * Describing and categorising your plugin * Setting up the napari hub plugin preview page * Enhance your plugin's reach and demonstrate quality * In depth-guide to plugin testing (converted workshop content) * Advanced topics * Migration to npe2 * First generation plugins * Technical references * Plugin contributions reference * Plugin manifest reference * PyPI and napari hub metadata linking reference
How this proposal was developed
The proposed reorganisation and new pages have tried to follow the ideas from the Diátaxis framework, splitting documentation into Tutorials (step by step lessons or learning experiences), How-to guides (directions to solve specific problems), Explanations (understanding oriented discussions), and Reference (information-oriented technical descriptions) pages. The layout draws inspiration from the documentation of other open source projects with plugin or extension capabilities, napari plugin related content in external sites, and the recent updates to the napari.org site to use grid layouts on index pages.
This layout aims to achieve two main objectives:
Aim 1: align documentation with user/developer flow
Click to view personas and flow diagrams
![napari-plugin-flows](https://github.com/napari/docs/assets/21295664/915247bb-c2c6-4012-bd0b-445aca94a616)
The goal is to divide the documentation into pages that cater to either users or developers. We assume that plugin users want to discover, install, and effectively utilise plugins to solve their problems. On the other hand, plugin developers want to build and maintain plugins to support the users. The documentation should align with the typical flow for both users and developers, considering that these groups are not mutually exclusive. Additionally, this division between users and developers can also help describe when a user might consider becoming a plugin developer, how to do so, and what makes a great plugin. For example, this information would be useful if a user wants to share their napari script or widget with others or contribute to an existing plugin.
Aim 2: centralise plugin information
Currently, there is a wealth of information for plugin users and developers, but it is somewhat scattered. The goal is to centralise this information on the plugins site. Importantly, the aim is not to duplicate content on napari.org but to provide short summaries and cross-link to the relevant main information page. At the end of this issue, you'll find a non-exhaustive table which lists many of the current resources that are available for plugin developers and users.
The location of napari hub related documentation
The proposal includes incorporating some napari hub related documentation on the napari site. This is in an effort to encapsulate information in one highly discoverable documentation area, benefiting both the typical user journey, which often involves finding plugins on the napari hub, and the typical developer journey, which usually ends with publishing their package to PyPI and the napari hub. By placing napari hub related information on the napari site, it may make it clearer how to use the built in napari functionality (such as the plugin installer menu) in conjunction with or separately from the napari hub. Additionally, it may help clarify the usage of plugin metadata by napari itself, its usage by the napari hub, and the overlap between them.
However, very good cases can also be made for keeping napari.org/plugins completely separate from hub related information. In this case, perhaps that information could be placed on the napari hub and cross linked to from this documentation.
Implementation
The implementation of this proposal would involve:
This process would likely occur in stages. The reorganisation of the existing documentation would be prioritised, allowing it to be available in the new structure as soon as possible. The consolidation of existing information would follow, and new pages would be created as time permits.
Related issues
There is one main open issue with some overall suggestions on how to structure and add to the plugin developer information (as opposed to a specific page change, for e.g.), which could be integrated as part of this effort #25. However, there are also many open issues related to specific changes to certain pages. These issues are not listed here to maintain focused on the overall structural improvements.
Resources for documentation
Here is a non-exhaustive list of resources that are currently available for plugin developers and users. These resources could all be valuable in the creation of the new plugin documentation.
Click to view the plugin documentation resources
| Category | Name | Location | Content | Target | | -------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | | General | Napari website | [https://napari.org/stable/](https://napari.org/stable/) | How to install and use Napari with examples. Community and contributing guide. API reference. In depth explanations. Roadmap and changelog. | user, developer | | General | Magicgui website | [https://napari.org/magicgui/](https://napari.org/magicgui/) | How to create automatic Qt widgets with API and examples. | user, developer | | Support | Image.sc Forum | [https://forum.image.sc/tag/napari](https://forum.image.sc/tag/napari) | General help with Napari for users and developers. | user, developer | | Support | Zulip chat | [https://napari.zulipchat.com](https://napari.zulipchat.com) | Developer focused help and discussion, more technical discussions. | developer | | Support | Email hub team | [team@napari-hub.org](mailto:team@napari-hub.org) | Contact the hub team directly for queries. | developer | | Plugins | Napari plugins | [https://napari.org/stable/plugins/](https://napari.org/stable/plugins/) | How to build a plugin, and what plugins can provide. How to test plugins. Difference between npe2 and v1 plugins. Note on installing plugins. | developer | | Plugins | Hub | [https://www.napari-hub.org/](https://www.napari-hub.org/) | Search for plugins and discover plugins. Link with PyPI for plugins. | user, developer | | Plugins | Hub FAQ | [https://www.napari-hub.org/faq](https://www.napari-hub.org/faq) | Address common questions around using napari, finding plugins, and building / sharing plugins. | user, developer | | Plugins | Hub GitHub | [https://github.com/chanzuckerberg/napari-hub/wiki](https://github.com/chanzuckerberg/napari-hub/wiki) | Guide to the hub team, and a developers guide to using the Napari hub. | developer | | Plugins | Cookiecutter | [https://github.com/napari/cookiecutter-napari-plugin](https://github.com/napari/cookiecutter-napari-plugin) | A template for creating new plugins for Napari following the suggested project structure. | developer | | Plugins | Hub preview | [https://github.com/apps/napari-hub](https://github.com/apps/napari-hub) | Preview a napari hub page before release to improve the listing. Integrates with GitHub. | developer | | Plugins | npe2 GitHub | [https://github.com/napari/npe2](https://github.com/napari/npe2) | Guide to convert old plugins to the new npe2 plugin format. Documentation that is pulled into the main napari site about what plugins can provide. | developer | | Plugins | Magicgui examples | [https://github.com/napari/magicgui/tree/main/examples](https://github.com/napari/magicgui/tree/main/examples) | Examples of how to use Magicgui widgets | developer | | Assorted | Napari videos | [youtube UCbTgw84ew4pxTJ9qu3W2hqg/playlists](https://www.youtube.com/channel/UCbTgw84ew4pxTJ9qu3W2hqg/playlists) | Examples of using Napari, workshop videos, demos of plugins in napari. Napari intro videos. | user, developer | | Assorted | CZI videos | [youtube ChanZuckerbergInitiative/playlists](https://www.youtube.com/c/ChanZuckerbergInitiative/playlists) | CZI lead efforts in napari plugin development. Videos from plugin groups and from plugin workshop. | developer | | Assorted | Workshops | [https://napari.org/stable/further-resources/napari-workshops.html](https://napari.org/stable/further-resources/napari-workshops.html) | Workshops with videos, slides, and other materials that do/may have info for plugin developers. For instance, the [accelerator workshop series](https://chanzuckerberg.github.io/napari-plugin-accel-workshops/) had information around npe2, plugin development tips, user experience, plugin usability, plugin reach, and plugin quality on hub. | developer |