-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
refactor: Migration of Chart to TypeScript #28370
refactor: Migration of Chart to TypeScript #28370
Conversation
class Chart extends React.PureComponent<ChartProps, {}> { | ||
static defaultProps = defaultProps; | ||
|
||
renderStartTime: any; |
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.
Where does renderStartTime
come from? In the old version, we're only reading it, but we don't assign any value to it. In your changes you put renderStartTime
in ChartProps, but also as class's field. I don't think it's actually passed as a prop anywhere, and as a class field it's also only read, not assigned.
So maybe we should just remove it?
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 removed this from ChartProps.
You mean we should remove him from line 198 and 200 ( start_offset and duration keys)?
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.
Yeah, unless I misunderstand something here, renderStartTime is always undefined because we don’t set its value anywhere, so maybe we could remove it from the code. @rusackas any objections?
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.
Unless we want to actually fix it and assign a timestamp
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 think we should understand why it was put there.
I remain waiting for instructions, thank you.
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.
Well, if it's not wired up, that's an odd problem. It sure seems like it'd be useful for logging, which seems to be its intent. There's one in ChartRenderer.jsx
that IS wired up, for reference. Maybe we don't need both though?
It WAS set in the original commit, actually. I haven't checked to see when its initialization was removed but clearly there wasn't much outcry.
I'd err on the side of more logging, not less. Maybe @eschutho would be interested in taking more advantage of this insight :)
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.
We can prob remove it and add it back in later if we find that we need it.
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.
Thanks for the contribution! Added a few comments
/testenv up |
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
1fd6dd6
to
6236bfd
Compare
/testenv up |
@geido Ephemeral environment spinning up at http://54.213.132.35:8080. Credentials are |
Ephemeral environment shutdown and build artifacts deleted. |
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com> Co-authored-by: JUST.in DO IT <justin.park@airbnb.com> Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
SUMMARY
Migrate Chart to TypeScript
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N.A.
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION