.controls has incorrect doc strings for max_width and max_height: both say Minimum instead of Maximum #7729
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the Layout Tab of .controls, when hovering over the ? info icon of Max width and Max height, the hover text says:
Minimal width / height of the component (in pixels) ... etc.
This should be:
Maxium width / height of the component (in pixels) ... etc.
So currently, the hover text for these 2 elements is identical to those of Min Width and Min height.
Changed "Minimal" to Maximum in the doc strings for max_width and max_height.
+1 for .controls by the way! Great way to understand / iterate what various aspects of a component do.
And .controls itself is a nice example of what Panel can do.
Additional observations: the 'Visible' element at the bottom of the Layout tab does not show a ? icon + hover text yet, although there is a doc string defined for it at line 250 in viewable.py .
When investigating this further, it was not clear to me how / where the values of labels like 'Max height' , 'Min width' are defined / generated, and inserted together with the ? icon above each control item in the .controls Widgetboxes.
Any hint would really be appreciated! I would like to use it myself in components to show doc strings in this way, but I can't see how to enable this.
I have been trying to find it in the source code of viewable.py and reactive.py, but I have been unable to find a clue. Does it hapen at at a HTML template level? Or CSS? Are they properties of the widgets themselves that can be enabled?
Are the label values as mentioned defined in a dict or map somewhere? Is there a regex that turns the variable min_width into Min width?
Btw, the same issue applies for the 2 control elements ('Value' and 'Disabled') in the first tab of .controls as shown in Checkbox, Toggle, and Switch docs.
Could it be related to the fact that different widgets inherit from different base classes?
If I understand correctly, Checkbox inherits from _BooleanWidget(Widget) which has the docstring below. But it is not shown in the .controls of Checkbox
https://github.com/holoviz/panel/blob/v1.6.1/panel/widgets/input.py#L1486
class _BooleanWidget(Widget):
Conversely, in the Select doc, 'Value' does indeed have a ? icon and hover text in the Select doc, in the .controls at the bottom of the doc. But not for the Disabled and Options .controls elements in that doc.
The doc string is in base.py at line 46:
class WidgetBase(param.Parameterized):
...
Disabled also has a docstring in base.py, but for Select, that does not result in a ? icon and displaying of the docstring on hovering over the ? icon. From line 118:
https://panel.holoviz.org/reference/widgets/Select.html
Another observation; Checkbox, Toggle and Switch are all interchangeable, but this is not mentioned completely in their respective docs.