You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhance filtering based on keyword tags in libdoc html page #5619
OpenApiTools allows users to generate a custom library with keywords based on the OpenAPI spec used in generation. This library subclasses OpenApiLibCore that exposes 26 keywords.
When the library documentation for this custom library is generated, all the keywords are part of the html doc (ordered alphabetically). This is confusing for the user; while the OpenApiLibCore keywords are available through the custom library, the user of the custom library shouldn't generally need them.
To provide more clear documentation for custom libraries that subclass other libraries, it would be beneficial to have more options to show / hide keywords in the documentation.
Proposed changes
To allow more flexibility in showing / hiding keywords in the documentation, the following changes are proposed:
Change the "show tags" filter (that appears if there are any keywords with tags) from single select to multiselect.
Add a Show no tags option to show only keywords that do not have any tags.
Introduce a "hide tags" filter similar to the "show tags" filter. By default, no keywords should be hidden. An option to hide all keywords with no tags should be present.
The above changes, in combination with keyword tags within libraries, should allow for more clear documentation for custom libraries.
In addition, it would be beneficial to update the libdoc command to allow passing presets for the filters such that the generated page will open with the desired filters applied.
Gemini 3.1 Pro says:
Here is the complete implementation. I've broken the changes down into targeted file updates using the unified diff format where applicable, and full file contents where necessary.
1. Update the libdoc CLI command options
We define two new arguments (--showtag and --hidetag) supporting multiple values (via * token parsing in RF's ArgumentParser).
Inspect SomeLib.html and verify the filtering behavior applies on page load and works as multiselect. Ensure "[No tags]" properly filters untagged keywords.
This feature sounds good and the overall design is pretty straightforward. Probably the hardest part is designing the UI.
Do you @yanne have opinions? Do you think we could do this as part of RF 7.5? You are also better to evaluate the implementation by @mkorpela and Gemini. I personally don't have problems with accepting AI generated code, but it certainly needs to be reviewed properly.
@yanne pushed the AI slop to a branch. The UI would need some iteration, but something like this.. I would be happy to show you and @pekkaklarck my tool for doing stuff like this.
I added the library name as tag to the keywords in OpenApiTools and generated the docs using the branch above. Initial results:
Remarks / observations:
I would suggest changing the CLI args to plural forms (showtags / hidetags).
The show / hide are still single-select.
The show / hide boxes are not dropdowns anymore. I believe they should be; if there are many keyword tags, it´d take a lot of screen estate, pushing the actual keyword links down.
We should decide on how to show what filters are applied (if the controls are changed to dropdowns).
The default labels for the controls need some consideration; I would propose <no tags selected> and <no tags hidden>.
Related to this, there's also special options needed to only show / hide keywords with no associated tags; <show tagless> / <hide tagless>...but then with a better word than tagless.
Would it make sense to add also CLI options for including/excluding keywords based on tags so that they wouldn't be shown in HTML or specs at all? It would be related to this, but should nevertheless get a separate issue. Implementation would be fully on the Python side and it probably could reuse lot of Robot's --include/--exclude machinery.
Adding the CLI options --hidetag and --showtag to libdoc would be very useful for generating documentation for Browser library plugins. I would suggest extracting this feature to a separate issue.
Activity
mkorpela commentedon Feb 25, 2026
Gemini 3.1 Pro says:
Here is the complete implementation. I've broken the changes down into targeted file updates using the unified diff format where applicable, and full file contents where necessary.
1. Update the
libdocCLI command optionsWe define two new arguments (
--showtagand--hidetag) supporting multiple values (via*token parsing in RF's ArgumentParser).2. Update the
LibraryDocmodel to accept the preset tags3. Setup types for TypeScript components
4. Provide Missing Strings to Translation JSON
Overwriting the entire file to ensure all keys like "noTags", "showTags", and "hideTags" exist cleanly in all configured languages.
5. Update HTML templates for multiselects
6. Implement frontend logic in View controller
To verify:
npm run buildor the local tool logic to bundle Web.python -m robot.libdoc --showtag tag1 --hidetag tag2 SomeLib SomeLib.htmlSomeLib.htmland verify the filtering behavior applies on page load and works as multiselect. Ensure "[No tags]" properly filters untagged keywords.pekkaklarck commentedon Feb 25, 2026
This feature sounds good and the overall design is pretty straightforward. Probably the hardest part is designing the UI.
Do you @yanne have opinions? Do you think we could do this as part of RF 7.5? You are also better to evaluate the implementation by @mkorpela and Gemini. I personally don't have problems with accepting AI generated code, but it certainly needs to be reviewed properly.
mkorpela commentedon Feb 25, 2026
@pekkaklarck @yanne just to set the expectations, I did not spent more than 5 minutes on this. But I’ll check later more.
mkorpela commentedon Feb 25, 2026
@yanne pushed the AI slop to a branch. The UI would need some iteration, but something like this.. I would be happy to show you and @pekkaklarck my tool for doing stuff like this.
https://github.com/robotframework/robotframework/tree/topic-tag-filters-poc
robinmackaij commentedon Mar 2, 2026
I added the library name as tag to the keywords in OpenApiTools and generated the docs using the branch above. Initial results:
Remarks / observations:
showtags/hidetags).<no tags selected>and<no tags hidden>.<show tagless>/<hide tagless>...but then with a better word thantagless.pekkaklarck commentedon Mar 3, 2026
Quick comments:
--include/--excludemachinery.mardukbp commentedon Oct 20, 2026
Adding the CLI options --hidetag and --showtag to libdoc would be very useful for generating documentation for Browser library plugins. I would suggest extracting this feature to a separate issue.