miranov25 / RootInteractive

5 stars 12 forks source link

Context menu/editing for some critical widgets (e.g range slider) #236

Open miranov25 opened 2 years ago

miranov25 commented 2 years ago

Goal:

Widgets are not easy to modify - using parameters to much interaction.

TODO:

miranov25 commented 2 years ago

Proposed layout of the slider and select widget:

miranov25 commented 2 years ago

Composition of the several widgets not working well. Problem reported by @pl0xz0rz

  1. Adding composed widgets with 2 row - layout was "destroyed"
  2. Change of slider limits -s OEM side effect
miranov25 commented 2 years ago

Based on @pl0xz0rz - there are limitation in bokeh layout - documented in doc pages. In case of more complex layout they recommend oun java script implementation.

Limitations The Bokeh layout system is not a completely generic, general-purpose layout engine. It intentionally sacrifices some capability in order to make common use cases and scenarios simple to express. Extremely nested layouts with many different sizing modes may yield undesirable results, either in terms of performance, or visual appearance. For such cases, it is recommended to use the methods in Embedding Bokeh Content along with your own custom HTML templates in order to take advantage of more sophisticated CSS layout possibilities.

https://docs.bokeh.org/en/2.2.3/docs/user_guide/layout.html

miranov25 commented 2 years ago

Based on @pl0xz0rz - there are limitation in bokeh layout - documented in doc pages. In case of a more complex layout, they recommend oun java script implementation.

Limitations The Bokeh layout system is not a completely generic, general-purpose layout engine. It intentionally sacrifices some capability in order to make common use cases and scenarios simple to express. Extremely nested layouts with many different sizing modes may yield undesirable results, either in terms of performance, or visual appearance. For such cases, it is recommended to use the methods in Embedding Bokeh Content along with your own custom HTML templates in order to take advantage of more sophisticated CSS layout possibilities.

https://docs.bokeh.org/en/2.2.3/docs/user_guide/layout.html

miranov25 commented 2 years ago

Problem with the range slider - emulation with 2 spinners -upper and lower bound of variables 2 spinners to the same row: var min and var max

miranov25 commented 2 years ago

Can we use global policy for the callback using parameters?

miranov25 commented 2 years ago

2 composite widgets implemented.

The suggestion from https://github.com/miranov25/RootInteractive/issues/236#issuecomment-1203739490 could not be implemented because there are some limitations with bokeh layouts. The 2 improvements from above cover a large part of the use cases.

miranov25 commented 2 years ago

Parameter templates implemented () - not exactly the same functionality as in context menu but simplifying the declaration

https://github.com/miranov25/RootInteractive/blob/b1d593d017c87420ac9a25ef96814f0a4451fe87/RootInteractive/InteractiveDrawing/bokeh/bokehInteractiveParameters.py#L1-L40