-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix!: Replace Closure UI CSS classes with Blockly CSS classes #8339
fix!: Replace Closure UI CSS classes with Blockly CSS classes #8339
Conversation
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.
Welcome! It looks like this is your first pull request in Blockly, so here are a couple of tips:
- You can find tips about contributing to Blockly and how to validate your changes on our developer site.
- All contributors must sign the Google Contributor License Agreement (CLA). If the google-cla bot leaves a comment on this PR, make sure you follow the instructions.
- We use conventional commits to make versioning the package easier. Make sure your commit message is in the proper format or learn how to fix it.
- If any of the other checks on this PR fail, you can click on them to learn why. It might be that your change caused a test failure, or that you need to double-check the style guide.
Thank you for opening this PR! A member of the Blockly team will review it soon.
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.
Two little fixes then should be good to go! Thanks for digging into this =)
core/menu.ts
Outdated
@@ -85,8 +85,8 @@ export class Menu { | |||
*/ | |||
render(container: Element): HTMLDivElement { | |||
const element = document.createElement('div'); | |||
// goog-menu is deprecated, use blocklyMenu. May 2020. | |||
element.className = 'blocklyMenu goog-menu blocklyNonSelectable'; | |||
// Removed deprecated goog-menu, used blocklyMenu. July 2024. |
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.
// Removed deprecated goog-menu, used blocklyMenu. July 2024. |
You can just remove this comment!
core/menuitem.ts
Outdated
@@ -64,10 +64,10 @@ export class MenuItem { | |||
this.element = element; | |||
|
|||
// Set class and style | |||
// goog-menuitem* is deprecated, use blocklyMenuItem*. May 2020. | |||
// removed deprecated goog-menuitem & goog-menuitem-disabled , used blocklyMenuItem & blocklyMenuItemDisabled. July 2024. |
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.
// removed deprecated goog-menuitem & goog-menuitem-disabled , used blocklyMenuItem & blocklyMenuItemDisabled. July 2024. |
Same here =)
core/menuitem.ts
Outdated
'blocklyMenuItem goog-menuitem ' + | ||
(this.enabled ? '' : 'blocklyMenuItemDisabled goog-menuitem-disabled ') + | ||
'blocklyMenuItem ' + | ||
(this.enabled ? '' : 'blocklyMenuItemDisabled ') + | ||
(this.checked ? 'blocklyMenuItemSelected goog-option-selected ' : '') + |
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 actually I see that this goog-option-selected
should also be removed. Can you check for other goog-x
classes and remove them as well?
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 looks great! Thank you for the fixes. Once this passes CI I'll get it merged =)
The basics
The details
Resolves
Fixes Replace Closure UI CSS classes with Blockly CSS classes #8286
Proposed Changes
replaces all instances of the deprecated goog-menuitem, goog-menuitem-disabled, and goog-menu CSS classes
with the corresponding blocklyMenuItem, blocklyMenuItemDisabled, and blocklyMenu classes
Reason for Changes
This change ensures that the code
follows the updated styling guidelines and removes dependency on the old Closure UI library.
Test Coverage
Documentation
Additional Information
Please let me know, if any changes are needed.