-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
T3chguy/devtools #4735
T3chguy/devtools #4735
Conversation
01e6a7d
to
9ab30b7
Compare
Signed-off-by: Michael Telatynski [email protected] |
A few suggestions:
|
thrown a back button everywhere Just need to figure out how to make it look nicer and to make the textarea autoresize |
Signed-off-by: Michael Telatynski <[email protected]>
@lukebarnard1 could you have another play pl0x |
98cb151
to
84f4fbe
Compare
Signed-off-by: Michael Telatynski <[email protected]>
the additional internal keys :) Signed-off-by: Michael Telatynski <[email protected]>
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.
This is looking really good :)
await this.send(content); | ||
message = _t('Event sent!'); | ||
} catch (e) { | ||
message = `${_t('Failed to send custom event.')} (${e.toString()})`; |
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 suggest not using `` here because it's hard to read.
<label htmlFor="evContent"> { _t('Event Content') } </label> | ||
</div> | ||
<div> | ||
<textarea id="evContent" ref="evContent" className="mx_TextInputDialog_input" defaultValue={"{\n\n}"} cols="63" rows="5" /> |
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.
Probably OK to not use {}
in defaultValue
. As in defaultValue="..."
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's required for literal new lines
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.
ah fair enough
} else { | ||
body = <div> | ||
<div className="mx_Dialog_content"> | ||
<button onClick={this._setMode(SendCustomEvent)}>{ _t('Send Custom Event') }</button> |
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 suppose we should be doing the whole skinning dance 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.
Skinning dance?
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.
Using the component skinning that we support. i.e. sdk.getComponent('bla')
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 so you're suggesting that I pull in the 3 tools through the sdk? ooi why is that done if they're defined at the riot-web level which is designed to be the top level?
this.refs.stateKey.value); | ||
} | ||
|
||
render() { |
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.
Given the only difference between this render
and the render
being clobbered, I think you should have this._content()
that can be clobbered to return the correct form for the given component. This keeps the render
the same.
} | ||
|
||
onBack() { | ||
if (this.state.event) { |
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.
Ordinarily I'd vote against this but given that the setState
s are here, it's fairly clear what will happen when clicking "Back" several times. The alternative would be doing some routing and I don't think that's a reasonable consideration for /devtools
.
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 changes requested above
|
||
_buttons() { | ||
return <div className="mx_Dialog_buttons"> | ||
<button onClick={this.onBack}>{ _t('Back') }</button> |
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'd be great for these buttons to have margin-bottom: 10px
or whatever.
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.
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, no, I meant on the event browser
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.
to stick the buttons to the modal and only scroll the event?
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.
done
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
@lukebarnard1 PTAL |
@t3chguy: this is awesome and i had no idea it existed - thanks! @lukebarnard1: i assume it's just an oversight that you approved but didn't merge! :) |
Add 3 "Developer Tools"