Skip to content

Unify component pad logic #997

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

Closed
etpinard opened this issue Sep 29, 2016 · 8 comments
Closed

Unify component pad logic #997

etpinard opened this issue Sep 29, 2016 · 8 comments
Labels
feature something new

Comments

@etpinard
Copy link
Contributor

etpinard commented Sep 29, 2016

PR #989 added pad to update menus, and PR #986 with to do same for sliders.

At the moment, colorbars are using xpad and ypad to determine their horizontal padding ➡️ we should switch them to pad.l + pad.r (++ add a backward-compatible cleanLayout step) and add support for pad.t and pad.b while at it.

We should also allow legends, range selector and range sliders to set their own pad options.

@etpinard
Copy link
Contributor Author

cc @rreusser

@rreusser
Copy link
Contributor

rreusser commented Sep 29, 2016

Copying checklist from #985.

  • sliders
  • updatemenus
  • legend
  • range selector
  • colorbar
  • rangeslider
  • review code for others?

@rreusser
Copy link
Contributor

rreusser commented Sep 29, 2016

For reference, the procedure is pretty simple:

  1. When computing its size, a component should, as a final step, add padding in each direction.
  2. It sends this size to automargins
  3. it must shift the content it draws (presumably by pad.l and pad.t)

@jensb
Copy link

jensb commented Sep 20, 2017

Would this enable users to configure legend entry padding as well? (Not just the whole legend)
IMHO, the legend entries have too much padding around them especially when using smaller fonts. I would like to be able to configure this.

@etpinard
Copy link
Contributor Author

@jensb you mean like in #881 ?

@jensb
Copy link

jensb commented Sep 21, 2017

No, I meant the vertical padding. When using smaller font sizes, the padding between legend rows is (IMHO) too large. I think it's hardcoded as 5 pixels in both directions (?). I would like to be able customize this padding, e.g. using a configuration variable. There is 'tracegroupgap' but I would like to have 'tracegap' - also possibly smaller(!) than the default.

@jensb
Copy link

jensb commented Nov 7, 2017

Can somebody please have a look at this and maybe give me a hint how to make legend entry padding configurable? I'm not afraid of hacking by myself and creating a pull request, but I need some startup assistance. Thank you!

@etpinard etpinard mentioned this issue Sep 12, 2019
2 tasks
@gvwilson
Copy link
Contributor

gvwilson commented Jun 5, 2024

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

@gvwilson gvwilson closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

4 participants