Skip to content
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

[ENH] Made dataset name hyperlink to dataset PortalURI #411

Merged
merged 7 commits into from
Dec 20, 2024
Merged

Conversation

rmanaem
Copy link
Contributor

@rmanaem rmanaem commented Dec 19, 2024

NOTE: If this pull request is to be released, the release label must be applied once the review process is done to avoid the local and remote from going out of sync as a consequence of the bump version workflow run

Checklist

This section is for the PR reviewer

  • PR has an interpretable title with a prefix ([ENH], [FIX], [REF], [TST], [CI], [MNT], [INF], [MODEL], [DOC]) (see our Contributing Guidelines for more info)
  • PR has a label for the release changelog or skip-release (to be applied by maintainers only)
  • PR links to GitHub issue with mention Closes #XXXX
  • Tests pass
  • Checks pass
  • If the PR changes the participant-level and/or the dataset-level result file, the query-tool-results files in the neurobagel_examples repo have been regenerated

For new features:

  • Tests have been added

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

Copy link

sourcery-ai bot commented Dec 19, 2024

Reviewer's Guide by Sourcery

This PR adds functionality to make dataset names clickable by converting them into hyperlinks that point to their respective portal URIs. The implementation modifies the ResultCard component to conditionally render either a hyperlinked or plain text version of the dataset name based on the availability of a portal URI.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added hyperlink functionality to dataset names in the results view
  • Added new datasetPortalURI prop to ResultCard component
  • Implemented conditional rendering to display dataset name as a hyperlink when portal URI is available
  • Added target='_blank' and rel='noopener noreferrer' for secure external link handling
  • Updated ResultContainer to pass dataset_portal_uri to ResultCard component
src/components/ResultCard.tsx
src/components/ResultContainer.tsx

Assessment against linked issues

Issue Objective Addressed Explanation
#404 Make dataset names clickable hyperlinks that link to their PortalURIs

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@rmanaem rmanaem added the pr-patch Incremental feature improvement, will increment patch version when merged (0.0.+1) label Dec 19, 2024
Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for neurobagel-query ready!

Name Link
🔨 Latest commit e25159e
🔍 Latest deploy log https://app.netlify.com/sites/neurobagel-query/deploys/6765cb984f490a0008739d69
😎 Deploy Preview https://deploy-preview-411--neurobagel-query.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@surchs surchs self-requested a review December 19, 2024 21:35
Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

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

Code looks good, thanks for the feature @rmanaem!

One minor thing: the default blue link color sticks out a little. Mind giving the link a color that matches your nice color theme a bit closer?

With that 🧑‍🍳

@rmanaem rmanaem merged commit 96c027f into main Dec 20, 2024
12 checks passed
@rmanaem rmanaem deleted the enh-404 branch December 20, 2024 19:58
Copy link
Contributor

🚀 PR was released in v0.8.1 🚀

@neurobagel-bot neurobagel-bot bot added the released This issue/pull request has been released. label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-patch Incremental feature improvement, will increment patch version when merged (0.0.+1) released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make dataset names hyperlinks to dataset PortalURIs
2 participants