-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
feat(standardized form data): keep all columns and metrics #20377
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20377 +/- ##
=======================================
Coverage 66.74% 66.74%
=======================================
Files 1739 1740 +1
Lines 65130 65165 +35
Branches 6898 6905 +7
=======================================
+ Hits 43472 43496 +24
- Misses 19908 19920 +12
+ Partials 1750 1749 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thanks for the improvement, love how it works with the new viz switcher! Screen.Recording.2022-06-14.at.16.00.02.mov |
df92c9b
to
09adc06
Compare
/testenv up |
@kgabryje Thanks review! I have rebased the latest master and fix the bug. please review again. |
@zhaoyongjie Ephemeral environment spinning up at http://35.90.43.169:8080. Credentials are |
@zhaoyongjie Tested again. It looks like Dimensions are not kept when I do Another example of flow working as expected: So it looks like dimensions are kept in target chart only if previous chart also had dimensions control. Screen.Recording.2022-06-15.at.13.43.40.mov |
Yes, this is the current workflow. I explain it as follows:
Right now, the Standardized Form Data doesn't provide a mechanism to "skip" a chart when do transformation. |
I see your point! I'm still a bit afraid that this flow might be confusing for the end user who doesn't know how the feature works under the hood. I think more intuitive flow would be to keep controls in standardized form data and reset it only when user runs query. Like for example, if we saved dimensions in standardized form data while on line chart, they should still be there when user switches to big number, so they can carry over to next viz types. Only after user runs big number query the dimensions would get reset. |
Thanks for the review. I have some different views.
If we discard the unqueried charts, this will affect the consistency of the analysis. for example
if we discard the |
Ah no, I don't want to discard big number form data, sorry for not writing that clearer. I only don't want to reset the controls that are not present in big number. |
I think an ideal flow might look something like: |
The matter up for discussion is "should switching to Big Number (for example) reset the Dimensions in standardized form data". Big number doesn't have Dimensions control, while Line, Bar, Pie etc. do. So we need to decide what happens when we set open line chart, set a Dimension, then switch to Big Number, then switch to Bar. Should Bar chart have Dimension control populated with value set in Line chart, or should it be reset since the previous viz didn't have that control. |
Thanks for distilling this discussion... There might be a good reason not to do this (some danger I'm not clear on) but my gut feeling is this: • All data that's modified or appended to the standardized controls should be persisted. You may switch to another viz that doesn't use it, but it should remain in memory/state. Then when you switch at any time to a viz looking for that control, it can be recalled. A field should not be disposed of until the chart is saved, and the ephemeral state is disposed of. • I think the current logic that already applies to other extraneous (non-standardized) controls (i.e. each chart type keeps its unique properties like a Pie/Donut's inner radius setting) is that that they are kept in that ephemeral state, and restored when returning to the Pie chart after any number of viz switches. Treating standardized controls the same way, so that they may always be restored, makes sense to me. In other words, is there any harm in keeping that extra/unused data (Dimensions, in our case) in the ephemeral state, in case some other chart type finds it useful? |
/testenv up |
@zhaoyongjie Ephemeral environment spinning up at http://34.220.198.64:8080. Credentials are |
I noticed 1 bug, not sure if it was there before. When we switch from Big number to Table, we get a validation error, even though metrics control is filled. Deleting and re-adding the metric fixes the problem. Screen.Recording.2022-06-17.at.16.57.55.mov |
big number sent a query, then form_data should follow big_numer's form_data. this means you want show a data layout is big_number, so dimension is lost.(the bignumber does not have dimension.) The |
I mean, table with metric added is correct form data, but the controls show errors (see video) |
@kgabryje Oh! I saw! Thanks for the heads up. this issue is also on the master branch. I will fix it in a separate PR. |
675e043
to
60bea97
Compare
/testenv up |
@zhaoyongjie Ephemeral environment spinning up at http://54.218.47.34:8080. Credentials are |
Hmm the behaviour of reverting metrics is a bit weird... I think it shouldn't be reverted to viz type's memorized data? But take metrics/dimensions from standardized data? Screen.Recording.2022-06-22.at.14.31.43.movScreen.Recording.2022-06-22.at.14.34.43.mov |
@kgabryje I think we've discussed this before. You don't have a query, so do a |
@kgabryje
|
99cddae
to
4589a1d
Compare
/testenv up |
@zhaoyongjie Ephemeral environment spinning up at http://54.213.166.15:8080. Credentials are |
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.
LGTM! Thank you for your patience and this awesome feature 😄
Ephemeral environment shutdown and build artifacts deleted. |
(cherry picked from commit bbbe102)
(cherry picked from commit bbbe102)
SUMMARY
This PR introduced a new mechanism base on the standardize form data. the metrics and columns will always keep its values until user remove it.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
viz.switch.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION