Skip to content
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

Deprecate width_policy and height_policy #7492

Open
philippjfr opened this issue Nov 14, 2024 · 2 comments
Open

Deprecate width_policy and height_policy #7492

philippjfr opened this issue Nov 14, 2024 · 2 comments
Labels
deprecation A proposal to deprecate a feature

Comments

@philippjfr
Copy link
Member

When first creating Panel I exposed all the base styling and layout related parameters from Bokeh, including sizing_mode, width_policy and height_policy. The thing is though that the width and height policy options effectively offers no more control than the sizing_mode and also less intuitive. Therefore I propose to remove these parameters, making it clear that sizing_mode is how to control these options.

The impact should be minimal as we steered most users towards sizing_mode from the very beginning and with a longer deprecation period with warnings we can give folks time to switch over.

@philippjfr philippjfr added the deprecation A proposal to deprecate a feature label Nov 14, 2024
@philippjfr
Copy link
Member Author

@mattpap Could you chime in what isn't covered by the sizing_mode that can be controlled with the policy arguments?

@mattpap
Copy link
Collaborator

mattpap commented Nov 15, 2024

The point of having width and height polices instead of sizing modes is to:

  1. Have fine and individual control over sizing in either dimensions.
  2. Allow adding new policies without having to invent new sizing modes (e.g. fit policy regardless if it actually works).
  3. Policies should have closer relationship with CSS. Sizing modes were invented primarily for plots.
  4. Sizing modes can affect more than just the policy in either dimension (e.g. they can affect aspect management).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation A proposal to deprecate a feature
Projects
Status: Todo
Development

No branches or pull requests

2 participants