Skip to content

Components should truncate long text #543

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

Closed
jvalkeal opened this issue Oct 6, 2022 · 0 comments · Fixed by #554
Closed

Components should truncate long text #543

jvalkeal opened this issue Oct 6, 2022 · 0 comments · Fixed by #554
Labels
type/enhancement Is an enhancement request
Milestone

Comments

@jvalkeal
Copy link
Contributor

jvalkeal commented Oct 6, 2022

Components context is not aware of a terminal width so it's not possible to truncate long text to do something like:

? testSimple [Use arrows to move], type to filter      
> key1                                                   
  key2                                                   
  key3 long long long long long                          
  key4 long long long long long long long long long l..

text spanning into next row in shell really mess things up.

@jvalkeal jvalkeal added the type/enhancement Is an enhancement request label Oct 6, 2022
@jvalkeal jvalkeal added this to the General Backlog milestone Oct 6, 2022
jvalkeal added a commit to jvalkeal/spring-shell that referenced this issue Oct 14, 2022
- BaseComponentContext has new field terminalWidth.
- StringToStyleExpressionRenderer contains new format
  for "truncate-" prefixes and this is something
  what template can use to instruct max length based
  on terminal width.
- Change single/multi selectors to use this feature.
- Fixes spring-projects#543
@jvalkeal jvalkeal modified the milestones: General Backlog, 3.0.0-M2 Oct 14, 2022
jvalkeal added a commit that referenced this issue Oct 14, 2022
- BaseComponentContext has new field terminalWidth.
- StringToStyleExpressionRenderer contains new format
  for "truncate-" prefixes and this is something
  what template can use to instruct max length based
  on terminal width.
- Change single/multi selectors to use this feature.
- Fixes #543
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Is an enhancement request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant