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

Solved some text overflow issues and set max tag name #200

Merged
merged 37 commits into from
Oct 9, 2023

Conversation

Akisame-AI
Copy link
Collaborator

Text overflow issues on the slot manager should be a lot better now.
Text overflow on saved cards still requires some work. Changed a row to a wrap to get it to handle overflows properly but I need to split the quick buttons to a new row now and prevent it from collapsing.
On the card edit page I added a validation for a max name length as supported by the chameleon ultra and added some localization translations for this.

Text overflow issues on the slot manager should be a lot better now.
Text overflow on saved cards still requires some work. Changed a row to a wrap to get it to handle overflows properly but I need to split the quick buttons to a new row now.
On the card edit page I added a validation for a max name length as supported by the chameleon ultra and added some localization translations for this.
@aruznieto
Copy link
Collaborator

Text overflow issues on the slot manager should be a lot better now.
Text overflow on saved cards still requires some work. Changed a row to a wrap to get it to handle overflows properly but I need to split the quick buttons to a new row now and prevent it from collapsing.
On the card edit page I added a validation for a max name length as supported by the chameleon ultra and added some localization translations for this.

Please, dont edit language files, do it on our Crowdin project (https://crowdin.com/project/chameleonultragui), I just add the string to translate.

@Akisame-AI
Copy link
Collaborator Author

Check. I wasn't informed that that was a separate project. Thanks for the heads up.

@aruznieto
Copy link
Collaborator

Check. I wasn't informed that that was a separate project. Thanks for the heads up.

👍

@aruznieto
Copy link
Collaborator

Check. I wasn't informed that that was a separate project. Thanks for the heads up.

Please, If you can, discard your changes from .arb files.

@Akisame-AI
Copy link
Collaborator Author

Akisame-AI commented Sep 3, 2023

Check. I wasn't informed that that was a separate project. Thanks for the heads up.

Please, If you can, discard your changes from .arb files.

I'll do so in a few minutes but it will fail the checks without the new localization option so I'll leave the English version as is and revert the changes of the others.

Buttons now scale down if the window size is smaller than item size
Fixed text scaling enormously on home page for wide windows,
Fixed scaling of toggle buttons
Now allows scrolling in saved cards and contains them within the Card item except for when it is fully scrolled to the top. I am not sure why it is doing this. I may wrap it in a ListView or SingleScrollableView container but those were giving some issues for now.
@aruznieto
Copy link
Collaborator

Hi, I am reviewing your PR. When I go to "Saved cards" page, Flutter throws this exeption:

Another exception was thrown: Incorrect use of ParentDataWidget.

And when I build the app that page look like this:
Captura de pantalla 2023-09-03 a las 21 13 52

For the rest, good job!

@Akisame-AI
Copy link
Collaborator Author

Akisame-AI commented Sep 3, 2023

Hi, I am reviewing your PR. When I go to "Saved cards" page, Flutter throws this exeption:

Another exception was thrown: Incorrect use of ParentDataWidget.

And when I build the app that page look like this: Captura de pantalla 2023-09-03 a las 21 13 52

For the rest, good job!

Check. I think I know what went wrong. I'll fix it tomorrow.

Edit: It has been fixed but that means the overflow catcher in this page no longer works. I increased the column switcher range to compensate.
When I have more free time I will make it so the text scales instead of fixing it with an overflow catcher.
Colors for light mode still need some work.

Akisame-AI and others added 2 commits September 4, 2023 09:30
Saved cards has been fixed but it broke the overflow catcher. It needs to be in an Expanded but that breaks it without useful debug info. I will work on this the next time I have some free time.
@GameTec-live GameTec-live linked an issue Sep 5, 2023 that may be closed by this pull request
@Foxushka Foxushka marked this pull request as draft September 9, 2023 10:37
As requested: This adds a better complementary color for the saved card under light mode.
Text overflow wasn't an option and but dictionary buttons don't want to scale for some reason but the saved cards should now be safe from overflowing and the text should become smaller on smaller screens.
I added scaling for the reading cards page for android. Yes. This is based on the screen width. That page is so layered in unconstrained containers that this was legitimately the best option..... If you have a better suggestion feel free to adjust the layoutbuilder widget.
I also added a const in front of the complementary colors to improve the speed slightly.
Sorry. Forgot about the recover and dump partial button scaling.
@Foxushka
Copy link
Collaborator

As per #214 (comment): When it will be ready, resolve conflicts and undraft

@Foxushka
Copy link
Collaborator

Foxushka commented Sep 17, 2023

  1. Some scaling bugs already fixed, stay with current solution where applicable
  2. Mifare Classic key input (checkmarks) is now 'self-scalable', you can also port your fixes for very small screens if you want to
  3. Reformat your code

@GameTec-live
Copy link
Owner

  1. Some scaling bugs already fixed, stay with current solution where applicable
  2. Mifare Classic key input (checkmarks) is now 'self-scalable', you can also port your fixes for very small screens if you want to
  3. Reformat your code

Reformat: visual studio command pallete, format document and at the end a dart fix ;)

