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

placeholder feature #16

Merged
merged 1 commit into from Oct 1, 2023
Merged

placeholder feature #16

merged 1 commit into from Oct 1, 2023

Conversation

pm100
Copy link
Contributor

@pm100 pm100 commented Apr 29, 2023

in order to cleanly integrate tui-textarea into another tool (gitui https://github.com/extrawurst/gitui) I need this feature.

It is like the html input tag placeholder feature, text is displayed dimmed in the input box as a hint of what to enter. Once text is entered the hint is removed

placeholder

I had to slightly modify how the text and its surrounding block are displayed. it is very tricky to get precise control. over the text style of the paragraph and its containing block otherwise. I placed a link to the discussion about this topic with ratatui team. ratatui-org/ratatui#144

I added 2 samples of a popup dialog with the new feature. I also added it to the single_line sample as that seemed a good fit

@pm100
Copy link
Contributor Author

pm100 commented Jun 1, 2023

@rhysd any chance you could take a look at this PR?

@cd-a
Copy link

cd-a commented Aug 11, 2023

@rhysd this is blocking extrawurst/gitui#1662 (comment) - if you have a moment to have a look at this PR we would greatly appreciate it 😃

@rhysd
Copy link
Owner

rhysd commented Oct 1, 2023

This feature sounds reasonable. I'll do some follow up after merging this.

@rhysd rhysd merged commit 98a60e9 into rhysd:main Oct 1, 2023
@pm100 pm100 deleted the ghost branch October 11, 2023 21:25
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.

None yet

3 participants