-
Notifications
You must be signed in to change notification settings - Fork 9
feat: make overview benchmark scores redirect to the actual widget #730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Efren Lim <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds click-to-navigate functionality to score items in the project overview tab, allowing users to click on benchmark scores to navigate directly to their corresponding widget pages.
- Added nuxt-link wrapper around score items to enable navigation
- Implemented logic to determine the appropriate widget area and route for each score
- Added query parameter support to preserve current state when navigating
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
const query = { | ||
...route.query, | ||
widget: widgetKebabCase.value // remove the widget from the query |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment is incorrect - the code is adding the widget to the query, not removing it.
widget: widgetKebabCase.value // remove the widget from the query | |
widget: widgetKebabCase.value // add the widget to the query |
Copilot uses AI. Check for mistakes.
if (selectedRepositoryGroup.value) { | ||
name = link.value.repoGroupRouteName; | ||
} | ||
else if(repoName.value) { |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after 'if' keyword. Should be 'else if (repoName.value)' for consistent code formatting.
else if(repoName.value) { | |
else if (repoName.value) { |
Copilot uses AI. Check for mistakes.
const widgetKebabCase = computed( | ||
() => props.widgetKey ? | ||
props.widgetKey.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase() as Widget : undefined | ||
); |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type assertion 'as Widget' is unsafe here. The kebab-case string transformation doesn't guarantee the result will be a valid Widget type. Consider using proper type validation or a mapping function instead.
const widgetKebabCase = computed( | |
() => props.widgetKey ? | |
props.widgetKey.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase() as Widget : undefined | |
); | |
const validWidgetKeys = Object.values(lfxWidgets).map(w => w.key); | |
const widgetKebabCase = computed(() => { | |
if (!props.widgetKey) return undefined; | |
const kebabKey = props.widgetKey.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); | |
return validWidgetKeys.includes(kebabKey) ? kebabKey : undefined; | |
}); |
Copilot uses AI. Check for mistakes.
In this PR
Added the nuxt link to the score item in the overview tab that links to their respective widget
Ticket
IN-669