feat: links to user, proposal, FAP from Experiments and Proposals table - #1593
Merged
Conversation
Add a generic RoleBasedLink wrapper that resolves its destination from the current user's role. Use it in the experiments table so a user officer's proposal-id link opens the officer proposal modal, carrying a `from` param so closing the modal returns to the originating page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shivoomiess
requested review from
ellen-wright,
jekabs-karklins and
yoganandaness
and removed request for
a team and
ellen-wright
June 22, 2026 08:18
Add a generic RoleBasedLink wrapper that resolves its destination from the current user's role. Use it in the experiments table so a user officer's proposal-id link opens the officer proposal modal, carrying a `from` param so closing the modal returns to the originating page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shivoomiess
force-pushed
the
SWAP-5403-links
branch
from
June 22, 2026 08:19
e70b01c to
c8d3b9a
Compare
…ffice-core into SWAP-5403-links
jekabs-karklins
approved these changes
Jun 29, 2026
shivoomiess
enabled auto-merge (squash)
June 30, 2026 08:06
shivoomiess
disabled auto-merge
June 30, 2026 08:07
shivoomiess
enabled auto-merge (squash)
June 30, 2026 08:52
shivoomiess
disabled auto-merge
June 30, 2026 08:52
shivoomiess
enabled auto-merge (squash)
June 30, 2026 08:53
yoganandaness
requested changes
Jul 1, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds role-aware deep links from table cells (Experiments and Proposals views) to improve navigation to related entities (proposal modal, PI user page, Calls/Instruments lists, FAP page), while keeping access control aligned with the currently selected role.
Changes:
- Introduces a reusable
RoleBasedLinkcomponent to conditionally render router links based on the active role. - Updates Experiments and Proposals officer tables to render linked values (proposal id, PI, call, instruments, FAPs).
- Extends proposals GraphQL query to include PI
idneeded for People-page navigation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/frontend/src/utils/fromArrayToCommaSeparatedLinks.tsx | New helper to render comma-separated lists as role-based links. |
| apps/frontend/src/graphql/proposal/getProposalsCore.graphql | Fetches PI id to support People-page links. |
| apps/frontend/src/components/proposal/ProposalTableOfficer.tsx | Adds links for PI/Call/Instruments/FAP and adds “return-to-origin” behavior when closing proposal modal. |
| apps/frontend/src/components/experiment/ExperimentsTable.tsx | Renders Proposal ID as a role-based link into the proposal review modal and carries from for navigation back. |
| apps/frontend/src/components/common/RoleBasedLink.tsx | New role-aware link component combining MUI Link styling with react-router navigation. |
yoganandaness
self-requested a review
July 20, 2026 09:32
yoganandaness
approved these changes
Jul 20, 2026
yoganandaness
requested review from
zacharyjhankin
and removed request for
zacharyjhankin
July 20, 2026 09:33
Contributor
|
I have merged this accidentally with both the approvals from ESS side. Requesting you to review as well, if in case you have any concern. Thanks. |
Contributor
|
Looks good to me sorry we didnt approve earlier! Only comment is that on the |
Collaborator
|
Looks like a good change to me |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduces links to user, proposal, and FAP from the Experiments and Proposals tables.
Motivation and Context
This modification is required to enhance navigation and user experience by allowing users to navigate directly to related pages (user, proposal, FAP) from the Experiments and Proposals tables.
Changes
RoleBasedLinkthat renders links based on user roles.ExperimentsTable.tsx, added links to the proposal ID.ProposalTableOfficer.tsx, added links to Principal Investigator, Call, Instrument, and FAP fields.How Has This Been Tested?
Fixes Jira Issue
https://jira.ess.eu//browse/SWAP-5403
Depends On
Tests included/Docs Updated?