]> git.proxmox.com Git - ui/proxmox-yew-widget-toolkit.git/log
ui/proxmox-yew-widget-toolkit.git
15 months agoSelector: delete item with "Delete" and "Backspace"
Dietmar Maurer [Sat, 14 Oct 2023 07:13:24 +0000 (09:13 +0200)]
Selector: delete item with "Delete" and "Backspace"

15 months agoMask: transition opacity to reduce flickering
Dietmar Maurer [Fri, 13 Oct 2023 15:40:46 +0000 (17:40 +0200)]
Mask: transition opacity to reduce flickering

15 months agowidget/dropdown: prevent picker from being shown while disabled
Dominik Csapak [Fri, 13 Oct 2023 13:31:35 +0000 (15:31 +0200)]
widget/dropdown: prevent picker from being shown while disabled

also rustfmt

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agowidget/grid_picker: add pointer class to cells
Dominik Csapak [Fri, 13 Oct 2023 13:26:59 +0000 (15:26 +0200)]
widget/grid_picker: add pointer class to cells

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agowidget/grid_picker: rustfmt
Dominik Csapak [Fri, 13 Oct 2023 13:26:48 +0000 (15:26 +0200)]
widget/grid_picker: rustfmt

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agowidget/dropdown: add pointer class to dropdown handle
Dominik Csapak [Fri, 13 Oct 2023 13:17:36 +0000 (15:17 +0200)]
widget/dropdown: add pointer class to dropdown handle

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agowidget/field: add InputType enum
Dominik Csapak [Fri, 13 Oct 2023 13:15:42 +0000 (15:15 +0200)]
widget/field: add InputType enum

in place of strings for 'input_type'
this way we can guarantee its a valid value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agowidget/form: rustfmt
Dominik Csapak [Fri, 13 Oct 2023 13:16:47 +0000 (15:16 +0200)]
widget/form: rustfmt

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agobutton: add ButtonType
Dominik Csapak [Fri, 13 Oct 2023 10:52:56 +0000 (12:52 +0200)]
button: add ButtonType

and use it for the button_type property
instead of a string, so that the valid variants are forced

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agocleanup: remove unused files
Dietmar Maurer [Fri, 13 Oct 2023 10:23:01 +0000 (12:23 +0200)]
cleanup: remove unused files

15 months agoTooltip: use Into<Html> for rich_tip (revert to previous behavior)
Dietmar Maurer [Fri, 13 Oct 2023 10:13:45 +0000 (12:13 +0200)]
Tooltip: use Into<Html> for rich_tip (revert to previous behavior)

15 months agoField: only show tooltips if field is enabled
Dietmar Maurer [Fri, 13 Oct 2023 06:53:02 +0000 (08:53 +0200)]
Field: only show tooltips if field is enabled

15 months agoField: allow to set tooltip
Dietmar Maurer [Fri, 13 Oct 2023 06:21:48 +0000 (08:21 +0200)]
Field: allow to set tooltip

15 months agoFormContext: format cleanup, add reset_field
Dietmar Maurer [Thu, 12 Oct 2023 15:21:43 +0000 (17:21 +0200)]
FormContext: format cleanup, add reset_field

15 months agoinput_panel: use 'add_custom_child_impl' for add_spacer
Dominik Csapak [Thu, 12 Oct 2023 12:04:56 +0000 (14:04 +0200)]
input_panel: use 'add_custom_child_impl' for add_spacer

does exactly what we want here: correct count tracking, setting style, etc.

fixes an issue when the last item before the spacer was on the right

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoButton: use builder macro
Dietmar Maurer [Thu, 12 Oct 2023 11:48:47 +0000 (13:48 +0200)]
Button: use builder macro

15 months agoButton: add button_type property
Dietmar Maurer [Thu, 12 Oct 2023 11:44:41 +0000 (13:44 +0200)]
Button: add button_type property

15 months agoResetButton: cleanup, use real Button
Dietmar Maurer [Thu, 12 Oct 2023 10:09:26 +0000 (12:09 +0200)]
ResetButton: cleanup, use real Button

15 months agoSubmitButton: cleanup, add check_dirty property
Dietmar Maurer [Thu, 12 Oct 2023 10:00:07 +0000 (12:00 +0200)]
SubmitButton: cleanup, add check_dirty property

