No table option#169
Merged
Merged
Conversation
… table consumers. Register protvista-uniprot-datatable explicitly to prevent tree-shaking.
…empty-data; small type updates.
5 tasks
Swaathik
approved these changes
May 14, 2026
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.
Purpose
Adapt
<protvista-uniprot-structure>for an external React consumer to render its own data.Approach
<protvista-uniprot-structure>:no-table/noTable— the component no longer renders its internal<protvista-uniprot-datatable>, loader, or empty-state message.selected-id/selectedId— reactive property that drives the viewer; defaults to the first row only if the consumer hasn't pre-set it.structures-loadedevent (CustomEvent<ReadonlyArray<ProcessedStructureData>>,bubbles + composed) — fires once after fetch resolution, withdetail: []when nothing was found.ProcessedStructureDatais now exported from the package root, with the renderedisoform: TemplateResultfield replaced by rawisoformId/isoformIsCanonical(the<a>is built inside the column renderer).willUpdatehook: whenselectedIdordatachanges the viewer either applies the matching row or clears its state, so stale selections don't linger.protvista-uniprot-datatableis explicitly registered + default-exported so it survives tree-shaking when consumers only import the structure component.IsoformIdSequencewas typed as a single-element tuple, corrected to a real array.notooltipfield declaration onProtvistaUniprot(already in the reactive-properties bag).Testing
protvista-uniprot-structure-empty.spec.tsfor the case of empty payloadsVisual changes
None, new behavior is opt-in via
no-table.Breaking changes
ProcessedStructureData.isoform(aTemplateResult) is removed in favour ofisoformId: string+isoformIsCanonical: boolean. The type was not previously exported, so no external consumers are affected; internal callers ofprocessAFDatano longer need to passaccession.structures-loadedevent now fires on empty results withdetail: []. This is a new behavior, no prior contract to breakChecklist