fix: evidence links display#232
Merged
Merged
Conversation
fix: evidence table spacing Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Evidence detail view to improve how linked back-matter resources are displayed, especially for text-based media, and tweaks Evidence list table spacing.
Changes:
- Add an expand/collapse UI to render inline previews for text/*, JSON, and YAML back-matter resources in
ViewView.vue. - Extend
ViewViewunit tests to cover expanding/collapsing and JSON/YAML rendering. - Adjust column/padding widths in
EvidenceList.vueto improve table spacing.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/views/evidence/ViewView.vue | Adds expandable inline rendering for text-based media resources and tracks expanded state per resource. |
| src/views/evidence/tests/ViewView.spec.ts | Adds fixture resources + tests for expanding/collapsing and rendering text/JSON/YAML media. |
| src/components/EvidenceList.vue | Adjusts column width and cell padding to improve list spacing/alignment. |
Comments suppressed due to low confidence (1)
src/views/evidence/ViewView.vue:390
- The download link is rendered even when the resource has no
base64payload (e.g., resources that only providerlinks). In those cases the generated data URL becomesdata:undefined;base64,undefined, producing a broken/invalid download target. Consider only rendering the download anchor whenmedia.base64?.value(and ideallymedia.base64?.mediaType) is present, and handlingrlinksseparately (e.g., safe external link).
<span>{{ media.title || media.uuid }}</span>
<a
:download="media.title || media.uuid"
:href="`data:${media.base64?.mediaType};base64,${media.base64?.value}`"
>
<BIconDownload />
</a>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
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.
fix: evidence table spacing