You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider adding an infobox to data explorer for grouped results #2054
If the user doesn't call ungroup, simply showing the results may be confusing. One option is to add an infobox for these cases.
I'm adding this to 1.12-polish. Let me play with the GMR implementation when @mlucy finishes his latest round of changes. I'll comment on this issue then to say if it's worth doing.
This shouldn't take more than a day to do, so @neumino should have plenty of time to finish it for 1.12 if we decide to get this in.
TL;DR: do nothing for now, I'll comment on this shortly.
I put a blue info box for the warning (it looks better than an alert) in case the user gets back a GROUPED_DATA.
The question now is what do we put in the warning.
From what I understood (correct me if I'm wrong), the point of the warning is to let people know that the type returned is not a DATUM even though we display it as a DATUM.
The main consequence being that any method chained after the query will be applied to each reduction, unless ungroup is called.
Should we phrase it as
"The returned result is a GROUPED_DATA. Any method chained after the current query will be applied on each reduction."
Ping @coffeemug, @mlucy -- any though on what the message should be?
If we don't mention GROUPED_DATA, it doesn't make sense to say that ungroup is going to convert the result to an array (since users already get back an array)
Would that be better?
Any command chained after group will be applied to each reduction. Add a call to ungroup if you want to execute a method on all the groups.
We should strive to make the presentation of the message strike the fleeting balance between being noticeable and unobtrusive. If we screw up the former, people will run into this problem and will get frustrated. If we screw up the latter, people will quickly get annoyed that we're telling them something they already know.
I think a link to the cookbook/troubleshooting entry on this in the message is pretty important. The message is great, but there is no way to fully remove all confusion unless you already know what's going on.
The warning appears when you get back a GROUPED_DATA (but not on the profile view).
If you close the warning, you will never see it again (as long as you use the same browser).
The text currently spawn over 2 lines, which I don't really like.
We can make the message tighter and have it not spill to multiple lines. Here is shorter, tighter text:
Commands chained after group will apply to each reduction. Call ungroup to execute commands on all the groups.
Also, a few more notes:
The original message interchanged the words "method" and "command". When we refer to ReQL commands we should always call them "commands" (in the docs, UI, etc.)
The little x to close the infobox seems too far left. It should be closer to the border.
The style of x when you mouse over it is odd. In the yellow box (say, when you delete a table and get a message that a table has been deleted), mousing over x results in it being bolder (which I like). Mousing over the x in the blue infobox here results in it being underlined. Also, the font styles for each x appear different. We should use a consistent style for both types of infoboxes.
Other than these comments, everything is awesome.
Also a question -- will this show up in the autocomplete docs after tabs/dots? (I don't think it's worth taking the time to do it, btw; I think this implementation is great)
@mlucy proposed the following message, which I like more (it seems both more precise and easier to understand):
Commands chained after group will operate on each reduction. Call ungroup to operate on the array of groups.
Also, after some thought, I don't like the fact that clicking the x will hide the message forever. It's far to easy to a) click it without reading the message, and b) read the message, click on the x, and then run a group query later completely forgetting about the message.
I'm not sure what the solution is. We could remove the x entirely (which I'd be ok with), or add a setting "remind me about groupings" or something. I think for now we should just force people to put up with this message and see what users think about it.
I'm personally don't really like the warning. It's intrusive in the sense that nothing bad can happen -- it's not like if the user can declare a machine dead.
For me it would be like if we were adding a warning every time the user was using reduce that would tell the user that this is not a fold.
So users have to be able to hide it.
I'll fix the style for now, but if we decide not to display it, I would be happy to delete my branch :-)
The update warning is different because if you hide it by clicking x, it will show up again on the next update. Clicking x doesn't turn it off permanently.
I see what you mean, though, with your fold analogy. May be a better alternative is to put it in gray text under the edit box? Or give it an entirely different style so it seems less obtrusive?
Let's talk to @mglukhovsky on Monday, I bet we'll come up with something that makes everyone reasonably happy.
There should be a way to collapse the infobox, not dismiss it. We also may
want to use the less obtrusive infobox style we've introduced into the web
UI.
I'd like to sit down with @neumino on Monday to come up with a clever
solution.
The update warning is different because if you hide it by clicking x, it
will show up again on the next update. Clicking x doesn't turn it off
permanently.
I see what you mean, though, with your fold analogy. May be a better
alternative is to put it in gray text under the edit box? Or give it an
entirely different style so it seems less obtrusive?
Reply to this email directly or view it on GitHubhttps://github.com//issues/2054#issuecomment-37078972
.
After talking with @mglukhovsky we switch from a warning after the execution of the query to a warning inside the description of a function.
The warning is inside a gray box so it easily catch the attention of the user.
Up in review 1303 assigned to @mglukhovsky
Branch michel_2054_embedded_warning
Activity
neumino commentedon Mar 7, 2014
I put a blue info box for the warning (it looks better than an alert) in case the user gets back a
GROUPED_DATA.The question now is what do we put in the warning.
From what I understood (correct me if I'm wrong), the point of the warning is to let people know that the type returned is not a DATUM even though we display it as a DATUM.
The main consequence being that any method chained after the query will be applied to each reduction, unless
ungroupis called.Should we phrase it as
"The returned result is a GROUPED_DATA. Any method chained after the current query will be applied on each reduction."
Ping @coffeemug, @mlucy -- any though on what the message should be?
coffeemug commentedon Mar 7, 2014
I wouldn't refer to
GROUPED_DATAsince people don't necessarily know what it is.Here is one possibility:
It would also be great to have a cookbook entry for this and add a link to it in the message.
neumino commentedon Mar 7, 2014
If we don't mention
GROUPED_DATA, it doesn't make sense to say thatungroupis going to convert the result to an array (since users already get back an array)Would that be better?
coffeemug commentedon Mar 7, 2014
Yes, that's much better!
neumino commentedon Mar 7, 2014
@mlucy any thought?
coffeemug commentedon Mar 7, 2014
Two more thoughts:
Add info box for GROUPED_DATA -- Related to #2054
Add info box for GROUPED_DATA -- Related to #2054
neumino commentedon Mar 7, 2014
Up in review 1298
Branch michel_2054_infobox
The warning appears when you get back a
GROUPED_DATA(but not on the profile view).If you close the warning, you will never see it again (as long as you use the same browser).
The text currently spawn over 2 lines, which I don't really like.
coffeemug commentedon Mar 7, 2014
Will check it out soon.
1 remaining item
coffeemug commentedon Mar 7, 2014
We can make the message tighter and have it not spill to multiple lines. Here is shorter, tighter text:
Also, a few more notes:
xto close the infobox seems too far left. It should be closer to the border.xwhen you mouse over it is odd. In the yellow box (say, when you delete a table and get a message that a table has been deleted), mousing overxresults in it being bolder (which I like). Mousing over thexin the blue infobox here results in it being underlined. Also, the font styles for eachxappear different. We should use a consistent style for both types of infoboxes.Other than these comments, everything is awesome.
Also a question -- will this show up in the autocomplete docs after tabs/dots? (I don't think it's worth taking the time to do it, btw; I think this implementation is great)
coffeemug commentedon Mar 7, 2014
Some more feedback.
@mlucy proposed the following message, which I like more (it seems both more precise and easier to understand):
Also, after some thought, I don't like the fact that clicking the
xwill hide the message forever. It's far to easy to a) click it without reading the message, and b) read the message, click on the x, and then run a group query later completely forgetting about the message.I'm not sure what the solution is. We could remove the
xentirely (which I'd be ok with), or add a setting "remind me about groupings" or something. I think for now we should just force people to put up with this message and see what users think about it.@neumino -- thoughts?
mlucy commentedon Mar 7, 2014
I think always leaving the message there is slightly better.
neumino commentedon Mar 7, 2014
I'm personally don't really like the warning. It's intrusive in the sense that nothing bad can happen -- it's not like if the user can declare a machine dead.
For me it would be like if we were adding a warning every time the user was using reduce that would tell the user that this is not a fold.
So users have to be able to hide it.
I'll fix the style for now, but if we decide not to display it, I would be happy to delete my branch :-)
mlucy commentedon Mar 7, 2014
Having a way to hide it and being able to hide it permanently by clicking a small x are different.
neumino commentedon Mar 7, 2014
We have the same behavior for the update warning for now.
I could add an option in the data explorer, but that seems like over doing things.
Ping @mglukhovsky -- thoughts?
coffeemug commentedon Mar 7, 2014
The update warning is different because if you hide it by clicking
x, it will show up again on the next update. Clickingxdoesn't turn it off permanently.I see what you mean, though, with your
foldanalogy. May be a better alternative is to put it in gray text under the edit box? Or give it an entirely different style so it seems less obtrusive?Let's talk to @mglukhovsky on Monday, I bet we'll come up with something that makes everyone reasonably happy.
mglukhovsky commentedon Mar 8, 2014
There should be a way to collapse the infobox, not dismiss it. We also may
want to use the less obtrusive infobox style we've introduced into the web
UI.
I'd like to sit down with @neumino on Monday to come up with a clever
solution.
On Fri, Mar 7, 2014 at 3:23 PM, Slava Akhmechet [email protected]:
neumino commentedon Mar 10, 2014
Warning inside the description of a function if you are after a group (at the same level) is available in branch
michel_2054_embedded_warning.You need to update the docs to see it working.
neumino commentedon Mar 11, 2014
After talking with @mglukhovsky we switch from a warning after the execution of the query to a warning inside the description of a function.
The warning is inside a gray box so it easily catch the attention of the user.
Up in review 1303 assigned to @mglukhovsky
Branch michel_2054_embedded_warning
neumino commentedon Mar 11, 2014
Also, the warning appear only if you are on the same "level", that is to say:
neumino commentedon Mar 14, 2014
Merged in
nextas 11f9125Ship 1.12