Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update button.js #8944

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update button.js #8944

wants to merge 1 commit into from

Conversation

rohitt05
Copy link

Reusability:
Added createIconPlaceholder() method to generate the placeholder icon. This avoids redundancy in the createEl method. Error Safety:

Added checks for this.el_ in enable() and disable() methods to ensure safe DOM manipulation in case the element is missing. Maintained All Code and Logic:

No existing logic was altered or omitted; all functionality is preserved. Optimized Comments:

Clarified comments to convey intent and removed redundant ones.

Description

Please describe the change as necessary.
If it's a feature or enhancement please be as detailed as possible.
If it's a bug fix, please link the issue that it fixes or describe the bug in as much detail.

Specific Changes proposed

Please list the specific changes involved in this pull request.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
    • Has no DOM changes which impact accessiblilty or trigger warnings (e.g. Chrome issues tab)
    • Has no changes to JSDoc which cause npm run docs:api to error
  • Reviewed by Two Core Contributors

Reusability:
Added createIconPlaceholder() method to generate the placeholder icon. This avoids redundancy in the createEl method.
Error Safety:

Added checks for this.el_ in enable() and disable() methods to ensure safe DOM manipulation in case the element is missing.
Maintained All Code and Logic:

No existing logic was altered or omitted; all functionality is preserved.
Optimized Comments:

Clarified comments to convey intent and removed redundant ones.
Copy link

welcome bot commented Dec 20, 2024

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant