Skip to content

Libdoc with new style for arguments - #5734

Closed
aaltat wants to merge 4 commits into
robotframework:masterfrom
aaltat:libdoc
Closed

Libdoc with new style for arguments#5734
aaltat wants to merge 4 commits into
robotframework:masterfrom
aaltat:libdoc

Conversation

@aaltat

@aaltat aaltat commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #5733 #5728
Part of #5604

Arguments now look like:
image

And return and raises information:
image

Also in the previous implementation, the SchemathesisLibary looks better:
image

I can even now consider keeping the session argument documentation as it is:
image

Tatu Aalto and others added 4 commits August 7, 2026 13:31
Inject a Heroicons clipboard button (MIT) into every .doc .code block.
Clicking copies the plain text of the <pre> to the clipboard and swaps
the icon to a checkmark for 1.5 s before restoring the clipboard icon.
Button is always visible, positioned absolute top-right of each block.
@emanlove

emanlove commented Aug 7, 2026

Copy link
Copy Markdown
Member

I like a lot of what is here. Think it covers René's concern about unused space. I also think it puts this in a good spot for a release now and give people a chance to try it out and comment about it.

@pekkaklarck

Copy link
Copy Markdown
Member

I personally like the current styles a bit more that this. The current table has some wasted space, but I consider is easy to understand compared to this version.

I find it a bit strange that the data is kind of formatted as in a table but kind of as in a list. I would think using either a normal table, like we now have, or a list, like this mkdocstring example does, would be simpler. That said, I see problems with the table approach and I also see that complex type hints and long default values would probably cause problems with the list approach.

The above said, I'm not really against these styles, especially when the comments here have been positive. I'd like to hear opinions from a bit wider audience, though. Could you @aaltat and @Snooz82 create examples with the current styles and with these PR styles so that people could test them? It would be best if both versions would be somewhere available so that people could experiment with the real docs instead of just seeing images. Using a real library like SchemathesisLibary or/and BuiltIn would be best. If majority of the people like the new styles, and we got at least few votes, I'm fine with using these styles in RF 7.5. We can, and probably should, do a bigger Libdoc HTML update in the future anyway.

@pekkaklarck

Copy link
Copy Markdown
Member

If we go with this design, I'd somewhat strongly want to remove the equal sign from the default value. I didn't like it too much with the previous design either, but back then the default value was after the argument name and having name = default <type> was somewhat close to how this information is shown in the source. Now that the default is after the type, which I consider a good change in itself, the equal sign is just confusing.

@aaltat

aaltat commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Closing, repleaced by #5741 #5740 and #5739

@aaltat aaltat closed this Aug 13, 2026
@aaltat
aaltat deleted the libdoc branch August 13, 2026 12:40
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.

Libdoc: Add copy button to Markdown code blocks

3 participants