Skip to content

Rename "terms and guestbook" based on the permission#923

Open
ChengShi-1 wants to merge 2 commits intodevelopfrom
920-role-based-tab-naming-for-terms-and-guestbook
Open

Rename "terms and guestbook" based on the permission#923
ChengShi-1 wants to merge 2 commits intodevelopfrom
920-role-based-tab-naming-for-terms-and-guestbook

Conversation

@ChengShi-1
Copy link
Contributor

@ChengShi-1 ChengShi-1 commented Feb 12, 2026

What this PR does / why we need it:

It can change the tab name based on the user’s permission level. If a user has permission to edit the dataset, the tab will be labeled “Terms and Guestbook.” Otherwise, it will be labeled “Terms.”
Also, I notice a bug when the dataset is publishing, there is a loading state, two tabs component exist at the same time, and then the "files" components loads again. (the screen recording about this bug: https://github.com/user-attachments/assets/55410881-8f1a-404a-89f7-f3bb79b35c98

Which issue(s) this PR closes:

Special notes for your reviewer:

  • Dataset page Terms tab title now depends on permissions: users with dataset update permission see Terms and Guestbook, and read-only users see Terms.
  • Dataset page publish flow now avoids rendering duplicate tab sets by making tabs skeleton and tabs content mutually exclusive.

Suggestions on how to test this:

Test the dataset page tab name and edit tab name based on the permission

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

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

Yes

Additional documentation:

@ChengShi-1 ChengShi-1 linked an issue Feb 12, 2026 that may be closed by this pull request
@github-actions github-actions bot added FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) GREI Re-arch GREI re-architecture-related labels Feb 12, 2026
@coveralls
Copy link

coveralls commented Feb 12, 2026

Coverage Status

coverage: 97.771% (+0.4%) from 97.339%
when pulling 5defee9 on 920-role-based-tab-naming-for-terms-and-guestbook
into 24bdb22 on develop.

@ChengShi-1 ChengShi-1 marked this pull request as ready for review February 12, 2026 20:16
@ChengShi-1 ChengShi-1 added the Size: 3 A percentage of a sprint. 2.1 hours. label Feb 12, 2026
@ChengShi-1 ChengShi-1 moved this to Ready for Review ⏩ in IQSS Dataverse Project Feb 12, 2026
@ChengShi-1 ChengShi-1 requested a review from Copilot February 12, 2026 20:33
@ChengShi-1 ChengShi-1 added SPA SPA.Q1.2026.4 High Priority Bug Fixes labels Feb 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements role-based tab naming for the Dataset Terms section and fixes a bug with duplicate tab rendering during dataset publishing. Users with dataset update permissions will see "Terms and Guestbook" while read-only users will see just "Terms", addressing user feedback about confusing terminology for those who cannot access the guestbook functionality.

Changes:

  • Dynamic Terms tab title based on user permissions (update permission shows "Terms and Guestbook", read-only shows "Terms")
  • Fixed duplicate tabs rendering during publish flow by making skeleton and content mutually exclusive
  • Refactored test factories to use reusable permission helper methods

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/sections/dataset/Dataset.tsx Implements dynamic tab title based on permissions and fixes publish flow conditional logic
public/locales/en/dataset.json Adds new translation key for read-only terms tab title
tests/component/sections/dataset/Dataset.spec.tsx Adds test for read-only tab title and updates existing tests with flexible regex patterns
tests/component/dataset/domain/models/DatasetMother.ts Adds reusable test factory methods for permissions and refactors existing factories
tests/e2e-integration/e2e/sections/edit-dataset-terms/EditDatasetTerms.spec.tsx Updates E2E test to use flexible regex pattern for dynamic tab name
CHANGELOG.md Documents both the permission-based tab naming and duplicate tabs fix

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

@ekraffmiller ekraffmiller self-assigned this Feb 17, 2026
@ekraffmiller ekraffmiller moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Feb 17, 2026
Copy link
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

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

looks good, approved!

@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Feb 17, 2026
@ekraffmiller ekraffmiller removed their assignment Feb 17, 2026
@cmbz cmbz added the FY26 Sprint 18 FY26 Sprint 18 (2026-02-25 - 2026-03-11) label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) FY26 Sprint 18 FY26 Sprint 18 (2026-02-25 - 2026-03-11) GREI Re-arch GREI re-architecture-related Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q1.2026.4 High Priority Bug Fixes SPA

Projects

Status: Ready for QA ⏩

Development

Successfully merging this pull request may close these issues.

Role-Based Tab Naming for Terms and Guestbook

5 participants