-
Notifications
You must be signed in to change notification settings - Fork 178
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 "close button" #140
Add "close button" #140
Conversation
I have pushed commits as the first version which contains wip-commits for code reviews. Thanks. |
Because we share the browser space with user content, I think we shouldn't waste that much real estate with the resize bar. We can keep it as is, and provide just the close button. If people want the console out of the way, they can just resize it down. Further more, we can probably drop the outline of the close button and show it only when the mouse hovers the console (so again, we save the real estate). We also should be able to opt-out of this behaviour for the browser extensions. |
@gsamokovarov Thanks for the reply.
I understand that.
And I also agree with that.
Uhm, I'm not quite sure of that. The next link shows my interpretation: http://jsfiddle.net/bmvfLkjq/4/ Let me know if it is incorrect.
Yeah, I think to add a config of the REPLConsole constructor. Thank you. |
My thought was to keep the resize bar transparent as before. We may not have the close button attached to it (at least visually), having the close boutton couple of pixels down to the right of it may cut it. Something like this ASCII:
Exactly. |
@gsamokovarov Thanks for giving an example :-) OK, I will think of it. |
ac5843f
to
c094695
Compare
ae0eed9
to
8c55d2d
Compare
I have pushed new version with the following changes:
@gsamokovarov Hi, could you review the code again? And here is a gif: Thank you. |
.console .resizer { background: #333; width: 100%; height: 4px; cursor: ns-resize; } | ||
.console .console-actions { padding-right: 3px; } | ||
.console .console-actions .button { float: left; } | ||
.console .button { cursor: pointer; border-radius: 1px; font-family: monospace; font-size: 9px; width: 10px; height: 10px; line-height: 10px; text-align: center; color: #ccc; } |
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.
Can we make the close button a bit bigger? Say font-size: 13px, width: 14px; height: 14px; line-height: 14px;
, I tested on my machine and it looks reasonable.
Thanks @sh19910711, this looks great! Now that we have templates tests infrastructure, we can try to write a regression test for this. |
8c55d2d
to
b354089
Compare
OK, I will try it. Thanks for taking time to check :) |
0eb72dc
to
3407c15
Compare
SpecHelper.triggerEvent(closeButton, "click"); | ||
}); | ||
it("should be removed from the parent node", function() { | ||
assert.ok(document.getElementById(this.elmId) === null); |
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.
Isn't there assert.nil or something in the lines of?
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.
Yes, I found assert.isNull
:)
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.
Let's use it then :)
* REPLConsole#install() * Close Action
3407c15
to
4ec707a
Compare
Updated (and here is a diff). The |
The main changes of this pull request are the followings:
Change styles of the resizer elementAdd "Minimize button"The quoted text is from PR #139.
GIF
Issue #121