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

Support Kino.Input.textarea option to switch to monospace font #1565

Merged
merged 5 commits into from
Dec 6, 2022

Conversation

zolrath
Copy link
Contributor

@zolrath zolrath commented Dec 5, 2022

As inputs will be ingested and operated on by code, showing input as monospaced prevents confusion by presented the text the same way it would be displayed when assigned to a string in code.

Reference

image

Before

image

After

image

Alternatives

I have another branch that modifies Kino to allow a monospace option, allowing monospaced to be turned on/off on a textarea by textarea basis, but thought I would submit the simplest version first.

zolrath and others added 2 commits December 5, 2022 14:33
As inputs will be ingested and operated on by code, showing input as monospaced prevents confusion by presented the text the same way it would be displayed when assigned to a string in code.
@CLAassistant
Copy link

CLAassistant commented Dec 5, 2022

CLA assistant check
All committers have signed the CLA.

@josevalim
Copy link
Contributor

Yeah, I definitely think we want to make it opt-in as textarea are not always code specific.

@zolrath
Copy link
Contributor Author

zolrath commented Dec 5, 2022

Thought that might be the case, sounds good to me!

Combined with livebook-dev/kino#220 this allows for the monospace: true option to be passed to a Kino.Input.textarea, converting the font to the mono font stack.

image

@zolrath zolrath changed the title Make form inputs monospaced Allow Kino.Input.textarea option to switch to monospace font Dec 5, 2022
@zolrath zolrath changed the title Allow Kino.Input.textarea option to switch to monospace font Support Kino.Input.textarea option to switch to monospace font Dec 5, 2022
Copy link
Member

@jonatanklosko jonatanklosko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great, thanks! Please sign the CLA, so we can merge :)

lib/livebook_web/live/output/input_component.ex Outdated Show resolved Hide resolved
Co-authored-by: Jonatan Kłosko <[email protected]>
@zolrath
Copy link
Contributor Author

zolrath commented Dec 6, 2022

Sounds great, thanks! Please sign the CLA, so we can merge :)

✅ Signed!

Copy link
Member

@jonatanklosko jonatanklosko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jonatanklosko jonatanklosko merged commit e9d88ad into livebook-dev:main Dec 6, 2022
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

Uffizzi Preview Environment deployment-8562

☁️ https://app.uffizzi.com/github.com/livebook-dev/livebook/pull/1565

📄 View Application Logs etc.

What is Uffizzi? Learn more

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.

4 participants