-
Notifications
You must be signed in to change notification settings - Fork 256
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
Allows users to select tickscript editor with mouse #3252
Conversation
@@ -316,7 +316,7 @@ export class TickscriptPage extends PureComponent<Props, State> { | |||
} | |||
} catch (error) { | |||
console.error(error) | |||
notify(notifyTickscriptLoggingError(error)) | |||
notify(notifyTickscriptLoggingError('Could not collect kapacitor logs')) |
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 think we have a central constants file for all error copy
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 was previously just passing through an error and there was nothing in the notifications copy, happy to move.
if (ref) { | ||
const {height} = ref.getBoundingClientRect() | ||
this.setState({height}) | ||
this.notificationRef = ref |
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 if you put this at the top of this if block, and then use this.notificationRef.getBoundClientRect()
etc.? and then you can factor this and lines 30-31 out into a function for setting the height? or if not factoring it out, at least they'll be consistent syntax
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.
👍
/> | ||
<label htmlFor="insecureSkipVerifyCheckbox"> | ||
Unsafe SSL | ||
{url && |
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.
maybe some kind of typechecking, prior guard, or default value could be used to ensure url exists? why would we be able to get here without url?
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 was getting a null value right after I saved a new kapacitor configuration.
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 think this component needs to be translated to a class based component, there are enough places that need default values to make it a cleaner experience. However this change was not in service of the issue so didn't want to bog down this PR too much.
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.
hm. i don't think a url should ever be null after saving a new kapacitor configuration. i suspect introducing this line will cover up part of what, i would agree, should be a larger refactor. could you make a chore issue for the refactor of this component and cite this line and the null
upon saving for future consideration?
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.
sounds good
Removing errors caused by shouldComponentUpdate being called
@@ -19,7 +19,7 @@ class TickscriptID extends Component { | |||
onChange={onChangeID} | |||
placeholder="ID your TICKscript" | |||
spellCheck={false} | |||
autoComplete={false} | |||
autoComplete="false" |
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.
The prop for autocomplete on inputs is "off"
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.
👍
Closes #3236