15 months agoDropdown: set valid to true by default
Dietmar Maurer [Thu, 12 Oct 2023 05:16:49 +0000 (07:16 +0200)]
Dropdown: set valid to true by default

15 months agoinput_panel: use Html instead of VNode
Dominik Csapak [Wed, 11 Oct 2023 12:53:18 +0000 (14:53 +0200)]
input_panel: use Html instead of VNode

it's an alias but we want to use Html instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoManagedField: improve validator trait method signature
Dominik Csapak [Wed, 11 Oct 2023 11:51:08 +0000 (13:51 +0200)]
ManagedField: improve validator trait method signature

instead of having a `create_validation_fn` in the trait, make it
`validator` and use that function to create the ValidateFn outside

this way an implementer of this does only have to create the validator
and does not have to create the ValidateFn (since thats always the same
anyway)

This makes it necessary that the validate closure is given as a
reference instead of moving it in (otherwise it couldn't be called
more than once).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agowidget/focus: refactor calculate_next
Dominik Csapak [Wed, 11 Oct 2023 10:55:54 +0000 (12:55 +0200)]
widget/focus: refactor calculate_next

reuse calculate_next from roving_tabindex_next_el
but fix the clamping of the iniital index value

this was found by the tests added

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agowidget/focus: clippy fixes
Dominik Csapak [Wed, 11 Oct 2023 10:54:31 +0000 (12:54 +0200)]
widget/focus: clippy fixes

* looks like `matches!`
* use `is_empty`
* iter over list instead of index range
* use `as_deref`

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agotouch/slidable: rustfmt + clippy fixes
Dominik Csapak [Wed, 11 Oct 2023 10:53:09 +0000 (12:53 +0200)]
touch/slidable: rustfmt + clippy fixes

clippy:
* use range instead of multiple ifs (circumvented by using variables,
  this makes the code clearer too)
* nested if

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoclippy: fix statics have by default a `'static` lifetime
Dominik Csapak [Tue, 10 Oct 2023 12:20:54 +0000 (14:20 +0200)]
clippy: fix statics have by default a `'static` lifetime

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agotouch/material_app: rustfmt
Dominik Csapak [Tue, 10 Oct 2023 12:20:24 +0000 (14:20 +0200)]
touch/material_app: rustfmt

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoclippy: fix redundant field names in struct initialization
Dominik Csapak [Tue, 10 Oct 2023 12:17:43 +0000 (14:17 +0200)]
clippy: fix redundant field names in struct initialization

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agostate/slab_tree_serde: rustfmt
Dominik Csapak [Tue, 10 Oct 2023 12:17:23 +0000 (14:17 +0200)]
state/slab_tree_serde: rustfmt

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agostate/keyed_slab_tree: rustfmt
Dominik Csapak [Tue, 10 Oct 2023 12:16:38 +0000 (14:16 +0200)]
state/keyed_slab_tree: rustfmt

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: widget: change Into<VNode> impl to From<X> for VNode
Dominik Csapak [Tue, 10 Oct 2023 11:54:59 +0000 (13:54 +0200)]
pwt-macros: widget: change Into<VNode> impl to From<X> for VNode

rustdocs recommend implementing From<X> for Y instead of Into<Y> for X
because the former provides the latter automatically

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoDropdown: replace input_class with valid flag, correctly set disabled class
Dietmar Maurer [Wed, 11 Oct 2023 07:39:44 +0000 (09:39 +0200)]
Dropdown: replace input_class with valid flag, correctly set disabled class

And add a disabled combobox to the demo.

15 months agoDropdown: add input_class property
Dietmar Maurer [Tue, 10 Oct 2023 15:51:02 +0000 (17:51 +0200)]
Dropdown: add input_class property

15 months agoManagedFieldMaster: also update self.validate
Dietmar Maurer [Tue, 10 Oct 2023 15:32:03 +0000 (17:32 +0200)]
ManagedFieldMaster: also update self.validate

15 months agoManagedField: extract validation args
Dietmar Maurer [Tue, 10 Oct 2023 14:55:14 +0000 (16:55 +0200)]
ManagedField: extract validation args

