ZeroPhone / ZPUI

Official ZeroPhone UI framework, based on pyLCI
http://zpui.rtfd.org/
Apache License 2.0
78 stars 19 forks source link

In Progress - Multiline Message In Dialog Box #166

Closed LouisPi closed 5 years ago

LouisPi commented 5 years ago

Scrolling needed. Also, would it be preferred if words weren't split up between lines when possible?

codecov[bot] commented 5 years ago

Codecov Report

Merging #166 into devel will decrease coverage by 0.06%. The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #166      +/-   ##
==========================================
- Coverage   41.08%   41.02%   -0.07%     
==========================================
  Files         254      254              
  Lines       21428    21461      +33     
==========================================
  Hits         8804     8804              
- Misses      12624    12657      +33
Impacted Files Coverage Δ
ui/dialog.py 93.57% <90%> (-0.66%) :arrow_down:
apps/games/g_2048/main.py 19.04% <0%> (-3.58%) :arrow_down:
ui/date_picker.py 85.22% <0%> (-2.85%) :arrow_down:
apps/games/g_2048/logic.py 13.7% <0%> (-0.83%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 76d3a7e...04caafc. Read the comment docs.

CRImier commented 5 years ago

Better than the current state, but doesn't handle messages that are too long, of course. BTW, have you tried format_for_screen (in ui/utils.py) for text formatting?

LouisPi commented 5 years ago

Better than the current state, but doesn't handle messages that are too long, of course. BTW, have you tried format_for_screen (in ui/utils.py) for text formatting?

I looked into it but went with a similar method to the one Printer uses. I will try out format_for_screen tonight and hopefully submit the updated version. How long is too long?

CRImier commented 5 years ago

"too long" was about a message long enough to make the buttons not show => we'll have to implement scrolling eventually =)

LouisPi commented 5 years ago

"too long" was about a message long enough to make the buttons not show => we'll have to implement scrolling eventually =)

Okay, thanks

LouisPi commented 5 years ago

Too long message error works - it raises the ValueError. Although I haven't fully tested it.

CRImier commented 5 years ago

Thank you, merged!