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): implement endpoint to fetch sites #30562

Merged

Conversation

nicobytes
Copy link
Contributor

@nicobytes nicobytes commented Nov 4, 2024

Parent Issue

#30215

Proposed Changes

This pull request includes multiple changes to the dot-site service and the dot-select-existing-file component, primarily focusing on adding pagination support and improving the file selection UI and its state management.

DotSiteService Enhancements:

  • Added a DEFAULT_PAGE constant and included a page parameter in the getSites method to support pagination. (core-web/libs/data-access/src/lib/dot-site/dot-site.service.ts) [1] [2]
  • Updated test cases to reflect the new page parameter in the URLs. (core-web/libs/data-access/src/lib/dot-site/dot-site.service.spec.ts) [1] [2]

DotSelectExistingFile Component Enhancements:

  • Improved the dot-sidebar component to handle loading states and display skeleton loaders while data is being fetched. (core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-select-existing-file/components/dot-sidebar/dot-sidebar.component.html, core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-select-existing-file/components/dot-sidebar/dot-sidebar.component.ts) [1] [2]
  • Added event handling for node expansion in the dot-sidebar component to dynamically load child nodes. (core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-select-existing-file/dot-select-existing-file.component.html)
  • Introduced a new test suite for the SelectExisingFileStore to cover folder loading and child node expansion logic. (core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-select-existing-file/store/select-existing-file.store.test.ts)
  • Updated the SelectExisingFileStore to manage the state of folder nodes, including loading states and expanded nodes. (core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-select-existing-file/store/select-existing-file.store.ts) [1] [2] [3] [4] [5]

Miscellaneous:

  • Minor CSS adjustments to the dot-select-existing-file component to improve layout and styling. (core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-select-existing-file/dot-select-existing-file.component.scss)
  • Refactored the file-field.store.spec.ts to use TestBed for dependency injection and added missing imports. (core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/store/file-field.store.spec.ts) [1] [2]

Checklist

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

Screenshots

2024-11-05.18-20-03.mp4

This PR fixes: #30215

@nicobytes nicobytes linked an issue Nov 4, 2024 that may be closed by this pull request
@nicobytes nicobytes marked this pull request as ready for review November 5, 2024 22:21
@nicobytes nicobytes requested review from hmoreras and oidacra November 6, 2024 14:03
… of github.com:dotCMS/core into 30215-select-existing-file-show-hostfolder-on-the-left
@nicobytes nicobytes added this pull request to the merge queue Nov 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2024
@nicobytes nicobytes added this pull request to the merge queue Nov 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2024
@nicobytes nicobytes enabled auto-merge November 6, 2024 20:52
@nicobytes nicobytes added this pull request to the merge queue Nov 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2024
@nicobytes nicobytes added this pull request to the merge queue Nov 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2024
@nicobytes nicobytes added this pull request to the merge queue Nov 7, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2024
@nicobytes nicobytes added this pull request to the merge queue Nov 7, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2024
@nicobytes nicobytes added this pull request to the merge queue Nov 7, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2024
@nicobytes nicobytes added this pull request to the merge queue Nov 8, 2024
Merged via the queue into main with commit 9269649 Nov 8, 2024
21 checks passed
@nicobytes nicobytes deleted the 30215-select-existing-file-show-hostfolder-on-the-left branch November 8, 2024 15:47
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.

Select Existing File: Show host/folder on the left
4 participants