@GameTec-live
Copy link
Owner

image

importing a bin file doesnt work and results in errors....
also, the cards are still centered...

image

@github-actions github-actions bot added the translation changes When something in the translation changes label Oct 6, 2023
@Foxushka Foxushka marked this pull request as ready for review October 6, 2023 20:50
@Foxushka Foxushka linked an issue Oct 6, 2023 that may be closed by this pull request
@Foxushka Foxushka requested a review from GameTec-live October 6, 2023 21:05
@nasaboy

This comment was marked as off-topic.

Copy link
Owner

@GameTec-live GameTec-live left a comment

Choose a reason for hiding this comment

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

thats no good

@@ -0,0 +1,117 @@

Copy link
Owner

Choose a reason for hiding this comment

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

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown while applying parent data.:
Incorrect use of ParentDataWidget.
The ParentDataWidget Expanded(flex: 1) wants to apply ParentData of type FlexParentData to a
RenderObject, which has been set up to accept ParentData of incompatible type ParentData.
Usually, this means that the Expanded widget has the wrong ancestor RenderObjectWidget. Typically,
Expanded widgets are placed directly inside Flex widgets.
The offending Expanded is currently placed inside a Semantics widget.
The ownership chain for the RenderObject that received the incompatible parent data was:
  RichText ← Text ← Expanded ← Semantics ← DefaultTextStyle ← Padding ← Column ← IntrinsicWidth ←
Semantics ← DefaultTextStyle ← ⋯

When the exception was thrown, this was the stack:
#0      RenderObjectElement._updateParentData.<anonymous closure> (package:flutter/src/widgets/framework.dart:6230:11)
#1      RenderObjectElement._updateParentData (package:flutter/src/widgets/framework.dart:6247:6)
#2      RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:6270:7)
#3      RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6154:5)
#4      MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6576:11)
...     Normal element mounting (25 frames)
#29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4182:16)
#30     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6569:36)
#31     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6581:32)
...     Normal element mounting (305 frames)
#336    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4182:16)
#337    MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6569:36)
#338    Element.updateChild (package:flutter/src/widgets/framework.dart:3707:18)
#339    Element.updateChildren (package:flutter/src/widgets/framework.dart:3894:32)
#340    MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6594:17)
#341    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#342    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
#343    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
#344    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
#345    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
#346    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#347    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
#348    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
#349    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
#350    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#351    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
#352    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
#353    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
#354    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#355    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#356    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
#357    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
#358    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
#359    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
#360    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#361    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
#362    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
#363    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
#364    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:107:11)
#365    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#366    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
#367    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
#368    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
#369    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
#370    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#371    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
#372    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
#373    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
#374    StatefulElement.update (package:flutter/src/widgets/framework.dart:5485:5)
#375    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#376    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6441:14)
#377    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#378    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6441:14)
#379    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#380    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
#381    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
#382    ProxyElement.update (package:flutter/src/widgets/framework.dart:5628:5)
#383    Element.updateChild (package:flutter/src/widgets/framework.dart:3685:15)
#384    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5322:16)
#385    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
#386    Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
#387    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2779:19)
#388    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:916:21)
#389    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:360:5)
#390    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1297:15)
#391    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1227:9)
#392    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1085:5)
#393    _invoke (dart:ui/hooks.dart:170:13)
#394    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:401:5)
#395    _drawFrame (dart:ui/hooks.dart:140:31)
════════════════════════════════════════════════════════════════════════════════════════════════════

Exception is no good...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Steps to reproduce?

@GameTec-live GameTec-live linked an issue Oct 9, 2023 that may be closed by this pull request
@Foxushka Foxushka marked this pull request as draft October 9, 2023 17:55
@GameTec-live GameTec-live marked this pull request as ready for review October 9, 2023 19:13
@GameTec-live GameTec-live self-requested a review October 9, 2023 19:13
@GameTec-live GameTec-live merged commit 40c99c6 into main Oct 9, 2023
@GameTec-live GameTec-live deleted the Text-overflow-fixes branch October 9, 2023 19:23
Foxushka added a commit that referenced this pull request Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translation changes When something in the translation changes
Projects
Archived in project
5 participants