-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue-29621: Excluding Hidden content types from the Widgets displayed (
#30517) This pull request introduces several changes to the `DotPaletteStore` and related test files to enhance the handling of content types and widgets, including the filtering of hidden content types. The most important changes include adding the `DotPropertiesService` for configuration management and refactoring the content type loading logic. Enhancements to `DotPaletteStore`: * Added `DotPropertiesService` to manage configuration settings and retrieve hidden content types (`CONTENT_PALETTE_HIDDEN_CONTENT_TYPES`). (`[[1]](diffhunk://#diff-8262303c46e34e159efdc68dec99a47ddf453302794be94483b1abee94c13556R9)`, `[[2]](diffhunk://#diff-5e9e57d14e6a9185a0988e2062be4028f862924c1b068ac9eddab73da058e94fR13-R20)`, `[[3]](diffhunk://#diff-5e9e57d14e6a9185a0988e2062be4028f862924c1b068ac9eddab73da058e94fL166-R169)`) * Refactored the `getContenttypesData` method to use `forkJoin` with multiple observables, including hidden content types, and improved the filtering logic to exclude hidden content types. (`[core-web/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/store/dot-palette.store.tsL252-L282](diffhunk://#diff-5e9e57d14e6a9185a0988e2062be4028f862924c1b068ac9eddab73da058e94fL252-L282)`) Updates to tests: * Updated test cases to include `DotPropertiesService` and verify the filtering of hidden content types in `dot-palette.store.spec.ts` and `edit-ema-palette.store.spec.ts`. (`[[1]](diffhunk://#diff-8262303c46e34e159efdc68dec99a47ddf453302794be94483b1abee94c13556R114-R136)`, `[[2]](diffhunk://#diff-8262303c46e34e159efdc68dec99a47ddf453302794be94483b1abee94c13556R147)`, `[[3]](diffhunk://#diff-8262303c46e34e159efdc68dec99a47ddf453302794be94483b1abee94c13556L185-R233)`, `[[4]](diffhunk://#diff-1440c725f71c6ba67d7a4847e983e63b1e7a3a4fe17042aafe9553a89ad19f22L46-R82)`, `[[5]](diffhunk://#diff-1440c725f71c6ba67d7a4847e983e63b1e7a3a4fe17042aafe9553a89ad19f22R119-R131)`, `[[6]](diffhunk://#diff-1440c725f71c6ba67d7a4847e983e63b1e7a3a4fe17042aafe9553a89ad19f22R141-R160)`) Refactoring: * Replaced inline sorting and filtering logic with pre-defined constants and helper methods to improve code readability and maintainability. (`[[1]](diffhunk://#diff-8262303c46e34e159efdc68dec99a47ddf453302794be94483b1abee94c13556R114-R136)`, `[[2]](diffhunk://#diff-8262303c46e34e159efdc68dec99a47ddf453302794be94483b1abee94c13556L185-R233)`, `[[3]](diffhunk://#diff-e60190c318aa61ddbc495b1c20398bb42e7baa8429b8241aa6964267f3ddd445L235-L259)`) These changes improve the overall functionality and maintainability of the `DotPaletteStore` by incorporating configuration management and enhancing the content type filtering logic. ### Video https://github.com/user-attachments/assets/a376dd9d-861f-4250-a67d-1dd0dd5474da --------- Co-authored-by: Rafael Velazco <[email protected]>
- Loading branch information
1 parent
b6cb29a
commit 4b4b2da
Showing
6 changed files
with
159 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.