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(editor-content): Reorder items in relationship field #31389

Conversation

nicobytes
Copy link
Contributor

@nicobytes nicobytes commented Feb 14, 2025

Parent Issue

#31383

Proposed Changes

This pull request includes several changes to the dot-edit-content-relationship-field component and its associated store and tests. The primary focus is on simplifying the data handling methods and updating the UI for better consistency.

Changes to UI elements:

  • Updated the drag handle icon in the template from a font-awesome icon to a material icon for better visual consistency (dot-edit-content-relationship-field.component.html).

Changes to data handling methods:

  • Replaced the usage of addData and reorderData methods with setData method to streamline data updates (dot-edit-content-relationship-field.component.ts). [1] [2]
  • Removed the addData and reorderData methods from the store, consolidating data updates into the setData method (relationship-field.store.ts). [1] [2]

Changes to tests:

  • Removed tests related to the addData and reorderData methods since these methods are no longer used (relationship-field.store.spec.ts). [1] [2]

Checklist

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

Additional Info

** any additional useful context or info **

Screenshots

Original Updated
** original screenshot ** ** updated screenshot **

This PR fixes: #31383

Copy link

Please use a Conventional Commit title format for this PR. For more information, see https://www.conventionalcommits.org/en/v1.0.0/

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 8 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html: Language not supported
  • e2e/dotcms-e2e-node/frontend/pages/textField.page.ts: Evaluated as low risk
  • e2e/dotcms-e2e-node/frontend/data/defaultContentType.ts: Evaluated as low risk
@nicobytes nicobytes changed the title chore(editor-content): fix refactor chore(editor-content): Reorder items in relationship field Feb 14, 2025
Copy link

Please use a Conventional Commit title format for this PR. For more information, see https://www.conventionalcommits.org/en/v1.0.0/

@nicobytes nicobytes enabled auto-merge February 14, 2025 20:20
@nicobytes nicobytes added this pull request to the merge queue Feb 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 14, 2025
@nicobytes nicobytes added this pull request to the merge queue Feb 14, 2025
Merged via the queue into main with commit 3ae0421 Feb 15, 2025
36 checks passed
@nicobytes nicobytes deleted the 31383-enable-drag-and-drop-to-reorder-items-in-the-relationship-field-table branch February 15, 2025 00:05
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.

Enable Drag and Drop to Reorder Items in the Relationship Field Table
3 participants