to simplify change tracking

15 months agoRevert "cargo: update indexmap to version 2"
Dietmar Maurer [Tue, 10 Oct 2023 12:11:29 +0000 (14:11 +0200)]
Revert "cargo: update indexmap to version 2"

This reverts commit ebd44c8f3edbb131c05c79ebf8e6d2b8136f9137.

15 months agoRevert "cargo: update serde-wasm-bindgen"
Dietmar Maurer [Tue, 10 Oct 2023 12:10:35 +0000 (14:10 +0200)]
Revert "cargo: update serde-wasm-bindgen"

This reverts commit a80ca6c830ea592ddc65e8773c1de33bdb999353.

Those packages are not packaged for debian, so I will revert thos for now

15 months agocargo: update serde-wasm-bindgen
Maximiliano Sandoval R [Tue, 10 Oct 2023 11:42:06 +0000 (13:42 +0200)]
cargo: update serde-wasm-bindgen

This is listed as outdated by `cargo outdated`.

Signed-off-by: Maximiliano Sandoval R <m.sandoval@proxmox.com>
15 months agocargo: update indexmap to version 2
Maximiliano Sandoval R [Tue, 10 Oct 2023 11:42:05 +0000 (13:42 +0200)]
cargo: update indexmap to version 2

Signed-off-by: Maximiliano Sandoval R <m.sandoval@proxmox.com>
15 months agogettext_wrapper: Add test for gettext functions
Maximiliano Sandoval R [Tue, 10 Oct 2023 11:38:35 +0000 (13:38 +0200)]
gettext_wrapper: Add test for gettext functions

Signed-off-by: Maximiliano Sandoval R <m.sandoval@proxmox.com>
15 months agotr: Add tests
Maximiliano Sandoval R [Tue, 10 Oct 2023 11:38:34 +0000 (13:38 +0200)]
tr: Add tests

Many of these are tested in gettext_wrapper, since these are the public
facing api makes sense to test them again.

Signed-off-by: Maximiliano Sandoval R <m.sandoval@proxmox.com>
15 months agotr: Move context argument in pgettext macro
Maximiliano Sandoval R [Tue, 10 Oct 2023 11:38:33 +0000 (13:38 +0200)]
tr: Move context argument in pgettext macro

This way it matches gettext-rs and the pgettext function in
gettext_wrapper.rs.

Signed-off-by: Maximiliano Sandoval R <m.sandoval@proxmox.com>
15 months agoremove leftover RtlChangeObserver
Dominik Csapak [Tue, 10 Oct 2023 11:42:55 +0000 (13:42 +0200)]
remove leftover RtlChangeObserver

was never committed

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agowidget/tab_bar: improve rtl behavior for active indicator
Dominik Csapak [Tue, 10 Oct 2023 11:05:24 +0000 (13:05 +0200)]
widget/tab_bar: improve rtl behavior for active indicator

by using 'inset-inline-start' instead of left, and using the correct
sides when it's rtl

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agowidget/tab_bar: don't show active indicator when none are active
Dominik Csapak [Tue, 10 Oct 2023 10:06:21 +0000 (12:06 +0200)]
widget/tab_bar: don't show active indicator when none are active

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agostatic_validation_fn: new helper macro
Dietmar Maurer [Tue, 10 Oct 2023 10:39:19 +0000 (12:39 +0200)]
static_validation_fn: new helper macro

15 months agofix previous commit
Dietmar Maurer [Tue, 10 Oct 2023 09:46:36 +0000 (11:46 +0200)]
fix previous commit

15 months agoManagedFiled: add validation_fn_need_update
Dietmar Maurer [Tue, 10 Oct 2023 09:36:37 +0000 (11:36 +0200)]
ManagedFiled: add validation_fn_need_update

Clumsy way to avoid frequent/useless validation function updates...

15 months agoREADME: Fix typo
Maximiliano Sandoval R [Mon, 9 Oct 2023 14:06:17 +0000 (16:06 +0200)]
README: Fix typo

Signed-off-by: Maximiliano Sandoval R <m.sandoval@proxmox.com>
15 months agoREADME: Use 4 spaces for code
Maximiliano Sandoval R [Mon, 9 Oct 2023 14:06:16 +0000 (16:06 +0200)]
README: Use 4 spaces for code

