-
Notifications
You must be signed in to change notification settings - Fork 66
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 multiline env vars #4069
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4069 +/- ##
=======================================
Coverage 78.72% 78.72%
=======================================
Files 284 284
Lines 13009 13009
Branches 2897 2897
=======================================
Hits 10241 10241
Misses 2768 2768
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@joepavitt, when trying out, please use a file created by a regular macos text editor (so that is creates newlines in native OS format). Here is some sample data: BASIC=basic
# prev line deliberately blank
AFTER_BLANK=after_blank
EMPTY=
SINGLE_QUOTES='single_line_single_line'
SINGLE_QUOTES_SPACED=' single quotes single line untrimmed '
DOUBLE_QUOTES="double_quotes_single_line"
DOUBLE_QUOTES_SPACED=" double quotes single line untrimmed "
NEWLINES_QUOTED="expand\nnew\nlines"
NEWLINES_SINGLED_QUOTED='expand\nnew\nlines'
DONT_EXPAND=dont\\nexpand\\nescpated\\nnewlines
# COMMENTS=excludes comment that looks like a key-value pair
EQUAL_SIGNS=handles_equals=sign
JSON_UNQUOTED={"foo": "bar"}
JSON_QUOTED='{"foo": "bar"}'
JSON_MULTILINE='{
"foo": "bar"
}'
TRIM_SPACE_FROM_UNQUOTED= some spaced out string
USERNAME=therealnerdybeast@example.tld
SPACED_KEY = should be trimmed
MULTI_DOUBLE_QUOTED="THIS IS A
MULTILINE
STRING"
MULTI_SINGLE_QUOTED='THIS IS A
MULTILINE
STRING'
MULTI_WITH_BLANK_AND_COMMENT="SHOULD
KEEP EMPTY
AND KEEP LINE STARTING WITH #
# a line starting with a hash
WHEN IT IS QUOTED" |
closes #3972
Description
TLDR;
Permit user to input multiline env vars by using
textarea
instead of standardinput
fields. Adjusts the view/styling to ensure faithful representation (usingwhitespace: pre
) any new lines while constraining width/hieght limits (and adding auto scroll bars where necessary). Permits import of dotenv compatible data.DETAILS:
textArea
controldefault
cursor to clarify what is/isnt editablenode
packagedotenv
in that multiline strings are wrapped in quotes, comments and empty lines are discarded.Screenshots
Before
template
non template
After
template
non template
fix empty table layout bug when editing template env vars
This commit was an opportunity to fix this layout issue:
Related Issue(s)
#3972
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
area:migration
label