feat: Gene Page#682
Open
bencap wants to merge 4 commits into
Open
Conversation
- Add an `inline-link` named slot that, when present, renders a separate left-aligned section alongside the toggle button, allowing an inline link to coexist with the collapsible header - Add `buttonLabel` prop to set an accessible `aria-label` on the toggle button for improved screen-reader support
…nent New reusable component for displaying a service/fetch error state with a customizable title, description, optional retry button, and a "Back to home" fallback link.
- Add `/genes/:symbol` route and `GeneView` screen component that
displays gene facts (identifiers, taxonomy, aliases) and all
published score sets grouped by experiment
- Add `src/api/mavedb/genes.ts` client for the new `/genes/{symbol}`
API endpoint with paginated score-set support
- Add `src/lib/genes.ts` helpers for formatting gene facts, grouping
score sets by experiment, and classifying API errors
- Add `src/lib/target-genes.test.ts` and `src/lib/genes.test.ts`
unit tests covering the new utility functions
- Extend `src/schema/openapi.d.ts` with `GeneResponse` and related
schemas
…e page - Make target gene pills in `MvScoreSetRow` link to `/genes/:symbol` when a mapped HGNC name is available, using the new `getTargetGeneLinkItems` helper - Add `showMultiTargetPill` prop to `MvScoreSetRow` to optionally surface a "multi-target" badge - Wire `MvTargetsAccordion` collapsible headers to use the new `inline-link` slot so gene names link to the gene detail page - Add accessible `buttonLabel` to each collapsible toggle - Harden `MvTargetGeneDetails` clipboard copy to handle missing `navigator.clipboard` and catch write errors, showing a "Copy failed" state - Add `getTargetGeneRoute` and `getTargetGeneLinkItems` helpers to `src/lib/target-genes.ts`
5 tasks
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.
This pull request introduces several improvements to gene-related UI components and API integration, focusing on enhanced accessibility, better user experience, and improved code organization. Key changes include the addition of a new gene API endpoint, improved gene linking and display in score set rows, better accessibility and customization for collapsible panels, and enhanced feedback for gene sequence copying actions.
Gene Page
/genes/{symbol}.Gene API Integration:
getGeneAPI function insrc/api/mavedb/genes.tsfor fetching gene data, and exported it for use in the app. [1] [2]Score Set Row Enhancements:
MvScoreSetRow.vueto display gene targets as links when available, show a "multi-target" pill when appropriate, and refactored computed properties for gene display. [1] [2] [3] [4] [5]Collapsible Panel Accessibility & Customization:
MvCollapsible.vueto support aninline-linkslot for prominent gene links, added abuttonLabelprop for improved accessibility, and adjusted rendering logic accordingly. [1] [2] [3] [4]Gene Details & Copy Feedback:
New Service Unavailable Component:
MvServiceUnavailable.vuecomponent for consistent handling of service outage messages, including optional retry and navigation actions.