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

Bigger values overflow from the block #3485

Closed
SamarthBagga opened this issue Dec 28, 2023 · 21 comments · Fixed by #3551
Closed

Bigger values overflow from the block #3485

SamarthBagga opened this issue Dec 28, 2023 · 21 comments · Fixed by #3551

Comments

@SamarthBagga
Copy link
Contributor

SamarthBagga commented Dec 28, 2023

Description

If you input larger values in a block for integers, then they tend to overflow from the block.
image

image

@khadar1020
Copy link
Contributor

@walterbender @SamarthBagga can you please tell us what will be the correct implementation for this

  1. By increasing the size of the block
  2. By decreasing the font size of the number which might be a problem for a bigger number
  3. By keeping a limited number of integers

Thank you

@walterbender
Copy link
Member

prob. we should limit the number of digits to 12?

@samyakshah3008
Copy link
Contributor

prob. we should limit the number of digits to 12?

+1 @walterbender

Also, how about keeping a min-width of block? so it handles the responsiveness issue too, any thoughts?

@SamarthBagga
Copy link
Contributor Author

SamarthBagga commented Dec 29, 2023

@walterbender, The text block doesn't exhibit this problem. What if we were to apply the text block's style attributes for the number block to resolve the issue? Maybe increasing the width of the number block a bit ?

@walterbender
Copy link
Member

Maybe that is a better idea.

@apsinghdev
Copy link
Contributor

i think text blocks also present this problem @SamarthBagga @walterbender
mb-issue

@SamarthBagga
Copy link
Contributor Author

This behavior appears somewhat inconsistent for an unknown reason, and the extent of the overflow in the text block seems to fluctuate between different texts. I'm considering experimenting with a sole width increase as a potential solution. I'll implement this adjustment and display the results.

image

@arush-webd
Copy link
Contributor

@SamarthBagga @walterbender can I please work on this issue?
Can one of you also tell which solution will be more optimal for the above bug

  1. width increase
  2. By keeping a limited number of integers

@walterbender
Copy link
Member

I think this is better solved by limiting the number of digits.

@arush-webd
Copy link
Contributor

arush-webd commented Jan 8, 2024

okay on it :)

@Albshoji
Copy link
Contributor

Albshoji commented Jan 8, 2024

@SamarthBagga @walterbender I've been working on this issue for the past few days, and I've noticed that the current implementation includes a function that calculates the number of pixels written within the block and, as a result, limits the quantity of characters displayed within the block. The current problem is that the exposed pixel limit within the block is too high, but reducing this limit could potentially solve the issue. Can I go ahead and implement this solution? I believe it might be a better approach than limiting the number of characters, considering that each character has a different width

@walterbender
Copy link
Member

In most fonts, numbers are a fixed width. In any case, feel free to approach the problem with a character limit.

@arush-webd
Copy link
Contributor

function that calculates the number of pixels written within the block

in which file is this function written?

@Albshoji
Copy link
Contributor

Albshoji commented Jan 8, 2024

function that calculates the number of pixels written within the block

in which file is this function written?

utils.js
Captura de tela de 2024-01-08 11-22-48

@apsinghdev
Copy link
Contributor

for numbers its 12 but should be the limit for the characters @walterbender sir

@walterbender
Copy link
Member

We don't need a limit for characters.

@Albshoji
Copy link
Contributor

Albshoji commented Jan 8, 2024

@walterbender I was testing the changes as you guided, and I noticed that the numbers start being written in the blocks from a point slightly to the left of the center. However, I believe that if they started being written from a point more to the right, it would look aesthetically nicer and, in addition, more digits could fit without having to make major adjustments... What do you think?
Starting from a point further to the right will make it possible to limit the number of digits within the block to 10 digits

Captura de tela de 2024-01-08 14-12-14
Captura de tela de 2024-01-08 14-02-40

@walterbender
Copy link
Member

looks good

@arush-webd
Copy link
Contributor

arush-webd commented Jan 9, 2024

@walterbender I changed the TEXTWIDTH to 90 and the block is not over flowing for smaller inputs. But for larger number inputs this is showing.

image

@walterbender
Copy link
Member

We don't want to use ellipsis for numbers.

@arush-webd
Copy link
Contributor

I see. Lemme change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants