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

Text input widget #37

Merged
merged 15 commits into from
Nov 5, 2019
Merged

Text input widget #37

merged 15 commits into from
Nov 5, 2019

Conversation

hecrj
Copy link
Member

@hecrj hecrj commented Nov 2, 2019

Depends on #35. Fixes #25.

Text input section in tour example

This PR adds a TextInput widget that can be used to allow users to interact with the application by inputting text. It features:

  • Basic cursor movement. The arrow keys can be used to move the cursor between each char. It does not account for graphemes yet!
  • An on_submit method to produce a message when the Enter key is pressed while the input is focused.
  • Placeholder support.
  • Configurable padding, width, and size.

Pending work

  • Implement cursor-based horizontal scrolling when the content overflows.

@hecrj hecrj added the feature New feature or request label Nov 2, 2019
@hecrj hecrj added this to the 0.1.0 milestone Nov 2, 2019
@hecrj hecrj self-assigned this Nov 2, 2019
@hecrj hecrj mentioned this pull request Nov 3, 2019
2 tasks
@hecrj hecrj merged commit da2717c into master Nov 5, 2019
@hecrj hecrj deleted the feature/text-input branch November 5, 2019 20:57
@victorstewart
Copy link

victorstewart commented Apr 23, 2020

Any thoughts on...

  • emoji support
  • ability to calculate the size of a string contains emojis and line breaks
  • a flag to just resize font to accommodate the element width once boundary is reached
  • letting the field grow to accommodate lengthy input
  • attributes for the inputed text to be displayed with (color, spacing, alignment etc)

and I assume there's some easy way to launch the keyboard on iOS when you begin editing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text input widget
2 participants