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

TUI feature request: grow text field vertically instead of scrolling #101

Closed
osa1 opened this issue Aug 9, 2018 · 3 comments · Fixed by #200
Closed

TUI feature request: grow text field vertically instead of scrolling #101

osa1 opened this issue Aug 9, 2018 · 3 comments · Fixed by #200
Labels
feature request libtiny_tui Issues/PRs related to the TUI library

Comments

@osa1
Copy link
Owner

osa1 commented Aug 9, 2018

Currently if I write a message long enough to not fit on the screen I have to scroll back and forth to see rest of the message. Another idea is to vertically grow the text field instead. That way I can see the whole message on screen (assuming there's vertical space on screen).

@osa1
Copy link
Owner Author

osa1 commented Feb 20, 2019

#125 suggests a similar thing for the tab line.

@osa1 osa1 added the libtiny_tui Issues/PRs related to the TUI library label Jan 1, 2020
@trevarj
Copy link
Contributor

trevarj commented Apr 2, 2020

Is this being worked on? I might try to take a stab at it if it's still wanted/needed.

@osa1
Copy link
Owner Author

osa1 commented Apr 2, 2020

@trevarj I still need it but have no time to work in it these days, so go for it. Feel free to ping me here or on IRC with questions.

osa1 pushed a commit that referenced this issue Apr 11, 2020
osa1 pushed a commit that referenced this issue Apr 12, 2020
osa1 pushed a commit that referenced this issue Apr 12, 2020
osa1 pushed a commit to trevarj/tiny that referenced this issue Apr 13, 2020
trevarj added a commit to trevarj/tiny that referenced this issue Apr 14, 2020
trevarj added a commit to trevarj/tiny that referenced this issue May 20, 2020
Closes osa1#101

Update tests:

- Improve error reporting on test failure
- Use smaller screen in text_field_wrap tests, document screen size
- Combine multiple text_field_wrap tests in single test
  (not complete)

Fix a few clippy warnings

tui: Implement methods for testing resizing

Allow servers to have aliases. Fixes osa1#186.

Remove outdated contributors list from README

We don't update it, and Github maintains an up-to-date list for us
anyway (in 'contributors' page).

Test resizing

Fixed test after rebase with master

Added word wrapping on text field input

Fix for line calculation.

Added indentation for message lines

Fixed bug with Line::rendered_height not calculating based on timestamp and nick length

Implement wrapping in text field

Closes osa1#101

Update tests:

- Improve error reporting on test failure
- Use smaller screen in text_field_wrap tests, document screen size
- Combine multiple text_field_wrap tests in single test
  (not complete)

Test resizing

Formatting

Fixed test after rebase with master

Added word wrapping on text field input

Fix for line calculation.

Added indentation for message lines

Fixed bug with Line::rendered_height not calculating based on timestamp and nick length

- moved text_field to own module - input_area
- started making TextArea work like MsgArea, new InputLine like Line

Working more on wrapping...autocomplete still buggy

buffer remove fix.

Progress on wrapping, added some tests - need more

Autocompletion - hacky solution

Not resizing msg_area every draw - only on height change

Caching textarea height so that we only need to calculate lines on modify() or resize()
trevarj added a commit to trevarj/tiny that referenced this issue Jun 6, 2020
Closes osa1#101

Update tests:

- Improve error reporting on test failure
- Use smaller screen in text_field_wrap tests, document screen size
- Combine multiple text_field_wrap tests in single test
  (not complete)

Fix a few clippy warnings

tui: Implement methods for testing resizing

Allow servers to have aliases. Fixes osa1#186.

Remove outdated contributors list from README

We don't update it, and Github maintains an up-to-date list for us
anyway (in 'contributors' page).

Test resizing

Fixed test after rebase with master

Added word wrapping on text field input

Fix for line calculation.

Added indentation for message lines

Fixed bug with Line::rendered_height not calculating based on timestamp and nick length

Implement wrapping in text field

Closes osa1#101

Update tests:

- Improve error reporting on test failure
- Use smaller screen in text_field_wrap tests, document screen size
- Combine multiple text_field_wrap tests in single test
  (not complete)

Test resizing

Formatting

Fixed test after rebase with master

Added word wrapping on text field input

Fix for line calculation.

Added indentation for message lines

Fixed bug with Line::rendered_height not calculating based on timestamp and nick length

- moved text_field to own module - input_area
- started making TextArea work like MsgArea, new InputLine like Line

Working more on wrapping...autocomplete still buggy

buffer remove fix.

Progress on wrapping, added some tests - need more

Autocompletion - hacky solution

Not resizing msg_area every draw - only on height change

Caching textarea height so that we only need to calculate lines on modify() or resize()

Fixes after my bad rebase

Fixed nickname not showing on tiny window.

Fixed PR feedback:
- Nickname suffix is now static
- removed pub from some functions

Fixes for PR:
- Removes text_field_wrap config. Defaulting to text wrapping, falling
back to scroll when width is too small.
- Reverted indenting for message area.

Fixed issue with calculate_lines() where it would not correctly calculate when there were multi-line words.

Another rework. Exhaustive wrapping algorithm. Removed keeping track of white spaces. Added keeping track of line starts for easy wrapped drawing. No more crazy BTree insert/remove code.

Added fallback to scroll after input area is greater than half of the
screen height.
@osa1 osa1 closed this as completed in #200 Jun 7, 2020
osa1 pushed a commit that referenced this issue Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request libtiny_tui Issues/PRs related to the TUI library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants