Skip to content
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

chore(edit-content): add site field to search relationships #31298

Merged
merged 10 commits into from
Feb 4, 2025

Conversation

nicobytes
Copy link
Contributor

@nicobytes nicobytes commented Feb 3, 2025

Parent Issue

#31280

Proposed Changes

This pull request introduces a new SiteFieldComponent for selecting a site from a tree structure in the dot-edit-content-relationship-field module. The changes include the implementation of the component, its associated styles, unit tests, and a store for managing the component's state.

Key changes:

Component Implementation:

  • site-field.component.ts: Added the SiteFieldComponent which implements ControlValueAccessor to work with Angular forms and uses PrimeNG's TreeSelect component for the UI.
  • site-field.component.html: Created the template for the SiteFieldComponent using p-treeSelect for the tree structure and added error handling.
  • site-field.component.scss: Added styles to ensure the TreeSelect component spans the full width of its container.

Unit Tests:

  • site-field.component.spec.ts: Added comprehensive unit tests for the SiteFieldComponent, covering initial state, control value accessor implementation, and edge cases.
  • site-field.store.spec.ts: Added unit tests for the SiteFieldStore, ensuring proper loading of sites, handling of errors, and state management.

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

This PR fixes: #31280

@nicobytes nicobytes linked an issue Feb 3, 2025 that may be closed by this pull request
@nicobytes nicobytes marked this pull request as ready for review February 3, 2025 20:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 10 changed files in this pull request and generated 2 comments.

Files not reviewed (5)
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/components/site-field/site-field.component.html: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/components/site-field/site-field.component.scss: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.compoment.html: Language not supported
  • dotCMS/src/main/webapp/WEB-INF/messages/Language.properties: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/components/search/search.component.spec.ts: Evaluated as low risk

@nicobytes nicobytes enabled auto-merge February 4, 2025 17:22
@nicobytes
Copy link
Contributor Author

search.mp4

@nicobytes nicobytes added this pull request to the merge queue Feb 4, 2025
Merged via the queue into main with commit 6525f41 Feb 4, 2025
36 checks passed
@nicobytes nicobytes deleted the 31280-relationship-field-search-site-or-host-field branch February 4, 2025 20:28
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.

Relationship Field Search: Site Or Host Field
3 participants