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

feat(edit-content): implement relationship field data table with mock data #30825

Merged

Conversation

nicobytes
Copy link
Contributor

@nicobytes nicobytes commented Dec 2, 2024

Parent Issue

#30523

Proposed Changes

This pull request includes several changes to the core-web library, focusing on improvements to the dot-select-existing-content component and its associated files. The changes involve updates to the SCSS file, HTML templates, TypeScript components, and the addition of new tests. Here are the most important changes:

SCSS Changes:

  • Updated the primary tint color in _colors.scss from $color-palette-primary-200 to $color-palette-primary-100.

HTML Template Changes:

  • Added a condition to display the hint only if the field type is not RELATIONSHIP in dot-edit-content-field.component.html.
  • Removed the pagination HTML structure from pagination.component.html and added a new structure with conditional layout based on $currentPageReportLayout.

TypeScript Component Changes:

  • Added output import and defined onSelectItems signal to emit selected items in dot-select-existing-content.component.ts. [1] [2]
  • Replaced Content type with RelationshipFieldItem and updated the store to use tapResponse for handling content loading in existing-content.store.ts. [1] [2]

Test Additions:

  • Added a new test suite for DotSelectExistingContentComponent to validate dialog visibility, selected items state, and apply button label in dot-select-existing-content.component.spec.ts.

These changes enhance the functionality and maintainability of the dot-select-existing-content component and its related parts.

Checklist

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

This PR fixes: #30523

@nicobytes nicobytes linked an issue Dec 2, 2024 that may be closed by this pull request
Copy link

mergify bot commented Dec 2, 2024

⚠️ The sha of the head commit of this PR conflicts with #30794. Mergify cannot evaluate rules on this PR. ⚠️

@nicobytes nicobytes changed the title 30523 implement relationship field data table with mock data feat(edit-content): implement relationship field data table with mock data Dec 4, 2024
@nicobytes nicobytes marked this pull request as ready for review December 4, 2024 18:28
@nicobytes nicobytes requested a review from Copilot December 5, 2024 20:22

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

Files not reviewed (10)
  • core-web/libs/dotcms-scss/shared/_colors.scss: Language not supported
  • core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-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/pagination/pagination.component.html: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/pagination/pagination.component.html: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.scss: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts: Evaluated as low risk
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts: Evaluated as low risk
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/pagination/pagination.component.ts: Evaluated as low risk
Comments skipped due to low confidence (1)

core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/services/relationship-field.service.ts:73

  • [nitpick] The hardcoded language values should be made configurable or documented clearly to avoid confusion.
language: faker.helpers.arrayElement(['English (en-us)', 'Spanish (es-es)', 'French (fr-fr)']),
@nicobytes
Copy link
Contributor Author

nicobytes commented Dec 5, 2024

2024-12-05.16-56-26.mp4

Resposive

2024-12-05.17-01-10.mp4

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

Files not reviewed (10)
  • core-web/libs/dotcms-scss/shared/_colors.scss: Language not supported
  • core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-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/pagination/pagination.component.html: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.html: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/pagination/pagination.component.html: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.html: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.scss: Language not supported
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/dot-edit-content-relationship-field.component.ts: Evaluated as low risk
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-select-existing-content/dot-select-existing-content.component.ts: Evaluated as low risk
  • core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/pagination/pagination.component.ts: Evaluated as low risk
Comments skipped due to low confidence (1)

core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/services/relationship-field.service.ts:73

  • The 'language' property should be consistent with the application's supported languages. Ensure that the values are not randomly generated.
language: faker.helpers.arrayElement(['English (en-us)', 'Spanish (es-es)', 'French (fr-fr)']),
…-data' of github.com:dotCMS/core into 30523-implement-relationship-field-data-table-with-mock-data
…ck-data' and '30523-implement-relationship-field-data-table-with-mock-data' of github.com:dotCMS/core into 30523-implement-relationship-field-data-table-with-mock-data
@nicobytes nicobytes enabled auto-merge December 6, 2024 20:24
@nicobytes nicobytes added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit d19b399 Dec 6, 2024
35 checks passed
@nicobytes nicobytes deleted the 30523-implement-relationship-field-data-table-with-mock-data branch December 6, 2024 22:30
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.

Implement Relationship Field Data Table with Mock Data
3 participants