-
Notifications
You must be signed in to change notification settings - Fork 49
fix: allow return in case evidence was opened in new tab #2013
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
Conversation
❌ Deploy Preview for kleros-v2-university failed. Why did it fail? →
|
✅ Deploy Preview for kleros-v2-testnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughThe updates modify how route and query parameters are handled for evidence attachment links and navigation. The Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant EvidenceCard
participant Policies
participant Header
participant Router
User->>EvidenceCard: Clicks attachment link
EvidenceCard->>Router: Navigate with disputeId, title, url
User->>Policies: Clicks attachment or policy link
Policies->>Router: Navigate with disputeId, title, url
User->>Header: Clicks return button
Header->>Router: Navigate based on title and disputeId query params
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (15)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for kleros-v2-testnet-devtools ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
web/src/components/EvidenceCard.tsx
(3 hunks)web/src/pages/AttachmentDisplay/Header.tsx
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (15)
- GitHub Check: contracts-testing
- GitHub Check: Redirect rules - kleros-v2-neo
- GitHub Check: Redirect rules - kleros-v2-university
- GitHub Check: Redirect rules - kleros-v2-testnet
- GitHub Check: Redirect rules - kleros-v2-testnet
- GitHub Check: Analyze (javascript)
- GitHub Check: SonarCloud
- GitHub Check: Header rules - kleros-v2-neo
- GitHub Check: Header rules - kleros-v2-university
- GitHub Check: Header rules - kleros-v2-testnet
- GitHub Check: Header rules - kleros-v2-testnet
- GitHub Check: Pages changed - kleros-v2-neo
- GitHub Check: Pages changed - kleros-v2-university
- GitHub Check: Pages changed - kleros-v2-testnet
- GitHub Check: Pages changed - kleros-v2-testnet
🔇 Additional comments (5)
web/src/components/EvidenceCard.tsx (3)
6-6
: LGTM: Import addition is appropriate.The
useParams
hook import is correctly added to extract route parameters for the dispute ID.
228-228
: LGTM: Route parameter extraction is correct.Extracting the
id
parameter from the route is the appropriate way to get the dispute identifier for passing to the attachment link.
263-263
: LGTM: Query parameter addition enables proper return navigation.Adding the
disputeId
query parameter to the attachment URL ensures that the attachment page has the necessary context to navigate back to the correct evidence page, even when opened in a new tab.web/src/pages/AttachmentDisplay/Header.tsx (2)
4-4
: LGTM: Import addition is appropriate.Adding
useSearchParams
to the import is correct for accessing URL query parameters.
69-70
: LGTM: Search parameter extraction is correct.Properly extracting the
disputeId
from search parameters to use for navigation.
Code Climate has analyzed commit dde0dc7 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
|
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.
lgtm
PR-Codex overview
This PR focuses on enhancing the handling of evidence and policy attachments by incorporating
disputeId
into the URLs and improving navigation based on attachment titles.Detailed summary
useParams
to retrieveid
inEvidenceCard
,Policies
, andHeader
components.StyledInternalLink
inEvidenceCard
to includedisputeId
in the URL.Header
to direct users based onattachmentTitle
.StyledInternalLink
inPolicies
to includedisputeId
for policy attachments.Summary by CodeRabbit