Skip to content

fix: correct spacing between risk value and package name in activity stream#691

Open
gauravshinde1729 wants to merge 1 commit intol3montree-dev:mainfrom
gauravshinde1729:fix/activity-stream-broken-events
Open

fix: correct spacing between risk value and package name in activity stream#691
gauravshinde1729 wants to merge 1 commit intol3montree-dev:mainfrom
gauravshinde1729:fix/activity-stream-broken-events

Conversation

@gauravshinde1729
Copy link
Copy Markdown

Summary

Fixes #1818 (UI side) — two rendering issues in the activity stream for
detected dependency vulnerability events:

  1. "in" was visually attached to the risk value with no space
    (e.g. "with a risk of 1.51in [icon]") because the leading space
    inside {" in "} was being stripped by the browser's inline-flex rendering.

  2. Trailing space in eventTypeMessages for the "detected" case was
    being collapsed before the inline-flex element.

Changes

  • src/components/VulnEventItem.tsx — moved {" in "} outside the
    inline-flex span into a fragment so it renders as a regular text
    node with proper spacing.
  • src/utils/view.ts — removed the trailing " " from the detected
    case in eventTypeMessages since spacing is now handled by the
    {" in "} text node in the component.

Testing

  • Navigate to any asset's Events page after running a dependency scan
  • Detected events should render as:
    System detected CVE-XXXX-XXXX with a risk of 7.5 in [ecosystem icon] package@version

Result:

image

…stream

Signed-off-by: gauravshinde1729 <shindegauravpict@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant