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

Create Basic Relationship Field Structure for Edit Contentlet #30515

Closed
Tracked by #30495
oidacra opened this issue Oct 30, 2024 · 3 comments · Fixed by #30794
Closed
Tracked by #30495

Create Basic Relationship Field Structure for Edit Contentlet #30515

oidacra opened this issue Oct 30, 2024 · 3 comments · Fixed by #30794

Comments

@oidacra
Copy link
Member

oidacra commented Oct 30, 2024

Parent Issue

#30495

User Story

As a developer, I need to implement the base structure for the Relationship Field component in Edit Contentlet, so we can build upon it for further functionality.

Acceptance Criteria

  1. Component Structure

    • Create basic Relationship Field component
    • Register component in the Field Type system
    • Handle basic field properties (required, disabled, etc.)
    • Implement basic form field validation
    • Add placeholder for content relationship data
  2. Integration Requirements

    • Properly integrate with Edit Contentlet form
    • Handle field initialization
    • Support field configuration
    • Implement basic state management

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

External files

Figma File Component

CleanShot 2024-10-30 at 14 46 19@2x

@oidacra oidacra changed the title Implement Relationship Field Component Create Basic Relationship Field Structure for Edit Contentlet Oct 30, 2024
@oidacra oidacra moved this from New to Next 1-3 Sprints in dotCMS - Product Planning Oct 30, 2024
@oidacra oidacra moved this from Future to Current Sprint Backlog in dotCMS - Product Planning Nov 13, 2024
@oidacra oidacra moved this from Current Sprint Backlog to Next 1-3 Sprints in dotCMS - Product Planning Nov 13, 2024
@nicobytes nicobytes self-assigned this Nov 25, 2024
@nicobytes nicobytes linked a pull request Nov 27, 2024 that will close this issue
3 tasks
@nicobytes nicobytes moved this from In Progress to In Review in dotCMS - Product Planning Nov 29, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 3, 2024
### Parent Issue

#30515

### Proposed Changes
This pull request introduces a new `RELATIONSHIP` field type in the
dotCMS content editing module. The most important changes include the
addition of the `DotEditContentRelationshipFieldComponent`, updates to
the `FIELD_TYPES` enum, and the creation of supporting components and
stores for managing relationship fields.

### Introduction of `RELATIONSHIP` Field Type:

*
[`core-web/libs/edit-content/src/lib/models/dot-edit-content-field.enum.ts`](diffhunk://#diff-aa72329fa1c18891b5d44042ac6ae09ff3d915621f16a084982f87d068c2453aL33-R34):
Added `RELATIONSHIP` to the `FIELD_TYPES` enum.

### New Components for Relationship Fields:

*
[`core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts`](diffhunk://#diff-5cb2225620beb3baaf219cbfa2241aa934812de8ece62e1d4f7e7747f5f15416R1-R129):
Created `DotEditContentRelationshipFieldComponent` to handle
relationship fields.
*
[`core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts`](diffhunk://#diff-14d3d666b0a074fe26436013ebf4abe96e518e28e9799b85b393d14b82ac528bR1-R49):
Added `DotSelectExistingContentComponent` for selecting existing
content.

### Supporting Stores and Utilities:

*
[`core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.ts`](diffhunk://#diff-a2c980da63c75c9dc2cd899475beab89cb79492b1dc0819574fc380e856e7ed1R1-R32):
Created `RelationshipFieldStore` to manage state for relationship
fields.
*
[`core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/store/existing-content.store.ts`](diffhunk://#diff-1c1758cf3c19df1a6e75e613761290b504a1d26e8521af1492593e1825969b63R1-R57):
Added `ExistingContentStore` to manage state for selecting existing
content.

### Template and Style Updates:

*
[`core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.html`](diffhunk://#diff-685da2f87189fff825b7aec2666cfbabdb33c40f8f9d8c82df77ebb8652ccd4aR145-R152):
Updated template to include `RELATIONSHIP` field type.
*
[`core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html`](diffhunk://#diff-ba794904cc95635d9efca07b7e2bfeb948b5b0bb0c8e1e97c777c615398ba011R1-R88):
Added template for selecting existing content.
*
[`core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.scss`](diffhunk://#diff-778cca685214b49b5445efc5613609b68214a24052f4ed77408caeb0c9e6ffb2R1-R20):
Added styles for selecting existing content.

### Checklist
- [x] Tests
- [x] Translations
- [x] Security Implications Contemplated (add notes if applicable)



https://github.com/user-attachments/assets/0a0f9f23-1949-44c2-ac06-e4d62f8dbaf3
@github-project-automation github-project-automation bot moved this from In Review to Internal QA in dotCMS - Product Planning Dec 3, 2024
@dsilvam dsilvam assigned dsilvam and unassigned nicobytes Dec 4, 2024
@nicobytes
Copy link
Contributor

QA Notes:

This card only covers the basic setup and structure with mock data for the new relationship field. So far, there isn't connection with the proper endpoints.

2024-11-28.14-18-18.mp4

@dsilvam
Copy link
Contributor

dsilvam commented Dec 4, 2024

Passed IQA:

Main screen for selection of existing content with all the elements in the design.
The only one missing is the "Show selected entries" but will be done in the next PR.

Image

Component for showing the included related content in place and looking as the design:

Image

@dsilvam dsilvam moved this from Internal QA to QA - Backlog in dotCMS - Product Planning Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants