-
Notifications
You must be signed in to change notification settings - Fork 334
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
add toggle-result-bubble command #875
Conversation
Thanks @lgeiger for pointer. Here are icon candidates for empty-bubble I could find from octicons.
|
9ac0a2e
to
9f254e2
Compare
Ready to review. For test spec. |
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.
Awesome! I only have a minor comment.
Yeah, the zap icon looks super cool, though I wonder if pin would be more meaningful. @BenRussert @rgbkrk What do you think?
For test spec.
I tried to add spec, but give up.
There is no existing test to actually activating Hydrogen package.
I need to understand how store is populated on after activation, and how it is used in the first place to write correct test, but this is too much for me for now sorry.
Thanks for looking into adding specs! I have a few improvements cued up, so we'll be able to move more logic out of main.js
this should greatly help with testing.
for (let row = startRow; row <= endRow; row++) { | ||
let destroyed = false; | ||
|
||
_.forEach(this.markerBubbleMap, (bubble: ResultView) => { |
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.
What about just using clearBubblesOnRow
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.
I wanted to know the result status(destroyed of not), but it not return result status.
I could write isRowContainsBubbke(row) predicate function to determine add or remove bubble, I just take simple imperative one.
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.
Oh overlooked it, nevermind. I shouldn't review code on my phone 😄
Thanks for quick review and merging!! |
@lgeiger +1 for moving logic out of main (and of course better testing) which is still open on #657 roadmap! I think it will help new contributors to look at a clean main to understand program flow first at a high level. Then as a guide to find the functionality they are interested in! |
Cool! |
This feature seems to have disappeared with some hydrogen update, or is it just me? |
No it's not you it's gone see #1642 @mattiasarro |
Code is very rough state, but want to know how team feels about this.What this PR do?
Add new command
hydrogen:toggle-bubble
This command allow manually add/remove bubble(outlet of code evaluation).
Motivation
Currently there is no way to add bubble without evaluating code.
So If I tried to place bubble where I want, I have to execute code, then frequently see
duplicate declaration of variable
like error in bubble.e.g.
let
,const
in JavaScript cannot be executed in same scope.This can be avoided if user super carefully execute code, but I don't want to.
Instead, I want to
restart-kernel-and-re-evaluate-bubbles
) and update bubbles.This workflow have no mess, no duplicate declaration error, I prefer this workflow at least in small code snippet.
TODO
zap
icon