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

Major Functionality Improvements #26

Open
wants to merge 152 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
61ac3a7
Rename Size to Tuple
acook Oct 5, 2023
2a1ff85
Document and clean up the Tuple class
acook Oct 5, 2023
fa8e1d4
Use a new reference instead of mutating the original object
acook Oct 5, 2023
0aaddec
Clean up uses of length to better express what it is doing
acook Oct 5, 2023
3e8b2fe
Tuple clean up
acook Oct 5, 2023
a50f24a
Splitting Viewport into Pane
acook Oct 5, 2023
b1e61ca
Return 0 instead of nil when there are no lines
acook Oct 5, 2023
1a7324f
Improvements to readme examples
acook Oct 5, 2023
f43a032
Enable viewport body override
acook Oct 5, 2023
ffd1c7d
Move range finding code down into a protected section
acook Oct 5, 2023
fd305d1
Add Yard configuration file
acook Oct 5, 2023
5c5f5c4
Add Screenbuffer class
acook Oct 5, 2023
fc73329
Allow longer replacements in the screenbuffer
acook Oct 5, 2023
ebd8fa0
Refactor screenbuffer to get ready to handle multiple lines
acook Oct 5, 2023
1a2c4f2
Make Tuples from other Tuples
acook Oct 5, 2023
663c4fc
Add Tuples to scalars and other Tuplable types
acook Oct 5, 2023
04f268f
Move tuplify functionality into class itself
acook Oct 5, 2023
fd62d04
Clean up Tuple math operations
acook Oct 5, 2023
902b1fb
Screenbuffer handles multiple line insertion
acook Oct 5, 2023
863633f
Screenbuffer handles newlines in simple strings
acook Oct 5, 2023
730a391
Screenbuffer handles newlines in arrays of lines
acook Oct 5, 2023
c791b9b
Document Screenbuffer class
acook Oct 5, 2023
9e3e00a
Make new buffer method private
acook Oct 5, 2023
e68e38f
Additional accessors for Tuple
acook Oct 5, 2023
792d726
Screenbuffer handles overflowing lines and ellipsis
acook Oct 5, 2023
ac37c8d
Screenbuffer handles overflowing vertical content
acook Oct 5, 2023
57b59a6
Screenbuffer can be resized and output ansi new lines
acook Oct 5, 2023
566e9e8
Create simple Screen object - the would-be replacement for Viewport
acook Oct 5, 2023
3ff3180
Improve documentation for Screenbuffer
acook Oct 5, 2023
ad18b8a
Make Console more testable with some overrides
acook Oct 5, 2023
6811856
Add test for using Tuples as buffer coordinates
acook Oct 5, 2023
9da72c6
Read characters from buffer
acook Oct 5, 2023
a5ce4dd
Test that screen draw generates ANSI
acook Oct 5, 2023
fa90bd5
Screen can draw simple objects directly, fix state issue in tests
acook Oct 5, 2023
b07de3f
Test that Remedy objects work with Screenbuffer, make Views work
acook Oct 6, 2023
ac4662f
Beginning of Frame class to manage layout
acook Oct 6, 2023
0b4dc40
Demonstrate basic Frame content compilation
acook Oct 6, 2023
9848d80
Screenbuffer can clear its contents
acook Oct 6, 2023
bd33979
Move STDIO capturing tests to their own context
acook Oct 6, 2023
48dbba7
Basic Frame incorporation
acook Oct 6, 2023
9a40e80
Horizontal alignment of Frame contents
acook Oct 6, 2023
3776c88
Align module to reuse alignment code, center Frames
acook Oct 6, 2023
c5c842a
Align lines right and left
acook Oct 6, 2023
a06a17f
Remove space check from Frame, Align should handle it
acook Oct 6, 2023
1bdd4b8
Error when alignment unknown
acook Oct 6, 2023
0771246
Change default Frame max_size to none
acook Oct 6, 2023
67aa604
Frame content alignment sized to the longest line
acook Oct 6, 2023
dca6a1d
Frame handles explicit sizes
acook Oct 6, 2023
10549e7
Add equality check to Tuple
acook Oct 6, 2023
810e511
Frame can determine the size of its contents independent from itself
acook Oct 6, 2023
3256604
Rename Frame max_size to size
acook Oct 6, 2023
6620a59
Fixing typo in valign
acook Oct 6, 2023
e932c9e
Only calculate the compiled_size once
acook Oct 6, 2023
2959000
Size now sets the actual resulting size of the output, including empt…
acook Oct 6, 2023
208b604
Fix typo in Tuple, improve error messages
acook Oct 6, 2023
3985b6e
Method name tweaks and improve documentation
acook Oct 6, 2023
4da002e
Frame can bottom align text
acook Oct 6, 2023
01d9acb
Add Editorconfig file
acook Oct 6, 2023
6950aa8
Frames can be oriented in the screen according to their origin
acook Oct 6, 2023
bab29e0
Sortable frame depth fix
acook Oct 7, 2023
6766c74
Reorganize frame test for better output
acook Oct 7, 2023
0b2e8ce
Frames with 0 dimension sizes act as fill for that dimension
acook Oct 7, 2023
bc6f91a
Fix lingering old name from a rename
acook Oct 7, 2023
fee0344
Frames with fractional sizes take up that portion of the container
acook Oct 7, 2023
9dcdef7
Frames are named, good for debugging
acook Oct 7, 2023
31b3dcb
Screen redraw can be disabled when resize is called
acook Oct 7, 2023
99ba725
Screen test uses Partial
acook Oct 7, 2023
9484c7d
Document buffer param in Align method
acook Oct 8, 2023
b2feb0f
Ensure that newlines are split in merged contents
acook Oct 8, 2023
bb537b4
Dup a Tuple and get a new dimension Array too
acook Oct 8, 2023
9c47e8a
Reorganize Screen spec, update test to make the inner frame more visible
acook Oct 8, 2023
464869f
Add test to ensure that Screenbuffers can have contents placed outsid…
acook Oct 8, 2023
471fccb
Frames can now have a columnar internal arrangement for their contents
acook Oct 8, 2023
2a86dc4
Reorganize Frame accessors, add offset
acook Oct 8, 2023
3c4fff3
Stringify anything passed to Frame#split
acook Oct 8, 2023
06097bf
Frames in a Screen can now be offset by arbitrary values from point o…
acook Oct 8, 2023
4f0e811
Move methods up to make room for breaking down the big compile method
acook Oct 8, 2023
8260d5e
Refactor Frame compilation to make each section more clear
acook Oct 8, 2023
553a70a
Rename variable for clarity
acook Oct 8, 2023
5d518c4
Memoize Frame's computed size and buffer for reuse
acook Oct 8, 2023
3f6cecb
Simplify Screen spec slightly
acook Oct 8, 2023
96b761d
Test that Screen properly layers Frames
acook Oct 8, 2023
ce49f6c
Use memoized Frame compilation instead of regenerating
acook Oct 8, 2023
c82dabb
WIP: Working on abitrary arrangement
acook Oct 8, 2023
5638891
Adding names to test Frames to make tracing easier
acook Oct 8, 2023
bf17f0f
WIP: Removing direct Frame content access in favor of arbitrated Fram…
acook Oct 9, 2023
7f4554d
Better names for the columnar arrangement code, and extract methods
acook Oct 9, 2023
d266308
Split out the way new lines are added to buffer for reuse
acook Oct 9, 2023
d8395b2
Split out size computing of buffers for reuse
acook Oct 9, 2023
52ee502
Screenbuffer#resize now extends buffers
acook Oct 9, 2023
48a6588
Screenbuffer can grow to fit new contents
acook Oct 9, 2023
0ab941e
Tuple#zero? to check if all dimensions are 0
acook Oct 9, 2023
213e935
Setters for Tuple to match the ergonomic getters
acook Oct 9, 2023
a56fc8f
Use Tuple for buffer offset instead of discrete values, for homgenity
acook Oct 9, 2023
72c227e
Remove debug logging
acook Oct 9, 2023
c8b0202
Split out depth sort and make it more comprehensive
acook Oct 9, 2023
e85bc1a
Auto expand arrange buffer
acook Oct 9, 2023
609ef9d
End comments to make it clear what is in the Frame class
acook Oct 9, 2023
e4c820f
Fix broken test for bottom origin nested Frame
acook Oct 9, 2023
2633aaf
Use Frame#<< when adding content during init
acook Oct 9, 2023
e7a59a1
Started cleaning up Frame tests, discovered invalid test, Columnar br…
acook Oct 9, 2023
1ad4678
Expose Frame#contents again for debugging purposes, remove debugging …
acook Oct 9, 2023
a7e74e1
Add dev deps for debugging and documentation
acook Oct 9, 2023
f6ad322
Remove extra Array#flatten
acook Oct 9, 2023
a2f1045
Fix columnar arrangement - use hoffsets
acook Oct 9, 2023
a1e98e1
Move utility methods into protected section
acook Oct 9, 2023
678f4f5
Remove duplicated test setup and outdated comment
acook Oct 9, 2023
aef2f19
Stop letting compute_actual_size return nil
acook Oct 9, 2023
6df9606
Refactor Frame#compute_actual_size and add tests
acook Oct 9, 2023
2e7fb33
Add Screenbuffer#parent - does nothing but good for tracking ownership
acook Oct 10, 2023
2acc56c
Remove debug logging, remove uneeded parens
acook Oct 10, 2023
343eee0
Prefer parent Frame size over available size for nested
acook Oct 10, 2023
a13603d
Adds several comparison and math methods to Tuple, plus tests and docs
acook Oct 10, 2023
b713df9
Fix bottom origins underflowing buffer
acook Oct 11, 2023
88d72e1
Test negative layers, test arbitrary arrangements of non-frame types
acook Oct 11, 2023
9771a86
Explain override param
acook Oct 11, 2023
f78817b
Clarify comment to discuss downsides of workaround
acook Oct 11, 2023
9b5e498
Better error messages for when negative indicies are out of range
acook Oct 11, 2023
88d0434
Defensive programming: Sizes are prone to accidental alteration
acook Oct 11, 2023
fdb5e5d
Disallow zero height buffers from having width
acook Oct 11, 2023
10d3184
Change expected behavior based on last commit
acook Oct 11, 2023
12dcc66
Clean up some type tests
acook Oct 11, 2023
f7e4750
Save VS Code Workspace
acook Oct 11, 2023
cd98ea5
Add new complex example, add dev tools to Gemfile
acook Oct 11, 2023
f4f907f
Ignore log files created by debugging tools
acook Oct 11, 2023
d6f15af
Renamed Screen#resized to Screen#resize, allow disabling auto redrawi…
acook Oct 11, 2023
86d4d4a
Add parent attribute to Frame
acook Oct 11, 2023
4a80fed
Depth sort first, set parent in depth_sort
acook Oct 11, 2023
07f71b3
Fix typo in comment
acook Oct 11, 2023
f853f61
Move stacked arrangement code to its own method
acook Oct 11, 2023
4281823
Fix copy/paste error causing hoffsets to be wrong
acook Oct 11, 2023
1083e33
Replace bespoke Screen layout code with dedicated Frame
acook Oct 11, 2023
eaf6b9c
Start to break Frame tests out into their own files and reorganize
acook Oct 11, 2023
6e6c90b
Move origin tests to dedicated file, begin homogenizing them
acook Oct 11, 2023
e11e51c
More cleanup of origin tests
acook Oct 11, 2023
a42ab25
Aggressively condense origin tests
acook Oct 11, 2023
2fb73b2
Separate out alignment tests
acook Oct 11, 2023
b2b2e57
Fix missing context block
acook Oct 11, 2023
c02c20c
Fix terminal resize issues finally!
acook Oct 11, 2023
6163526
Screens can be named too
acook Oct 11, 2023
7b29e10
Remove unused frames in test, stub out columnar test
acook Oct 11, 2023
831ee85
Test for that resize bug fixed a few commits ago
acook Oct 11, 2023
8a3b010
Name the screen in the example
acook Oct 11, 2023
2d5fbb6
Implement basic size test
acook Oct 11, 2023
093e04e
Comprehensive alignment tests
acook Oct 11, 2023
7a44b7e
Constraint output of Screenbuffers to the specified size, regardless …
acook Oct 11, 2023
81a942d
Specific tests for Frame sizes and resizing which will catch a lot mo…
acook Oct 11, 2023
37e3652
Fix typo in comment
acook Nov 7, 2023
ed6b552
Alias to shorter method name
acook Nov 7, 2023
dd1f186
Reformat comment
acook Nov 7, 2023
da96c56
Tests use these classes so must be required if run individually
acook Nov 7, 2023
c80d1ef
Drop support for Ruby 2.3
acook Dec 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove debug logging
acook committed Oct 9, 2023
commit 72c227e0ac43b5514aff33f40faf69c86655029e
2 changes: 0 additions & 2 deletions lib/remedy/frame.rb
Original file line number Diff line number Diff line change
@@ -287,8 +287,6 @@ def arrange_arbitrary content_to_arrange
content = frame.compile_contents
fsize = frame.computed_size || frame.content_size

Remedy.log.debug "sizes", size, fsize

case frame.vorigin
when :top
voffset = 0