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

Mention the plugin type more prominently #364

Merged
merged 4 commits into from
Feb 1, 2022

Conversation

felixfontein
Copy link
Collaborator

Fixes ansible/ansible#75652.

See for example https://ansible.fontein.de/collections/ansible/builtin/index.html#plugin-index: all modules/plugins in the plugin index now have the type next to their name. If you search for 'file', you find both the 'file module' and 'file lookup'.

The pages for these two plugins:

The title now mentiones the type as well, so the search results should be better. The plugin type is already mentioned correctly in the "Note" (I've fixed that recently). In the "See Also" section, the plugin type is also mentioned (https://ansible.fontein.de/collections/ansible/builtin/file_module.html#see-also).

The same is also true for roles (https://ansible.fontein.de/collections/sensu/sensu_go/index.html#role-index, https://ansible.fontein.de/collections/sensu/sensu_go/agent_role.html).

@briantist
Copy link
Contributor

I really like this, this has been a pet peeve of mine for a while.

The one thing I might consider changing in it, is to not add the plugin type in the listing page, where each link/title is already under a heading for that type. It's noisy; but I understand that it might be complicated to not just directly use the page title there.

For example, I'd much rather that lookup was not added to every single entry in the list, when I know the list is already all lookups.
image

@felixfontein
Copy link
Collaborator Author

@briantist the main reason I added it there is that if you search for file in the browser on that index page, you might not notice that you are in the "lookup" section when you just see the name of that plugin and some above and below it. That's more likely for modules than for lookups, I guess, since the modules lists are usually a lot longer. In the cases of ansible.builtin and community.general, the lookup lists are pretty long though, and depending on your screen size this can really happen. There is an alternative between removing and keeping though: making it not part of the link. In that case, at least for users who are not colorblind, the distinction between the lookup name and the plugin type is there. On the other hand, for users who use a screen reader, the plugin type might be useful, so that the link text is more descriptive.

@briantist
Copy link
Contributor

I see, great explanation @felixfontein ! I think making the plugin type not part of the link would help with what I called "noise" (as someone who is not colorblind) while keeping the other advantages you mentioned (for screen readers etc.).

@felixfontein
Copy link
Collaborator Author

See ansible-community/community-topics#57 for a discussion on which of these features we should have and which not.

@acozine
Copy link
Contributor

acozine commented Dec 16, 2021

This really helps the user interpret search results, too.
Search results with this PR:

Screen Shot 2021-12-16 at 3 58 02 PM

Search results without this PR:

Screen Shot 2021-12-16 at 4 01 17 PM

@felixfontein felixfontein force-pushed the plugin-type branch 2 times, most recently from fdf0e0f to a05485a Compare December 26, 2021 11:49
@felixfontein felixfontein force-pushed the plugin-type branch 2 times, most recently from 66c07fc to 4842de7 Compare January 7, 2022 22:39
Copy link
Contributor

@briantist briantist left a comment

Choose a reason for hiding this comment

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

I think this is looking good!

@felixfontein felixfontein merged commit 3180ada into ansible-community:main Feb 1, 2022
@felixfontein felixfontein deleted the plugin-type branch February 1, 2022 12:19
@felixfontein
Copy link
Collaborator Author

@briantist @acozine thanks a lot for testing and reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There are two different documentation pages for "ansible.builtin.file"?
3 participants