-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
🎉 (admin) add indicator chart editor #3886
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @sophiamersmann and the rest of your teammates on Graphite |
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 ✅ Edited: 2024-08-21 11:53:23 UTC |
89f1b6f
to
3905b10
Compare
e9aa069
to
ddded8d
Compare
3905b10
to
caeefb7
Compare
c361c9d
to
29067f4
Compare
e4f5231
to
7fd998a
Compare
29067f4
to
582d094
Compare
undefined, | ||
"DELETE" | ||
) | ||
window.location.reload() |
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.
While talking about this in our dev meeting, I suddenly realized that I had left this criminal line in here! I'll replace it with an optimistic update in the next few days... :)
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.
this seems to still be here :)
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 moved to #3793
Hey @sophiamersmann, the Github Pull Requests Vs code extension mis-attributed the above review to this PR instead of the one below. I hope this doesn't cause any issues on your side - the things going wrong that I described apply to the PR one level down already and should be fixed there. I'll now review this PR. |
I'll move your comment to the other PR then, so that it doesn't get too confusing. |
7fd998a
to
cffbb09
Compare
582d094
to
9fb6caf
Compare
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.
Looks good! The FieldsRow on the variables page that shows the two partial configs next to each other could benefit from an aling-items: top
instead of center imho as the two boxes seem unbalanced in the example I looked at.
I'm a little concerned about the perf of the queries to get all charts for an indciator since it joins on a view - but we can go ahead like this and monitor the perf and change it in a subequent pr if it is a problem.
FROM charts c | ||
JOIN chart_configs cc ON cc.id = c.configId | ||
JOIN chart_dimensions cd ON cd.chartId = c.id | ||
LEFT JOIN charts_x_parents cxp ON c.id = cxp.chartId |
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.
This join is probably fine but ideally we'd have an eye on performance. Since this joins on a view I'm not sure if it can make use of an index - I think it has to do a full table scan.
Maybe charts_x_parents should be a proper table maintained with triggers instead. I've asked Lars and Mojmir if we have any kind or perf metrics about slow queries on prod mysql. We probably don't have to tackle this as part of this PR though.
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.
Good point! I just checked where this query is used, and at the moment, this particular query is only used once in the indicator chart admin to compile a list of charts that inherit from that indicator. So, it's not a very critical path. Let's move forward then and come back to it when we need to :)
undefined, | ||
"DELETE" | ||
) | ||
window.location.reload() |
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.
this seems to still be here :)
cffbb09
to
e6093e9
Compare
9fb6caf
to
ec770cf
Compare
e6093e9
to
288f511
Compare
ec770cf
to
bec18e8
Compare
eff6e94
to
949f3f1
Compare
4250978
to
4aba1f2
Compare
Looks great! I found one little thing still:
|
4aba1f2
to
73d29e8
Compare
Changes are folded into its parent, #3793 |
Adds an editor for indicator-level chart configs.
Details
dimensions
field can't be edited (since it can't be inherited)/variables/123456
) has a new "Partial Grapher config" section that shows the ETL and the admin version. It comes with edit/delete buttons for the admin-authored config.We should probably also add a few more tests for the new
grapherConfigAdmin
APIs, but I ran out of time :(Knitted with a hot needle!