Skip to content

Add resizeWarningToggle - #4088

Merged
jisqyv merged 2 commits into
mit-cml:masterfrom
yashsrv:fix/warning-toggle-width
Oct 27, 2026
Merged

jisqyv merged 2 commits into
mit-cml:masterfrom
yashsrv:fix/warning-toggle-width

Conversation

@yashsrv

@yashsrv yashsrv commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR accomplish?

  • Resize warning toggle to fit its current label, invoked when toggle text is updated (Show Warning/Hide Warning) and after dom creation.
  • Refactor getBoundingRectangle code to always fetch the correct width of the warning toggle.

Description

Issue
image

Fixed now
image

Testing Guidelines

  1. Change language from English to Magyar.
  2. The warning toggle should now resize automatically.
  3. Click on warning toggle to update its text, it will resize automatically now.

Fixes #2484

Context for the changes

If this PR changes anything related to the companion make sure you have used the ucr branch. For all other changes use master or provide context for having used a different branch.
See a summary of git branches in the docs: App Inventor Developer Overview

If your code changes how something works on the device (i.e., it affects the companion):

  • I have made no changes that affect the companion

  • I branched from ucr

  • My pull request has ucr as the base

Further, if you've changed the blocks language or another user-facing designer/blocks API (added a SimpleProperty, etc.):

  • I have updated the corresponding version number in appinventor/components/src/.../common/YaVersion.java
  • I have updated the corresponding upgrader in appinventor/appengine/src/.../client/youngandroid/YoungAndroidFormUpgrader.java (components only)
  • I have updated the corresponding entries in appinventor/blocklyeditor/src/versioning.js

For all other changes:

  • I have made no changes that affect the master branch

  • I branched from master

  • My pull request has master as the base

General items:

  • I have updated the relevant documentation files under docs/
  • My code follows the:
  • ant tests passes on my machine

- Resize warning toggle to fit its current label,
  invoked when toggle text is updated (Show Warning/Hide Warning) and after dom creation.
- Refactor getBoundingRectangle code to always fetch the correct width of the warning toggle.
@AppInventorWorkerBee

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

1 similar comment
@AppInventorWorkerBee

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ewpatton

Copy link
Copy Markdown
Member

@AppInventorWorkerBee ok to test

@jisqyv jisqyv added the on ai2-test Code is deployed on ai2-test.appinventor.mit.edu label Sep 16, 2026

@jisqyv jisqyv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@ewpatton ewpatton added this to the nb207 milestone Oct 26, 2026
@mjgallag

Copy link
Copy Markdown
Contributor

I realize we probably already know this from ai2-test but I checked again just in case and can confirm this both doesn't conflict and works with #4069.

@jisqyv
jisqyv merged commit 3470f9e into mit-cml:master Oct 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grey box below warnings and error arrows isn't big enough in some languages.

5 participants