Skip to content

Conversation

@timdiels1
Copy link

The BasePartitionMetric.vue is different then the one shipped from nova itself. So when using this package, the layout is changed. Revert template back to original and let users overwrite when needed.

@anderly anderly requested a review from Copilot October 9, 2025 13:54
Copy link

Copilot AI left a 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 updates the BasePartitionMetric component template to align with Nova 5's original template design, reverting custom modifications that were causing layout inconsistencies when using this package.

  • Adds legends-height prop to control legend container height behavior
  • Updates chart positioning from absolute to flexbox layout
  • Reverts chart styling to match Nova 5's original implementation

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
LinkablePartitionMetric.vue Passes new legends-height prop to base component
BasePartitionMetric.vue Major template restructure to match Nova 5 original with flexbox layout and conditional height controls

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

:class="chartClasses"
style="width: 90px; height: 90px; bottom: 30px; top: calc(50% + 15px)"
class="flex-none rounded-b-lg ct-chart mr-4 w-[90px] h-[90px]"
:class="{ invisible: this.currentTotal <= 0 }"
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove 'this.' prefix when referencing computed properties or data in templates. Vue templates automatically bind to the component context.

Suggested change
:class="{ invisible: this.currentTotal <= 0 }"
:class="{ invisible: currentTotal <= 0 }"

Copilot uses AI. Check for mistakes.
this.chartist = new Chartist.Pie(this.$refs.chart, this.formattedChartData, {
donut: true,
donutWidth: 10,
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The donutWidth variable is declared but then a hardcoded value of 10 is used in the configuration object. Either use the variable consistently or remove the unused variable declaration.

Suggested change
donutWidth: 10,
donutWidth: donutWidth,

Copilot uses AI. Check for mistakes.
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