Markup supports code block as 4 space indentated text.

Signed-off-by: Maximiliano Sandoval R <m.sandoval@proxmox.com>
15 months agoManagedField: improve docs
Dietmar Maurer [Mon, 9 Oct 2023 16:30:42 +0000 (18:30 +0200)]
ManagedField: improve docs

15 months agoManagedField: add create_validation_fn
Dietmar Maurer [Mon, 9 Oct 2023 16:15:29 +0000 (18:15 +0200)]
ManagedField: add create_validation_fn

We need to update the validation function whenever component properties changes,
i.e. things like 'required'

15 months agoinput_panel: extend custom_child support
Dominik Csapak [Mon, 9 Oct 2023 13:26:05 +0000 (15:26 +0200)]
input_panel: extend custom_child support

by supporting left,right and large ones
advanced support is prepared, not yet implemented
(but shouldn't be hard)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoSubmitCallback: return ()
Dietmar Maurer [Mon, 9 Oct 2023 13:42:36 +0000 (15:42 +0200)]
SubmitCallback: return ()

15 months agopwt-macros: add tests for widget macro
Dominik Csapak [Mon, 9 Oct 2023 11:51:15 +0000 (13:51 +0200)]
pwt-macros: add tests for widget macro

some "mocking" is required, but thats mostly copy & paste

also adds failing tests to test the macro span output

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: widget: add macro documentation
Dominik Csapak [Mon, 9 Oct 2023 11:35:47 +0000 (13:35 +0200)]
pwt-macros: widget: add macro documentation

needs yew as dev-dependency

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agowidget: nav: readd links in docs, but without the warnings
Dominik Csapak [Mon, 9 Oct 2023 09:22:27 +0000 (11:22 +0200)]
widget: nav: readd links in docs, but without the warnings

it was just the 'Self' in the link that was missing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agogettext: log error when using multiple anonymous format parameters
Dominik Csapak [Mon, 9 Oct 2023 09:12:01 +0000 (11:12 +0200)]
gettext: log error when using multiple anonymous format parameters

in translations, using anonymous parameters is almost always wrong,
since there is no guarantee that the parameter order is the same in
other languages.

Also add a test for that.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: widget: use absolute paths to traits
Dominik Csapak [Mon, 9 Oct 2023 09:09:38 +0000 (11:09 +0200)]
pwt-macros: widget: use absolute paths to traits

This improves the generated error messages.

Also add a short comment what we do here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: builder: improve link text for autogenerated docs
Dominik Csapak [Mon, 9 Oct 2023 09:09:06 +0000 (11:09 +0200)]
pwt-macros: builder: improve link text for autogenerated docs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopersistent_state: add suport for session storage
Dietmar Maurer [Sun, 8 Oct 2023 14:44:34 +0000 (16:44 +0200)]
persistent_state: add suport for session storage

Note: State IDs starting with "*" use session storage!

15 months agoTabBar: impl state cache
Dietmar Maurer [Sun, 8 Oct 2023 12:51:05 +0000 (14:51 +0200)]
TabBar: impl state cache

15 months agoLoader: add ability to cache data.
Dietmar Maurer [Sun, 8 Oct 2023 08:36:30 +0000 (10:36 +0200)]
Loader: add ability to cache data.

15 months agocleanup: avoid doc warnings
Dietmar Maurer [Fri, 6 Oct 2023 16:51:03 +0000 (18:51 +0200)]
cleanup: avoid doc warnings

15 months agogettext improve docs
Dietmar Maurer [Fri, 6 Oct 2023 16:46:27 +0000 (18:46 +0200)]
gettext improve docs

15 months agotr: improve docs
Dietmar Maurer [Fri, 6 Oct 2023 16:32:07 +0000 (18:32 +0200)]
tr: improve docs

15 months agoimprove gettext docs
Dietmar Maurer [Fri, 6 Oct 2023 16:19:02 +0000 (18:19 +0200)]
improve gettext docs

15 months agogettext_runtime_format.rs: improve docs and format
Dietmar Maurer [Fri, 6 Oct 2023 13:32:23 +0000 (15:32 +0200)]
gettext_runtime_format.rs: improve docs and format

15 months agoimprove gettext docs
Dietmar Maurer [Fri, 6 Oct 2023 13:12:43 +0000 (15:12 +0200)]
improve gettext docs

15 months agorename runtime_fmt to gettext_runtime_format
Dietmar Maurer [Fri, 6 Oct 2023 12:31:21 +0000 (14:31 +0200)]
rename runtime_fmt to gettext_runtime_format

15 months agoimprove gettext macros
Dietmar Maurer [Fri, 6 Oct 2023 09:43:27 +0000 (11:43 +0200)]
improve gettext macros

15 months agodialog: improve resize handling
Dominik Csapak [Thu, 5 Oct 2023 12:51:02 +0000 (14:51 +0200)]
dialog: improve resize handling

* restricts the resize to the viewport
* calculate new position accorrding to the real sizes, not the
  theoretical ones (avoids moving the window when resizing from the
  left/top side and the dialog has a minimum size)
  this is done by changing the size of the inner div, but positioning
  the outer dialog and by rechecking the sizes after setting them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agodialog: rename onmousemove to onpointermove
Dominik Csapak [Thu, 5 Oct 2023 12:50:28 +0000 (14:50 +0200)]
dialog: rename onmousemove to onpointermove

because that's what we use it for

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoimplement ToHtml via macros
Dominik Csapak [Thu, 5 Oct 2023 08:56:50 +0000 (10:56 +0200)]
implement ToHtml via macros

automatically for structs that use the widget macro (caution: they need
to implmement clone!)

and via a macro_rules macro for some that don't use the widget macro

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoupdate dependencies
Dominik Csapak [Thu, 5 Oct 2023 07:12:50 +0000 (09:12 +0200)]
update dependencies

yew, gloo

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agomessage_box: Into<Html> is not enough for the macro anymore
Dominik Csapak [Thu, 5 Oct 2023 07:42:21 +0000 (09:42 +0200)]
message_box: Into<Html> is not enough for the macro anymore

it either must implement ToHtml, or be alread a Html

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agotree-wide: convert VList to VNode
Dominik Csapak [Thu, 5 Oct 2023 07:34:47 +0000 (09:34 +0200)]
tree-wide: convert VList to VNode

VNode is the new interface, and it only wraps VList

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agotree-wide: mark Option<> properties with #[prop_or_default]
Dominik Csapak [Thu, 5 Oct 2023 07:25:06 +0000 (09:25 +0200)]
tree-wide: mark Option<> properties with #[prop_or_default]

this was the implicit behaviour in yew 0.20, now it's required

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: builder: add compile fail tests
Dominik Csapak [Wed, 4 Oct 2023 12:59:53 +0000 (14:59 +0200)]
pwt-macros: builder: add compile fail tests

by using trybuild to try to compile the files under test/builder/*.rs

these show how to not use the macro and should fail with proper error
messages

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: builder: improve error messages
Dominik Csapak [Wed, 4 Oct 2023 12:22:51 +0000 (14:22 +0200)]
pwt-macros: builder: improve error messages

by using better spans than before and using the 'quote_spanned' macro too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: add tests for the builder macro
Dominik Csapak [Wed, 4 Oct 2023 07:38:55 +0000 (09:38 +0200)]
pwt-macros: add tests for the builder macro

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: builder: fix example code
Dominik Csapak [Wed, 4 Oct 2023 07:26:48 +0000 (09:26 +0200)]
pwt-macros: builder: fix example code

the example used different types for how to use it with a callback vs
what we show how it would be generated so fix it by changing the type
where we use the macro

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: builder macro: add comments to proprties in examples
Dominik Csapak [Wed, 4 Oct 2023 07:26:20 +0000 (09:26 +0200)]
pwt-macros: builder macro: add comments to proprties in examples

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: update to syn2
Dominik Csapak [Wed, 4 Oct 2023 07:22:23 +0000 (09:22 +0200)]
pwt-macros: update to syn2

* use path() instead of path
* replace parse_meta with parse_nested_meta or require_* (where
  appropriate)
* make has_property_derive return a result (for parse_nested_meta)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agopwt-macros: widget: rustfmt
Dominik Csapak [Tue, 3 Oct 2023 14:32:26 +0000 (16:32 +0200)]
pwt-macros: widget: rustfmt

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoDialog: add html_title
Dietmar Maurer [Wed, 4 Oct 2023 14:59:07 +0000 (16:59 +0200)]
Dialog: add html_title

15 months agouse IntoOptionalInlineHtml for panel titles
Dietmar Maurer [Wed, 4 Oct 2023 10:56:09 +0000 (12:56 +0200)]
use IntoOptionalInlineHtml for panel titles

15 months agoLoader::set_loader - supress notifications
Dietmar Maurer [Tue, 3 Oct 2023 15:25:56 +0000 (17:25 +0200)]
Loader::set_loader -  supress notifications

15 months agoLoader: use SharedState
Dietmar Maurer [Tue, 3 Oct 2023 09:13:01 +0000 (11:13 +0200)]
Loader: use SharedState

16 months agodata_table: initialize sort_order correctly
Dominik Csapak [Mon, 2 Oct 2023 10:35:45 +0000 (12:35 +0200)]
data_table: initialize sort_order correctly

by picking up the column sort order during initialization.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agofield2: add 'pwt-pointer' class to peek_icon
Dominik Csapak [Mon, 2 Oct 2023 10:03:17 +0000 (12:03 +0200)]
field2: add 'pwt-pointer' class to peek_icon

so it appears clickable, also translate the tooltips

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agoinput_panel: add custom label/field width properties
Dominik Csapak [Mon, 2 Oct 2023 09:54:35 +0000 (11:54 +0200)]
input_panel: add custom label/field width properties

and add them to the style if set

note that the default input-panel width is set to 'min-content'. So when
one sets a custom width to something relative (e.g. 1fr) it will
probably be too small and one must also set 'width: auto' or similar
on the input-panel

also for now we have to maintain the default here and in the scss
(maybe there is a better way for that?)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agoRevert "field2: avoid pwt-w-100 (move to css, without !important)"
Dietmar Maurer [Sat, 30 Sep 2023 08:56:35 +0000 (10:56 +0200)]
Revert "field2: avoid pwt-w-100 (move to css, without !important)"

This reverts commit b7dc08a5d2b3c07675f173eb1784460eac762f47.

Because it just add more layout problems ...

16 months agofield2: avoid pwt-w-100 (move to css, without !important)
Dietmar Maurer [Sat, 30 Sep 2023 06:31:53 +0000 (08:31 +0200)]
field2: avoid pwt-w-100 (move to css, without !important)

16 months agostore: readd caching behaviour for update_filtered_data
Dominik Csapak [Fri, 29 Sep 2023 10:36:42 +0000 (12:36 +0200)]
store: readd caching behaviour for update_filtered_data

commit 894d23c removed the version tracking, but that was integral to
caching the filtered/sorted data. Without that we always sorted/filtered
the list on read, even when scrolling with virtual scroll, etc.

this patch reintroduces the version tracking, but the only point where
we update the version is during the Drop handler of StoreWriteGuard, so
the new notify behaviour stays the same.

Fixes: 894d23c ("state/store: always notify, drop version tracking")
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agostore: rustfmt
Dominik Csapak [Fri, 29 Sep 2023 07:55:12 +0000 (09:55 +0200)]
store: rustfmt

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agomove icons out of field_std_props
Dominik Csapak [Fri, 29 Sep 2023 07:35:37 +0000 (09:35 +0200)]
move icons out of field_std_props

and implement it directly in the structs we want to have it:
Combobox, Dropdown, Selector, Field

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agodata_table: sort by order of clicking, not by order of columns
Dominik Csapak [Thu, 28 Sep 2023 13:33:25 +0000 (15:33 +0200)]
data_table: sort by order of clicking, not by order of columns

by introducing a seperate sort_order list of column indices instead
of iterating over the columns

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agodata_table/header_state: rustfmt
Dominik Csapak [Thu, 28 Sep 2023 13:30:46 +0000 (15:30 +0200)]
data_table/header_state: rustfmt

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agoTooltip: allow to override display class
Dietmar Maurer [Fri, 29 Sep 2023 10:03:53 +0000 (12:03 +0200)]
Tooltip: allow to override display class