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

Fix #26512: Edit Content add Calendar related fields #26523

Merged
merged 6 commits into from
Oct 25, 2023

Conversation

zJaaal
Copy link
Contributor

@zJaaal zJaaal commented Oct 25, 2023

🤖 Generated by Copilot at 6be5488

Summary

📅🛠️🧪

This pull request adds support for calendar fields in the edit content library, by creating a new dot-edit-content-calendar-field component, updating the dot-edit-content-field component to render it, and refactoring the dot-edit-content-form component and service to use a new interface for the edit content form data. It also adds and updates some tests, mocks, types and constants for the new and existing components. Additionally, it deletes an unused utility file and adds a new enum file for the field types.

We're editing content fields with Angular
We're adding calendar types and some more
We're changing interfaces and enums
Heave ho, heave ho, on the count of four

Walkthrough

  • Add a new dot-edit-content-calendar-field component to handle date, time and date-and-time fields with the PrimeNG calendar component (link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Modify the dot-edit-content-field component to render the dot-edit-content-calendar-field component for the calendar field types using the ngSwitch directive (link, link, link)
  • Modify the dot-edit-content-form component to create form controls based on the fields array instead of the layout, and to filter out the row and column fields using the filtered types enum (link, link, link, link, link, link, link)
  • Modify the edit-content.layout component and the dot-edit-content service to map the result of the getContentType method to an object that includes the layout and fields properties, to match the new interface for the edit content form data (link, link, link, link, link, link)
  • Modify the dot-edit-content-field component spec file to add tests for the label, hint and field type rendering for each field type and data type combination, and to group them in describe blocks (link, link, link)
  • Remove some imports from the dot-edit-content-field component file and the dot-edit-content-fields module file, to avoid importing components that are already declared in the module (link, link)
  • Delete the unused utils file for the dot-edit-content-field component (link)

Screenshots

Screen.Recording.2023-10-25.at.4.43.56.PM.mov

@dotcms-sonarqube
Copy link

@fmontes fmontes merged commit 64f6bb6 into master Oct 25, 2023
24 checks passed
@fmontes fmontes deleted the 26512-edit-content-add-date-and-date-and-time-field branch October 25, 2023 22:18
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.

Edit Content: Add Date and Date and Time Field
4 participants