Skip to content

feat(dashboard): chart customization/dynamic group by in dashboards #33831

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

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

LevisNgigi
Copy link
Contributor

feat(dashboard): chart customization/dynamic group by in dashboards

SUMMARY

WIP

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link

korbit-ai bot commented Jun 19, 2025

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

Copy link

codecov bot commented Jun 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.88%. Comparing base (76d897e) to head (71323a6).
Report is 2007 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #33831       +/-   ##
===========================================
+ Coverage   60.48%   72.88%   +12.39%     
===========================================
  Files        1931      559     -1372     
  Lines       76236    40403    -35833     
  Branches     8568     4245     -4323     
===========================================
- Hits        46114    29449    -16665     
+ Misses      28017     9857    -18160     
+ Partials     2105     1097     -1008     
Flag Coverage Δ
hive 47.19% <100.00%> (-1.97%) ⬇️
javascript ?
mysql 71.87% <100.00%> (?)
postgres 71.94% <100.00%> (?)
presto 50.95% <100.00%> (-2.85%) ⬇️
python 72.85% <100.00%> (+9.34%) ⬆️
sqlite 71.45% <100.00%> (?)
unit 100.00% <ø> (+42.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


function getAffectedChartIdsFromCustomization(
chartCustomization: ChartCustomizationItem[],
state: any,
Copy link
Member

Choose a reason for hiding this comment

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

Curious if there is a better type definition that we can re-use for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes I will be fixing this.


const updateDashboard = makeApi<
Partial<DashboardInfo>,
{ result: Partial<DashboardInfo>; last_modified_time: number }
Copy link
Member

Choose a reason for hiding this comment

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

It seems this was defined before as well, can we dry up?

chartId: number;
}

const StyledGroupByCount = styled.div`
Copy link
Member

Choose a reason for hiding this comment

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

It seems like Ant Design might offer something like this that we can re-use with minimal style customizations if any at all?

const MIN_WIDTH = 880;
const MODAL_MARGIN = 16;

const StyledModalWrapper = styled(StyledModal)<{ expanded: boolean }>`
Copy link
Member

Choose a reason for hiding this comment

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

@LevisNgigi wasn't the plan to re-use the existing native filters modal and form instead of creating two separate components that almost do the same thing? Wouldn't composability help here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants