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

Limits number of digits to 12 in number block #3551

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

ashishrout-tech
Copy link
Contributor

image
It displays this error, and the block value defaults back to the previous value

@ashishrout-tech
Copy link
Contributor Author

@walterbender please review!

js/block.js Outdated

if(String(this.value).length > 12) {
const thisBlock = this.blocks.blockList.indexOf(this);
this.activity.errorMsg(_("There can be atmost 12 digits"), thisBlock);
Copy link
Member

Choose a reason for hiding this comment

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

"at most"

Copy link
Member

Choose a reason for hiding this comment

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

Also, please put a period at the end of the sentence.

Maybe "Numbers can have at most 12 digits."

@ashishrout-tech
Copy link
Contributor Author

@walterbender pls review

@walterbender walterbender merged commit 308a823 into sugarlabs:master Jan 11, 2024
3 checks passed
@Albshoji
Copy link
Contributor

Even though this issue has already been closed, I noticed that with 12 digits inside the block, overflow still occurs. Is this a concern? Wouldn't it be better to limit it to a smaller quantity within the block?
@walterbender
Captura de tela de 2024-01-16 15-54-11

@walterbender
Copy link
Member

Maybe ten is better than twelve

walterbender pushed a commit that referenced this pull request Jan 17, 2024
* changing the limit to 10 written digits

* slight rightward shift of the position of the text written inside the blocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bigger values overflow from the block
3 participants