fix(1672): extracted cvss-badge and branch / artifact selection from public urls#641
fix(1672): extracted cvss-badge and branch / artifact selection from public urls#641juliankepka wants to merge 7 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request extracts the CVSS badge and branch/artifact selection functionality from the collapsible "Public URLs" section into a more visible, always-displayed position in the asset vulnerability management form. The refactoring improves user experience by making these important controls more accessible.
Changes:
- Extracted CVSS badge display and artifact/branch selection into a new
ArtifactInputCVSSBadgecomponent - Improved input truncation and button layout in
InputWithButtoncomponent with better flex properties - Updated package-lock.json with automatic dependency resolution changes
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/components/ui/input-with-button.tsx | Enhanced input and button layout with better flex properties to prevent overflow issues |
| src/components/asset/asset-form/AssetFormVulnsManagement.tsx | Refactored to extract CVSS badge and artifact selection into a separate component, moving it from collapsible section to always-visible area |
| package-lock.json | Automatic dependency resolution updates marking/unmarking peer dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { ArtifactDTO, AssetVersionDTO } from "@/types/api/api"; | ||
| import { | ||
| ClipboardDocumentIcon, | ||
| ClipboardDocumentCheckIcon, |
There was a problem hiding this comment.
The imported ClipboardDocumentCheckIcon is not used in this file. Consider removing this unused import to keep the code clean.
| ClipboardDocumentCheckIcon, |
| value={selectedVersionSlug} | ||
| onValueChange={setSelectedVersionSlug} | ||
| > | ||
| <SelectTrigger className="bg-muted/50 outline outline-1 outline-white-200 cursor-pointer"> |
There was a problem hiding this comment.
The CSS class outline-white-200 is not a standard Tailwind CSS color. Tailwind CSS does not have a white-200 color in its default palette. This should likely be changed to a valid color like outline-border, outline-gray-200, or another existing Tailwind color. Using an invalid class name will result in no styling being applied.
| onValueChange={setSelectedArtifact} | ||
| disabled={!selectedVersionSlug || !artifacts?.length} | ||
| > | ||
| <SelectTrigger className="bg-muted/50 outline outline-1 outline-white-200/30 cursor-pointer"> |
There was a problem hiding this comment.
The CSS class outline-white-200/30 is not a standard Tailwind CSS color. Tailwind CSS does not have a white-200 color in its default palette. This should likely be changed to a valid color like outline-border/30, outline-gray-200/30, or another existing Tailwind color. Using an invalid class name will result in no styling being applied.
| <Alert variant="default"> | ||
| <AlertTriangle className="h-4 w-4" /> | ||
| <AlertDescription>{purlValidation.warning}</AlertDescription> | ||
| </Alert> |
There was a problem hiding this comment.
The Alert component is rendered inside a flex-row container (line 472), which may cause layout issues. Alert components are typically block-level elements that expect to span the full width. This placement in a horizontal flex container alongside the Select inputs will likely result in unexpected visual behavior. Consider wrapping the Alert in a separate container or changing the parent to flex-col with the Alert rendered outside the row of Select inputs.
| <Alert variant="default"> | |
| <AlertTriangle className="h-4 w-4" /> | |
| <AlertDescription>{purlValidation.warning}</AlertDescription> | |
| </Alert> | |
| <div className="w-full"> | |
| <Alert variant="default"> | |
| <AlertTriangle className="h-4 w-4" /> | |
| <AlertDescription>{purlValidation.warning}</AlertDescription> | |
| </Alert> | |
| </div> |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Julian Kepka <148074683+juliankepka@users.noreply.github.com>
Issue: l3montree-dev/devguard#1672