-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
[sqllab] run only the part of the query that is selected #1479
Conversation
9b95392
to
8f75dac
Compare
8f75dac
to
1961dee
Compare
Lovely, looks good to me! Do you plan to support run async the selected text? |
Async also works with selected text, just the same as |
i'm curious about the color change for the buttons. i think updating only the text in the button should be enough of a ui update so users know they can run just the selected query. @mistercrunch what was your thinking with changing the color as well? |
@@ -92,25 +93,31 @@ class SqlEditor extends React.PureComponent { | |||
|
|||
render() { | |||
let runButtons = []; | |||
let runText = 'Run Query'; |
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.
it would be great to move the run buttons out of this component and into it's own component. there's a lot happening in this component and with change, more happening with the run buttons.
The warning color was to draw attention that 1-the feature exists, and 2-that it's essentially a different button at this point, with a different behavior. I though of having a brand new extra button "Run Selection" that would be disabled when not selected, but with potentially "Run Query" and "Run Async" already, that multiplies the buttons to 4 buttons (+"Run Selection Async"). I think changing the button text only is too subtle. We need something very clear and perhaps more discoverable, though as it is currently (with the color) I feel like a user would discover the feature quite quickly, most likely in its first heavy session of usage. I've seen UI features that will have a temporary "flash" to draw attention that something has changed, away from the action trigger, and go back to its final state quickly. An example of that type of UX would be if you add a TableElement, we could make its background yellow, fading back to default color over 3-5 seconds. |
i can see your point about making it more obvious, but i think if someone is selecting part of the query with the intent to run just the selected part, and then looks at the run query button and and it now says |
The color change augments the chance of catching the user's eye for this feature's discovery. The label change by itself on a button is pretty subtle, it'd be easy not to notice it. Are you concerned that the color change makes it look to "alarming"? |
yeah, it seems to send a difference message with the warning color.. i also think it's usage is just not consistent with what is expected. in any case, i don't think we should spend more cycles on this for now, if you feel strongly about making the color change, let's leave as is. 👌 |
Fixes https://github.com//issues/1427