mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 14:15:50 -06:00
[GH-ISSUE #68] Newline in Text #38
Labels
No labels
bug
documentation
enhancement
libui issue
pull-request
question
wait for libui implementation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/proton-native#38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mischnic on GitHub (Mar 23, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/68
libui correctly displays literal newline characters (
\n) in labels.This works:
This doesn't:
Results in some extra commas and an error message:
text , <line break>, textSo the children array needs to be properly joined when rendering.
@baoanhng commented on GitHub (Mar 27, 2018):
@mischnic You have to do it React way like this
@mischnic commented on GitHub (Mar 27, 2018):
Yes, that works (see the first code snippet above).
First result for "react native newline":
In normal React, it would be
<br/>.@kusti8 commented on GitHub (Mar 30, 2018):
I don't think I'm going to fix this. It's better in my opinion to do it as a simple multiline string, rather than that way.
@parro-it commented on GitHub (Mar 30, 2018):
How do you plan to manage non-hard lines break and indentation?
@kusti8 commented on GitHub (Mar 30, 2018):
In libui-node there isn't a way to wrap text right? And as for indenting the \t works fine.
@parro-it commented on GitHub (Mar 30, 2018):
Not at the moment, but there is an
uiNewMultilineEntryfunction that should return a wrappable multine text entry (I'm currently usinguiNewNonWrappingMultilineEntry).I'll add binding for that.
@parro-it commented on GitHub (Apr 11, 2018):
see https://github.com/parro-it/libui-node/issues/85