Skip to content

fix(topics): hide zero KPI delta - #410

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
prakashiitp:fix/kpi-hide-zero-delta
Jul 12, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
prakashiitp:fix/kpi-hide-zero-delta

Conversation

@prakashiitp

Copy link
Copy Markdown
Contributor

Summary

  • Hide the KPI delta when change === 0.
  • Preserve the existing behavior for positive and negative deltas by only rendering the delta for non-zero values.
  • This removes the unnecessary 0pts / 0 display on KPI cards.

Related issue

Closes #360

Type of change

  • fix — Bug fix

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/)
  • Commits follow Conventional Commits
  • yarn lint passes (couldn't run locally)
  • yarn typecheck passes (couldn't run locally)
  • yarn format:check passes (couldn't run locally)
  • Changes are focused — one concern per PR

Note

I wasn't able to run the project locally due to environment setup constraints. The change is limited to the conditional rendering logic described in the issue.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.

In the meantime, two things that make review faster:

  • A short description of why the change matters, not just what it does — most of our PRs link a Fixes #... to the issue that explains the why.
  • A quick local test note if there's anything worth eyeballing in the browser.

If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Exactly the fix #360 asked for — zero deltas no longer render, and positive/negative deltas keep their arrow/sign/color behavior. I approved the first-contributor CI run and everything is green (format, lint, typecheck); prettier on the changed file checks out too, so no worries about not being able to run it locally. Thanks for the contribution!

@gkhngyk
gkhngyk merged commit 48f78da into ansvisor:main Jul 12, 2026
4 checks passed
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.

fix(topics): KPI card shows a bare "0pts" delta when the change is 0

2 participants