-
-
Notifications
You must be signed in to change notification settings - Fork 570
Introduce Widget.label and treat name as alias #8328
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
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.
Pull request overview
This PR introduces Widget.label as the new primary parameter for widget labels, treating name as a deprecated alias for backward compatibility. This is the first step in a migration plan towards panel-material-ui widgets.
Key Changes:
- Added
labelparameter to the baseWidgetclass with deprecation warnings forname - Updated all widget factory functions to use
labelinstead ofnameparameters - Updated
_renamemappings across all widget classes to maplabelinstead ofname
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| panel/widgets/base.py | Introduces label parameter, adds deprecation logic for name, and implements sync methods between the two parameters |
| panel/widgets/widget.py | Updates widget factory function signatures and implementations to use label instead of name |
| panel/widgets/texteditor.py | Updates _rename mapping from 'name': 'name' to 'label': 'name' |
| panel/widgets/terminal.py | Updates _rename mapping to exclude 'label' instead of 'name' |
| panel/widgets/tables.py | Updates _rename mapping and download_menu method to use label, plus unrelated bundled_module_string changes |
| panel/widgets/speech_to_text.py | Updates _rename mapping to exclude 'label' instead of 'name' |
| panel/widgets/select.py | Updates _rename mappings in AutocompleteInput, _RadioGroupBase, and _CheckGroupBase |
| panel/widgets/misc.py | Updates _rename mappings and documentation examples to use label |
| panel/widgets/input.py | Updates _rename mappings and internal references from name to label |
| panel/widgets/indicators.py | Updates _rename mappings, documentation examples, and internal references throughout various indicator widgets |
| panel/widgets/icon.py | Updates _rename mappings in _ClickableIcon and ButtonIcon classes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
First part of migration plan towards panel-material-ui widgets.