-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
ENH Adding a column to link each parameter docstring row in params table display #31564
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
base: main
Are you sure you want to change the base?
Conversation
TODO:
|
@@ -23,6 +76,31 @@ def _read_params(name, value, non_default_params): | |||
return {"param_type": param_type, "param_name": name, "param_value": cleaned_value} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that r.maxstring
is not working.
Noticed while working on adding methods table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe open a dedicated issue with a reproducer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @DeaMariaLeon.
I tested on the example you linked and it worked fine except for the C
parameter of LogisticRegression. Maybe the text fragment requires more than 1 character ?
Besides that, here are some comments
Thanks for the feedback! - the link to |
Docs have been built if someone wants to try again. |
The rendering looks good to me now. @jeremiedbb you can have another look. I'll go through the tests once more. |
This is soooo cool!! |
One comment: can we (should we), add "display: block;" to "a.param-doc-link, a.param-doc-link:link, a.param-doc-link:visited" so that its hovering on the cell rather than on the text that triggers the tooltip? It probably means that we should turn off the dashed underline on the text, because with "display: block" extends the underline too far out. |
edit: We could keep a dashed line... |
Very nice!! |
I'll like to keep the underline to alert users that there is something special about the this section of the diagram. I would still expect the text to have the hyperlink towards the documentation. Regarding text vs. cell, I don't have a strong opinion (maybe a slight one for the text since I find it easier to disable the tooltip by moving away from the string but it is rather subjective so using the cell is fine as well). |
+1 for keeping the link. Sometimes the rendering can be helpful (e.g. math). Furthermore, when browsing from a mobile device without a mouse, there is no way to get the tooltip so better keep a "click to navigate to doc" interaction in addition to the tooltip. |
The docs have been built. Gaël's feedback was added. |
I haven't reviewed the code, but from a user perspective, I think that it looks absolutely great, and it's definitely mergeable for me!! Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK here is a pass on the code more in details. I propose some slight changes.
@glemaitre I think I addressed all your comments. |
Reference Issues/PRs
Adds a column with a link to each parameter docstring in the params table (in the HTML display).
This was discussed while working on the PR that added the table.
"Text fragments" code shared by @ogrisel here :
#30763 (comment)
What does this implement/fix? Explain your changes.
Added a column to the table with the new link
Modified ParamsDict to include the estimator_type. After several tries it was the only way I found at the moment.
Any other comments?
@glemaitre