Skip to content

chore: update findable-ui packages to latest version v35.0.3 (#571) #573

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

frano-m
Copy link
Contributor

@frano-m frano-m commented Jun 4, 2025

Closes #571.

This pull request includes updates to improve URL handling, upgrade dependencies, and enhance application configuration by adding a new provider. The most important changes are summarized below:

URL Handling Improvements:

  • Simplified the createFilterUrl function in NodeDetails.tsx to return a string URL with query parameters directly, instead of an object with href and query properties. ([app/components/Home/components/Section/components/SectionViz/NodeDetails.tsxL83-R84](https://github.com/galaxyproject/brc-analytics/pull/573/files#diff-2e793d58df5d8af3f0190b86a6d41864fa1d86510b38a3cab72bc60f344ceb98L83-R84))

Dependency Updates:

  • Upgraded the @databiosphere/findable-ui dependency from version ^34.1.0 to ^35.0.3 in package.json. ([package.jsonL25-R25](https://github.com/galaxyproject/brc-analytics/pull/573/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L25-R25))

Application Configuration Enhancements:

  • Added the ServicesProvider import in pages/_app.tsx to integrate service-related context into the application. ([pages/_app.tsxR24](https://github.com/galaxyproject/brc-analytics/pull/573/files#diff-a9827ce1be32c607c948881a89b99c592f752898f9c49e0dea0b7199eb151029R24))
  • Wrapped the application with the ServicesProvider in the MyApp component to enable service context usage throughout the app. ([[1]](https://github.com/galaxyproject/brc-analytics/pull/573/files#diff-a9827ce1be32c607c948881a89b99c592f752898f9c49e0dea0b7199eb151029R67), [[2]](https://github.com/galaxyproject/brc-analytics/pull/573/files#diff-a9827ce1be32c607c948881a89b99c592f752898f9c49e0dea0b7199eb151029R101))

Copy link
Contributor

@Copilot 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 PR updates the Findable UI dependency, simplifies URL handling in a component, and integrates a new service context provider into the application.

  • Simplified createFilterUrl to return a string with encoded query parameters.
  • Bumped @databiosphere/findable-ui from ^34.1.0 to ^35.0.3.
  • Added and wrapped the app with ServicesProvider in pages/_app.tsx.

Reviewed Changes

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

File Description
pages/_app.tsx Imported and wrapped application in ServicesProvider
package.json Upgraded @databiosphere/findable-ui version
app/components/.../SectionViz/NodeDetails.tsx Simplified URL creation to return a single string
Comments suppressed due to low confidence (4)

pages/_app.tsx:67

  • Consider adding a test to verify that components within ServicesProvider receive the expected service context, ensuring this new provider integration works as intended.
<ServicesProvider>

app/components/Home/components/Section/components/SectionViz/NodeDetails.tsx:83

  • [nitpick] The comment could be more descriptive; for example, Return a URL string with the encoded filter query parameter.
// Return the link with query params.

pages/_app.tsx:67

  • [nitpick] The indentation of the <ServicesProvider> opening tag is inconsistent with its sibling providers. Align it to the same indent level (12 spaces) as <SystemStatusProvider> to match project style.
<ServicesProvider>

pages/_app.tsx:101

  • [nitpick] The closing </ServicesProvider> tag should use the same indent level as its opening tag and sibling providers to maintain consistent formatting.
</ServicesProvider>

query: encodeURIComponent(JSON.stringify({ filter })),
};
// Return the link with query params.
return `/data/assemblies?filter=${encodeURIComponent(JSON.stringify(filter))}`;
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using URLSearchParams for clearer query-string construction, e.g.: const params = new URLSearchParams({ filter: JSON.stringify(filter) }); return /data/assemblies?${params};

Suggested change
return `/data/assemblies?filter=${encodeURIComponent(JSON.stringify(filter))}`;
const params = new URLSearchParams({ filter: JSON.stringify(filter) });
return `/data/assemblies?${params.toString()}`;

Copilot uses AI. Check for mistakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@frano-m frano-m force-pushed the fran/571-findable-ui branch from ee9a64f to 1b00186 Compare June 4, 2025 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready for Review
Development

Successfully merging this pull request may close these issues.

Update findable-ui packages to latest version v35.0.3
2 participants