-
Notifications
You must be signed in to change notification settings - Fork 19
Rename "terms and guestbook" based on the permission #923
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
base: develop
Are you sure you want to change the base?
Rename "terms and guestbook" based on the permission #923
Conversation
There was a problem hiding this 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.
| "filesTabTitle": "Files", | ||
| "metadataTabTitle": "Metadata", | ||
| "termsTabTitle": "Terms and Guestbook", | ||
| "termsTabTitleReadOnly": "Terms", |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new translation key "termsTabTitleReadOnly" is added only to the English locale file but is missing from the Spanish locale file (public/locales/es/dataset.json). This will cause the Spanish translation to fall back to the English version or display the key itself. Please add the corresponding Spanish translation, for example: "termsTabTitleReadOnly": "Términos"
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:
Terms and Guestbook, and read-only users seeTerms.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: