feat: Key-value pair view for environment[INS-4256]#8071
Conversation
ee16325 to
7578f6c
Compare
ihexxa
left a comment
There was a problem hiding this comment.
Had review as pass 1 and will do more checks later.
| kvPair.push({ | ||
| id: generateId('envPair'), | ||
| name: key, | ||
| value: isValObject ? JSON.stringify(val) : String(val), |
There was a problem hiding this comment.
JSON.stringify may not work with nunjucks tags as values.
| id: string; | ||
| name: string; | ||
| value: string; | ||
| type: EnvironmentKvPairDataType; |
There was a problem hiding this comment.
Can we infer the data types for other primitives like number, boolean etc?
Currently if I add a number or boolean it is recognized as string in the table editor.
This might be difficult if we try to infer nunjucks templates that are not inside quotes but not quite sure about it.
| }, | ||
| ]; | ||
|
|
||
| const renderPairItem = (kvPair: EnvironmentKvPairData) => { |
There was a problem hiding this comment.
Maybe we should turn this into a component in the module scope?
| }, []); | ||
|
|
||
| return ( | ||
| <div className="p-[--padding-sm] min-w-max h-full overflow-hidden flex flex-col"> |
There was a problem hiding this comment.
Looks like there is extra padding around the toolbar. If we want we could add padding in the key-value editor ListBox bellow
| <div className="p-[--padding-sm] min-w-max h-full overflow-hidden flex flex-col"> | |
| <div className="min-w-max h-full overflow-hidden flex flex-col"> |
There was a problem hiding this comment.
OK, will remove the padding for toolbar
2.add message for duplicate items
2.Set default folder environment type to be key-value pair
7d5f4c6 to
c239fbe
Compare

Highlight and Changes:
Add new KV-pair view for environment