Skip to content
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

Merged

Conversation

Arun-cn
Copy link

@Arun-cn Arun-cn commented Jul 12, 2024

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.

@Arun-cn Arun-cn requested a review from a team as a code owner July 12, 2024 18:36
@Arun-cn Arun-cn requested a review from gonfunko July 12, 2024 18:36
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug labels Jul 12, 2024
Copy link

@github-actions github-actions bot left a 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.

@BeksOmega BeksOmega requested review from BeksOmega and removed request for gonfunko July 15, 2024 17:25
@BeksOmega BeksOmega assigned BeksOmega and unassigned gonfunko Jul 15, 2024
Copy link
Collaborator

@BeksOmega BeksOmega left a 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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 ' : '') +
Copy link
Collaborator

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?

@Arun-cn Arun-cn requested a review from BeksOmega July 16, 2024 07:55
Copy link
Collaborator

@BeksOmega BeksOmega left a 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 =)

@Arun-cn Arun-cn requested a review from BeksOmega July 16, 2024 17:22
@BeksOmega BeksOmega merged commit ae80adf into google:rc/v12.0.0 Jul 17, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants