Skip to content

Guestbook Edit and Guestbook Response Integration#1006

Open
ChengShi-1 wants to merge 13 commits into
ManageGuestbookfrom
1002-edit-guestbook-and-guestbook-responses-integration
Open

Guestbook Edit and Guestbook Response Integration#1006
ChengShi-1 wants to merge 13 commits into
ManageGuestbookfrom
1002-edit-guestbook-and-guestbook-responses-integration

Conversation

@ChengShi-1

@ChengShi-1 ChengShi-1 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

  • edit guestbook
  • copy guestbook
  • view responses page of a single guestbook

Which issue(s) this PR closes:

Special notes for your reviewer:

It's based on ManageGuestbook PR

Suggestions on how to test this:

EDIT

  • Collection -> Edit -> Dataset Guestbook, so you'll land on Manage guestbook page
  • Create guestbook with general information, after successfully create, you'll automatically navigate back to Manage guestbook page
  • In the Action column, find the guestbook you just created, click "Edit"
  • Navigating to Edit page, and you could try edit some fields(also custom questions), and test if it works correctly and similar to JSF
image image

COPY

  • In Manage Guestbook page, Action button -> copy
  • It should navigate a new page to create a guestbook, prefilled with the target guestbook information
  • Save and check if the guestbook could be copied correctly

VIEW RESPONSES

  • Create a dataset, upload a file, and set a dataset guestbook (In Edit Dataset -> Terms and Guestbook), and publish the dataset
  • Open a new page in incognito mode, so you're a guest user now
  • Go to the dataset you just created, and download a file. Now you should see a model with form asking for your information, so you enter information to download the file
  • Back to the page you have authorized user logged in, in Manage Dataset page, you should see the response count = 1
image
  • Find the Action button "View Responses", click and go to responses page
  • Verify whether the info is matching what you entered
image

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

yes, attached screenshots above

Is there a release notes or changelog update needed for this change?:

Yes

Additional documentation:

@ChengShi-1 ChengShi-1 linked an issue Jun 24, 2026 that may be closed by this pull request
3 tasks
@github-actions github-actions Bot added GREI Re-arch GREI re-architecture-related SPA labels Jun 24, 2026
@ChengShi-1
ChengShi-1 changed the base branch from develop to ManageGuestbook June 24, 2026 18:56
@coveralls

coveralls commented Jun 24, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 97.254% (-0.03%) from 97.281% — 1002-edit-guestbook-and-guestbook-responses-integration into ManageGuestbook

@ChengShi-1 ChengShi-1 added Size: 10 A percentage of a sprint. 7 hours. FY26 Sprint 26 FY26 Sprint 26 (2026-06-17 - 2026-07-01) labels Jun 26, 2026
@ChengShi-1
ChengShi-1 marked this pull request as ready for review June 28, 2026 19:26
@ChengShi-1 ChengShi-1 self-assigned this Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds full “modern” support for managing guestbooks beyond preview/download: users can now edit an existing guestbook, copy an existing guestbook into a prefilled create flow, and view guestbook responses in a dedicated responses page. This builds on the existing Manage Guestbooks integration by wiring navigation/routes, adding repositories/use-cases/hooks, and expanding component/e2e coverage.

Changes:

  • Add guestbook Edit page flow (route + page + hook + repository support).
  • Add Copy flow (Manage Guestbooks → Create page prefilled via navigation state + shared form extraction).
  • Add Guestbook Responses page (route + page + hook + pagination/sorting + CSV download).

Reviewed changes

Copilot reviewed 50 out of 51 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/e2e-integration/e2e/sections/templates/DatasetTemplates.spec.tsx Updates template action label assertions from View → Preview.
tests/e2e-integration/e2e/sections/guestbooks/ManageGuestbooks.spec.ts Replaces “not implemented” action checks with real edit flow e2e coverage.
tests/component/sections/templates/DatasetTemplates.spec.tsx Aligns component tests with View → Preview label change.
tests/component/sections/guestbooks/view-responses/useGetGuestbookResponsesByGuestbookId.spec.tsx Adds unit-style hook tests for fetching guestbook responses.
tests/component/sections/guestbooks/view-responses/GuestbookResponses.spec.tsx Adds component tests for the Guestbook Responses page (sorting, pagination, download, error states).
tests/component/sections/guestbooks/ManageGuestbooks.spec.tsx Adds navigation assertions for Copy and View Responses actions; updates Preview label assertions.
tests/component/sections/guestbooks/GuestbookActionButtons.spec.tsx Expands action button behavior tests (copy/edit/view responses handlers + delete placeholder).
tests/component/sections/guestbooks/edit-guestbook/useEditGuestbook.spec.tsx Adds hook tests for editing guestbooks and error formatting behavior.
tests/component/sections/guestbooks/edit-guestbook/EditGuestbook.spec.tsx Adds Edit Guestbook page component tests (prefill, submit, error states).
tests/component/sections/guestbooks/createGuestbookRepositoryStub.ts Updates repository stub to include editGuestbook.
tests/component/sections/guestbooks/create-guestbooks/CreateGuestbook.spec.tsx Adds copy-prefill create test + CreateGuestbookButton navigation test + error/not-found coverage.
tests/component/sections/file/file-action-buttons/access-file-menu/AccessFileMenu.spec.tsx Updates guestbook repository stubs for new editGuestbook method.
tests/component/sections/edit-dataset-terms/useRemoveDatasetGuestbook.spec.tsx Updates guestbook repository stub to include editGuestbook.
tests/component/sections/edit-dataset-terms/useAssignDatasetGuestbook.spec.tsx Updates guestbook repository stub to include editGuestbook.
tests/component/sections/edit-dataset-terms/EditGuestbook.spec.tsx Updates guestbook repository stub to include editGuestbook.
tests/component/sections/edit-dataset-terms/EditDatasetTerms.spec.tsx Updates guestbook repository stub to include editGuestbook.
tests/component/sections/dataset/dataset-guestbook/DatasetGuestbook.spec.tsx Updates guestbook repository stub to include editGuestbook.
tests/component/sections/dataset/dataset-files/guestbook/DownloadWithTermsAndGuestbookModal.spec.tsx Updates guestbook repository stub to include editGuestbook.
src/stories/shared-mock-repositories/guestbook/GuestbookMockRepository.ts Updates storybook guestbook repository to new DTO + editGuestbook method.
src/sections/Route.enum.ts Adds routes/helpers for guestbook edit and responses pages.
src/sections/guestbooks/view-responses/useGetGuestbookResponsesByGuestbookId.ts Implements guestbook responses fetching hook with loading/error handling.
src/sections/guestbooks/view-responses/GuestbookResponsesFactory.tsx Adds route factory wiring for responses page params parsing.
src/sections/guestbooks/view-responses/GuestbookResponses.tsx Implements Guestbook Responses page UI (sorting, pagination, CSV download).
src/sections/guestbooks/useGetGuestbooksByCollectionId.tsx Routes guestbook list loading through a domain use case wrapper.
src/sections/guestbooks/ManageGuestbooks.tsx Wires Copy/Edit/View Responses actions to navigation routes.
src/sections/guestbooks/Guestbooks.module.scss Adds styling for the responses page layout and table cells.
src/sections/guestbooks/guestbook-form/GuestbookForm.tsx Extracts shared guestbook create/edit form (fields + custom questions editor).
src/sections/guestbooks/edit-guestbook/useEditGuestbook.ts Adds edit hook with formatted WriteError handling + default error message.
src/sections/guestbooks/edit-guestbook/EditGuestbookFactory.tsx Adds route factory wiring for edit page params parsing.
src/sections/guestbooks/edit-guestbook/EditGuestbook.tsx Implements Edit Guestbook page (prefill + submit + navigation + alerts).
src/sections/guestbooks/create-guestbooks/useCreateGuestbook.ts Switches create hook input type to shared GuestbookDTO.
src/sections/guestbooks/create-guestbooks/CreateGuestbook.tsx Implements copy-prefill support via location.state + uses shared GuestbookForm.
src/sections/guestbooks/action-buttons/GuestbookActionButtons.tsx Wires Copy/Edit/View Responses callbacks; adds disabled-guestbook Delete placeholder.
src/sections/dataset/dataset-files/files-table/file-actions/file-actions-cell/file-action-buttons/file-options-menu/DownloadWithTermsAndGuestbookModal.tsx Narrows custom question id typing (number only).
src/sections/collection/collection-items-panel/items-list/collection-card/CollectionCard.module.scss Updates link underline styling in collection cards.
src/router/routes.tsx Adds lazy-loaded routes for guestbook edit and responses pages.
src/guestbooks/infrastructure/repositories/GuestbookJSDataverseRepository.ts Adds editGuestbook support, normalizes customQuestions, and adopts shared GuestbookDTO.
src/guestbooks/domain/useCases/getGuestbooksByCollectionId.ts Adds domain use-case wrapper for listing guestbooks.
src/guestbooks/domain/useCases/editGuestbook.ts Adds domain use-case wrapper for editing guestbooks.
src/guestbooks/domain/useCases/DTOs/GuestbookDTO.ts Introduces shared DTO used by create/edit flows.
src/guestbooks/domain/useCases/createGuestbook.ts Switches create use case to shared GuestbookDTO.
src/guestbooks/domain/repositories/GuestbookRepository.ts Updates repository contract: create uses GuestbookDTO; adds editGuestbook.
src/guestbooks/domain/models/GuestbookResponsesPaginationInfo.ts Adds pagination model specialization for guestbook responses page.
src/guestbooks/domain/models/GuestbookResponse.ts Adjusts response model field ordering; includes email earlier.
src/guestbooks/domain/models/Guestbook.ts Narrows custom question/option id typing to number.
public/locales/es/guestbooks.json Adds/updates guestbook strings for edit/responses/delete + changes View → Preview.
public/locales/en/guestbooks.json Adds/updates guestbook strings for edit/responses/delete + changes View → Preview.
public/locales/en/datasetTemplates.json Changes templates action label View → Preview.
package.json Bumps @iqss/dataverse-client-javascript to 2.2.0-alpha.11.
package-lock.json Locks @iqss/dataverse-client-javascript to 2.2.0-alpha.11.
CHANGELOG.md Updates unreleased notes to mention edit/create guestbook pages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/sections/guestbooks/view-responses/GuestbookResponses.tsx Outdated
Comment thread public/locales/en/datasetTemplates.json
Comment thread CHANGELOG.md
@ChengShi-1 ChengShi-1 moved this to Ready for Review ⏩ in IQSS Dataverse Project Jul 1, 2026
@ChengShi-1 ChengShi-1 removed their assignment Jul 1, 2026
@cmbz cmbz added the FY27 Sprint 1 FY27 Sprint 1 (2026-07-01 - 2026-07-15) label Jul 1, 2026
@ekraffmiller ekraffmiller self-assigned this Jul 2, 2026
@ekraffmiller ekraffmiller moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Jul 2, 2026

@ekraffmiller ekraffmiller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, we just need to follow up with additional issues:

@github-project-automation github-project-automation Bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Jul 7, 2026
@ekraffmiller

Copy link
Copy Markdown
Contributor

For testers: waiting on the following issues to resolve the guestbook and guestbook response tables display:
IQSS/dataverse-client-javascript#460
IQSS/dataverse#12523
IQSS/dataverse#12451

@ekraffmiller ekraffmiller removed their assignment Jul 7, 2026
@cmbz cmbz added the FY27 Sprint 2 FY27 Sprint 2 (2026-07-15 - 2026-07-29) label Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 26 FY26 Sprint 26 (2026-06-17 - 2026-07-01) FY27 Sprint 1 FY27 Sprint 1 (2026-07-01 - 2026-07-15) FY27 Sprint 2 FY27 Sprint 2 (2026-07-15 - 2026-07-29) GREI Re-arch GREI re-architecture-related Size: 10 A percentage of a sprint. 7 hours. SPA

Projects

Status: Ready for QA ⏩

Development

Successfully merging this pull request may close these issues.

Edit Guestbook and Guestbook Responses Integration

5 participants