-
Notifications
You must be signed in to change notification settings - Fork 62
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
OpenedTracesWidget: modernize method binding #1175
OpenedTracesWidget: modernize method binding #1175
Conversation
Remove redundant method delegation patterns and explicit .bind(this) usage in favor of arrow functions. This modernization aligns with TypeScript best practices and reduces unnecessary code complexity while maintaining identical functionality. Changes: Replace method delegation pattern with direct arrow function implementation Remove explicit .bind(this) calls where arrow functions are used Maintain existing behavior and functionality Improve code readability Related to eclipse-cdt-cloud#1173 Signed-off-by: Will Yang <william.yang@ericsson.com>
cb4eac5
to
be8d24b
Compare
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 looks good to me. Thanks for the update.
One note about renaming public/protect methods. This is actually API changing. However, at this stage of the project (pre v1.0) I think it's ok to do such clean-up code. The vscode-trace-extension
, for example, doesn't override such methods and is not impacted.
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.
LGTM, thanks @williamsyang-work !
@williamsyang-work do you plan to update the other components as well, e.g. |
Ah, I didn't realize this. I will keep this in mind when making future changes. |
Yes, I was planning on it. I wanted to do one component at a time for an easier review process. But if someone else makes a change before me that's fine too. It seems like a possible good first issue. |
What it does
Modernizes method binding patterns in
OpenedTracesWidget
as part of #1173.How to test
.bind(this)
calls have been replaced with arrow functionsFollow-ups
No technical debt introduced. This PR reduces existing technical debt by simplifying the codebase.
Review checklist