-
Notifications
You must be signed in to change notification settings - Fork 9
Added support for custom column width #1477
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
Added support for custom column width #1477
Conversation
…dth-of-columns-based-on-column-type' into 1430-data-object-grid-default-width-of-columns-based-on-column-type
…s-based-on-column-type
...t/dynamic-types/definitions/grid-cell/types/asset-link/dynamic-type-grid-cell-asset-link.tsx
Show resolved
Hide resolved
...finitions/grid-cell/types/data-object-adapter/dynamic-type-grid-cell-data-object-adapter.tsx
Outdated
Show resolved
Hide resolved
...bjects/data-related/types/dynamic-type-object-data-advanced-many-to-many-object-relation.tsx
Outdated
Show resolved
Hide resolved
...bjects/data-related/types/dynamic-type-object-data-advanced-many-to-many-object-relation.tsx
Outdated
Show resolved
Hide resolved
...tions/objects/data-related/types/dynamic-type-object-data-advanced-many-to-many-relation.tsx
Outdated
Show resolved
Hide resolved
assets/js/src/core/modules/element/dynamic-types/registry/dynamic-type-registry-abstract.tsx
Outdated
Show resolved
Hide resolved
.../objects/grid-cell-preview/advanced-many-to-many-relation/advanced-many-to-many-relation.tsx
Show resolved
Hide resolved
…dth-of-columns-based-on-column-type' into 1430-data-object-grid-default-width-of-columns-based-on-column-type
…s-based-on-column-type
…dth-of-columns-based-on-column-type' into 1430-data-object-grid-default-width-of-columns-based-on-column-type # Conflicts: # public/build/30ac78b6-e988-4837-afc4-c435c4decc24/main.js # public/build/30ac78b6-e988-4837-afc4-c435c4decc24/main.js.LICENSE.txt # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/105.js # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/105.js.LICENSE.txt # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/core-dll.css # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/core-dll.js # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/core-dll.js.LICENSE.txt # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/fonts/Lato-Bold.636be8de.ttf # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/fonts/Lato-Light.c7400fca.ttf # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/fonts/Lato-Regular.9d883d54.ttf # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/images/layers-2x.8f2c4d11.png # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/images/layers.416d9136.png # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/images/marker-icon.2b3e1faf.png # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/images/spritesheet-2x.7ea3a6d4.png # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/images/spritesheet.a4e0eb7a.svg # public/build/b5bed491-d48d-4ba8-a903-b4988c7133b9/images/spritesheet.ef32ea2b.png # public/build/ccbb8744-2c88-4f6b-aa4e-1d31b0c260ef/vendor.js # public/build/ccbb8744-2c88-4f6b-aa4e-1d31b0c260ef/vendor.js.LICENSE.txt
…s-based-on-column-type
…-column-type' of https://github.com/pimcore/studio-ui-bundle into 1430-data-object-grid-default-width-of-columns-based-on-column-type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some adjustments. Most topics work already very good now but we should try to do some more adjustments:
- Please check my comments
- The encryped field data type should delegete the field width to the original one.
- Asset metadata fields do for some reason not respect the column width. E.g. a "asset-link" field does not have 350px width but only 150px
- We should think about a solution for the system fields which use "text". For some of them like type, mime type, class definition etc. 350px is too wide.
But let's do a short discussion about the points. :)
...finitions/grid-cell/types/data-object-adapter/dynamic-type-grid-cell-data-object-adapter.tsx
Outdated
Show resolved
Hide resolved
...ions/grid-cell/types/data-object-object-brick/dynamic-type-grid-cell-data-object-adapter.tsx
Outdated
Show resolved
Hide resolved
...bjects/data-related/types/dynamic-type-object-data-advanced-many-to-many-object-relation.tsx
Outdated
Show resolved
Hide resolved
...tions/objects/data-related/types/dynamic-type-object-data-advanced-many-to-many-relation.tsx
Outdated
Show resolved
Hide resolved
…dth-of-columns-based-on-column-type' into 1430-data-object-grid-default-width-of-columns-based-on-column-type # Conflicts: # assets/js/src/core/modules/element/dynamic-types/definitions/grid-cell/types/data-object-adapter/dynamic-type-grid-cell-data-object-adapter.tsx # assets/js/src/core/modules/element/dynamic-types/definitions/grid-cell/types/data-object-object-brick/dynamic-type-grid-cell-data-object-adapter.tsx # assets/js/src/core/modules/element/dynamic-types/definitions/objects/data-related/types/dynamic-type-object-data-advanced-many-to-many-object-relation.tsx # assets/js/src/core/modules/element/dynamic-types/definitions/objects/data-related/types/dynamic-type-object-data-advanced-many-to-many-relation.tsx
…dth-of-columns-based-on-column-type' into 1430-data-object-grid-default-width-of-columns-based-on-column-type
…s-based-on-column-type
|
Changes in this pull request
Resolves #1430
Additional info
This pull request introduces enhancements to the grid component by adding support for dynamic column widths based on cell types. It includes changes to the
Grid
component, updates to the dynamic type grid cell definitions, and new methods for determining default column widths.Enhancements to Grid Component
DynamicTypeGridCellRegistry
to theGrid
component, allowing dynamic grid cell types to define default column widths. (assets/js/src/core/components/grid/grid.tsx
)Grid
component to iterate over columns and set their widths based on thegetDefaultGridColumnWidth
method of the respective dynamic type. (assets/js/src/core/components/grid/grid.tsx
)Dynamic Type Grid Cell Definitions
getDefaultGridColumnWidth
method in theDynamicTypeGridCellAbstract
class, enabling each dynamic type to specify default column widths. (assets/js/src/core/modules/element/dynamic-types/definitions/grid-cell/dynamic-type-grid-cell-abstract.tsx
)getDefaultGridColumnWidth
for various grid cell types with predefined widths:dynamic-type-grid-cell-asset-preview.tsx
)dynamic-type-grid-cell-asset-link.tsx
)dynamic-type-grid-cell-boolean.tsx
)dynamic-type-grid-cell-text.tsx
)dynamic-type-grid-cell-text.tsx
)Object Data-Related Dynamic Types
getDefaultGridColumnWidth
to object data-related types, with widths tailored to specific use cases:dynamic-type-object-data-advanced-many-to-many-relation.tsx
)dynamic-type-object-data-external-image.tsx
)dynamic-type-object-data-geobounds.tsx
,dynamic-type-object-data-geopoint.tsx
,dynamic-type-object-data-geopolygon.tsx
,dynamic-type-object-data-geopolyline.tsx
) [1] [2] [3] [4]These changes collectively improve the flexibility and usability of the grid component by dynamically adjusting column widths based on the type of data being displayed.