Skip to content

Predictable property order for both grid & form#130

Open
mstahv wants to merge 7 commits into
alejandro-du:masterfrom
mstahv:master
Open

Predictable property order for both grid & form#130
mstahv wants to merge 7 commits into
alejandro-du:masterfrom
mstahv:master

Conversation

@mstahv

@mstahv mstahv commented Apr 2, 2024

Copy link
Copy Markdown

setColumns & setVisibleProperties calls now become more like optional configuration than must have. Removes a ton of nasty looking non-type configuration code.

BTW. Now that property order is "correct", in many cases an inverted approach for visible column/property configuration would be often better, something like setHiddenColumns/Properties 🤔

And yeah, next step would be to replace Binder with FormBinder from Viritin to make crossfield validation work properly 🤓

mstahv added 2 commits April 2, 2024 20:58
setColumns & setVisibleProperties calls now become more like optional configuration than must have.
Removes a ton of nasty looking non-type configuration code.

BTW. Now that property order is "correct", in many cases an inverted approach for visible column/property
configuration would be often better, something like setHiddenColumns/Properties 🤔

And yeah, next step would be to replace Binder with FormBinder from Viritin to make crossfield validation
work properly 🤓
@mstahv mstahv marked this pull request as draft April 2, 2024 19:22
@mstahv

mstahv commented Apr 2, 2024

Copy link
Copy Markdown
Author

Added property hiding, partly to VGrid, so no release for transitive dependency yet. Will cut a version still soon...

@mstahv mstahv marked this pull request as ready for review April 2, 2024 19:33
@mstahv

mstahv commented Apr 2, 2024

Copy link
Copy Markdown
Author

Dependency now syncing to Maven Central

@mstahv

mstahv commented Apr 2, 2024

Copy link
Copy Markdown
Author

Added also fixes to #125 & #127, essentially added a support for wider set of basic data types

@alejandro-du

Copy link
Copy Markdown
Owner

@mstahv - Thanks for the contribution. Is there any way to implement this so that no additional dependencies are added?

@mstahv

mstahv commented Apr 5, 2024

Copy link
Copy Markdown
Author

Sure, just copy all the code from dependencies 🤪 Jackson (that is mostly used here) is a dependency coming in via Vaadin, that isn't going anywhere. VGrid from Viritin is essentially the Vaadin Grid, but with proper property handling (and some other very handy features). Hiding its more specific type (at least by default), would be nice, but then the column hiding would need to be moved to the top level.

On my list would be to add buillt in support for enums, lists/sets of basic data types & simple objects, Java recorods and doing some UX improvements. For those Viritin would need to be cloned in completely 🤷‍♂️

BTW. Some obsolete code was left in the example. Removed.

@mstahv

mstahv commented Apr 5, 2024

Copy link
Copy Markdown
Author

Added some additional cleanup (thanks to Vaadin improvements) and removed H2 config so that the demo app starts without additional tricks. As a DB fellow you ought to update that to use TestContainers & MariaDB 🤓

@alejandro-du

alejandro-du commented Apr 21, 2024

Copy link
Copy Markdown
Owner

Yeah, I wasn't clear or precise. I was referring to the dependency added to the pom.xml file (viritin). Is it possible to implement "predictable property order" without it? My policy with this add-on is not to include add-on dependencies that are not Vaadin-official. This is one of the reasons this add-on is successful—it uses "plain Vaadin" with no additional dependencies (that are not provided-scoped).

Thanks a lot for the additional cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants