-
Notifications
You must be signed in to change notification settings - Fork 5
chore: update findable-ui to latest v38.0.0 (#4528) #4532
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
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 PR updates the UI dependency, refactors how summary data is mapped, and enhances entity configurations with new UI options and slot replacements.
- Refactored summary logic by removing the old
Summaries
component and introducingmapSummary
with updated view builders. - Upgraded
@databiosphere/findable-ui
to v38.x and added@tanstack/react-virtual
to ESM packages. - Added
ui
flags (enableTabs
,enableExportButton
,enableSummary
) and replaced hero/list components with slot-based APIs across multiple entity configs.
Reviewed Changes
Copilot reviewed 41 out of 42 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
site-config/**/index/summaryViewModelBuilder.ts | Replaced getSummaries → mapSummary , removed React/Summaries references, updated return type. |
app/components/Index/common/indexTransformer.ts | Renamed getSummaries → mapSummary , changed return from object[] to [string, string][] . |
site-config/**/index/*EntityConfig.ts | Added ui sections with enableTabs , enableExportButton , enableSummary , and slot props. |
package.json | Bumped @databiosphere/findable-ui to ^38.1.0 , added @tanstack/react-virtual . |
next.config.mjs | Included @tanstack/react-virtual in ESM_PACKAGES . |
Comments suppressed due to low confidence (1)
package.json:35
- The PR title and description refer to upgrading to v38.0.0, but
package.json
uses^38.1.0
. Consider aligning the documented target version and the actual dependency spec to avoid confusion.
"@databiosphere/findable-ui": "^38.1.0",
|
||
// Get each summary span's inner text. | ||
const innerTexts = await summaryLocator | ||
.locator(MUI_CLASSES.TYPOGRAPHY) // Retrieves the count and label and omits the dot separator. |
Copilot
AI
Jul 9, 2025
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.
[nitpick] Relying on the generic .MuiTypography-root
selector can make tests brittle if other typography elements are added. Consider adding or using a dedicated data-testid
on the summary items to target them more reliably.
.locator(MUI_CLASSES.TYPOGRAPHY) // Retrieves the count and label and omits the dot separator. | |
.getByTestId(TEST_IDS.SUMMARY_ITEM) // Retrieves the count and label and omits the dot separator. |
Copilot uses AI. Check for mistakes.
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.
Leaving it as, for now.
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.
Nice work @frano-m ! 🚀 🚀 🚀 🚀 🚀 🚀 🚀
Ticket
Closes #4528.
Reviewers
@NoopDog.
This pull request introduces a series of updates to improve the functionality, readability, and maintainability of the codebase, particularly focusing on the data export workflow, entity configurations, and dependencies. The most significant changes include refactoring entity configurations for better UI support, updating test cases to enhance clarity and reliability, and upgrading dependencies for improved performance and compatibility.
Refactoring and UI Enhancements:
activitiesEntityConfig.ts
,biosamplesEntityConfig.ts
,datasetsEntityConfig.ts
,donorsEntityConfig.ts
,filesEntityConfig.ts
) to replacelistView
withui
configurations that include support for tabs, export buttons, and summary features. This change improves modularity and enables more consistent UI behavior. [1] [2] [3] [4] [5]ui: { enableTabs: true }
. [1] [2] [3]Test Case Improvements:
testIndexExportSummary
function with a more detailed and robust test implementation inanvil-index-export-button.spec.ts
. The new test verifies that summary labels and counts match between the index and export pages, improving test reliability and clarity. [1] [2]urlOrPredicate
,waitForTestId
) to streamline test logic and provide better abstraction for common operations.Dependency Updates:
@databiosphere/findable-ui
to version^38.1.0
and added@tanstack/react-virtual
as a new dependency to enhance virtualized rendering capabilities. [1] [2]next.config.mjs
to include@tanstack/react-virtual
.Code Cleanup:
getSummaries
function withmapSummary
inindexTransformer.ts
to return key-value pairs instead of objects, improving data structure consistency.Miscellaneous Updates:
explorerTitle
from configuration files where it was no longer needed, aligning with the updated UI design. [1] [2]anvil-cmg/dev/config.ts
to usebuildSummaries
for mapping API responses, enhancing modularity.