-
Notifications
You must be signed in to change notification settings - Fork 50
feat(6496): SQL graphing viewOptions: groupby tag keys #6502
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
Conversation
7393f54 to
c8fa90f
Compare
8a1594a to
fcbf912
Compare
… when graph subquery is loading.
…th the default groupby determined via the tagKeys in the schema
…n right hand panel.
hoorayimhelping
left a comment
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.
A couple of minor things, but all-in-all it looks good
| const setViewOptionsAll = useCallback( | ||
| (updatedOptions: Partial<ViewOptions>) => { | ||
| saveViewOptionsAll({...viewOptionsAll, ...updatedOptions}) |
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.
setViewsOptionAll and saveViewOptionsAll are really similarly named, and it takes a little bit of digging to understand the difference between the two. I can't think of any conventions around using set vs save - they're pretty interchangeable, so to avoid confusion, it might be worth calling this method saveViewOptionsAllMemoized to know that the only difference is this is memoized on viewOptionsAll
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.
I was going for set == "add to setting", and save == "save to local persistance". 🤷🏼
| 'dataExplorer.resultsOptions.default', | ||
| DEFAULT_VIEW_OPTIONS | ||
| ) | ||
| const setDefaultViewOptions = useCallback( |
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.
if you choose to name setViewOptionsAll as something like saveViewOptionsAllMemoized, this should also be updated to follow the same convention
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.
I'm hesitant to use the word memoized, as the definition is "to remember" -- and the ALL options is reset rather frequently (with every parent query run). Depending on the user flow, they could be memoizing the ALL (versus the DEFAULT) more or less often.
Will muse on another naming convention.
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.
See if this last commit added, helps to clarify.
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.
Also, here is some manual QA on the behavior for clear().
(Note: we really need to put in tests sometime soon-ish.)
Screen.Recording.2023-01-18.at.4.06.17.PM.mov
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.
Cool, works for me! Thanks for thinking about this critically!
eff939c to
84f4a8b
Compare
84f4a8b to
ce788ab
Compare
hoorayimhelping
left a comment
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.
Shipit!
abshierjoel
left a comment
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.
⚡🎸
* feat(6496): viewOptions to modify query by groupby tagKeys * fix(6496): Cannot run subquery if no bucket is selected. Show spinner when graph subquery is loading. * feat(6496): have groupby options be a based upon returned results, with the default groupby determined via the tagKeys in the schema * feat(6482): when choosing graph --> auto-open the Customize options in right hand panel. * chore(6496): use better naming conventions * feat(6496): make explicit what is persisted, and determine when it's cleared
Part of #6482
Closes #6496
Closes #6503
Add ability to groupby tagKeys (a.k.a. into dataSeries) for SQL queries being graphed.
Qx contract:
Viz evidence: How many queries?
Screen.Recording.2023-01-17.at.6.47.56.PM.mov
Viz Evidence: How groupby options chosen?
Screen.Recording.2023-01-18.at.1.36.20.PM.mov
Checklist