Skip to content

Conversation

AydinHassan
Copy link
Member

An attempt at resizing the menu when the terminal is resized. It seems to be a bit jittery, some resizes work, some do not.

It works when first being resized, storing the width of the menu. Every time it is resized, we will attempt to set the original width, which will either shrink the menu if the terminal is too small to display it, or if the terminal is enlarged, it will attempt to display the menu at its original width.

Needs php-school/terminal#12

And is based on top off #220 so can be rebased when that is merged to reduce the diff.

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@0283b18). Click here to learn what that means.
The diff coverage is 10.52%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #222   +/-   ##
=========================================
  Coverage          ?   58.63%           
  Complexity        ?      611           
=========================================
  Files             ?       31           
  Lines             ?     1830           
  Branches          ?        0           
=========================================
  Hits              ?     1073           
  Misses            ?      757           
  Partials          ?        0
Impacted Files Coverage Δ Complexity Δ
src/CliMenu.php 2.59% <0%> (ø) 117 <0> (?)
src/Terminal/TerminalFactory.php 100% <100%> (ø) 1 <0> (?)
src/MenuStyle.php 92.28% <9.09%> (ø) 79 <3> (?)

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 0283b18...a96cffe. Read the comment docs.

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.

2 participants