You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f654104
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: dwertheimer.Forms/CHANGELOG.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,29 @@
4
4
5
5
See Plugin [README](https://github.com/NotePlan/plugins/blob/main/dwertheimer.Forms/README.md) for details on available commands and use case.
6
6
7
+
## [1.0.26] 2026-02-08 @dwertheimer
8
+
9
+
### Added
10
+
-**Frontmatter Key Chooser value separator**: When not returning as array, the Frontmatter Key Chooser supports a `valueSeparator` option: `comma` (value1,value2), `commaSpace` (value1, value2 — default for readability), or `space` (value1 value2). Form Builder includes a Value Separator dropdown; type definitions, renderer, test examples, and docs updated.
11
+
12
+
### Fixed
13
+
-**FolderChooser displays all folders**: Folder chooser (e.g. in form fields) now shows all folders instead of the default 25. Uses `maxResults: 0` so the dropdown shows the full list with scrolling.
14
+
-**SpaceChooser WebView error (isMounted)**: Fixed `ReferenceError: Can't find variable: isMounted` in SpaceChooser. The `useEffect` referenced `isMounted` which was only defined inside `loadSpaces`; added `isMountedRef` and proper mount tracking (matches FolderChooser, TagChooser, MentionChooser pattern).
15
+
-**SpaceChooser Private option displays blank**: Selecting "Private" (id: empty string) in the space chooser now correctly shows "Private" in the text field instead of blank. SearchableChooser previously skipped the display lookup when `displayValue` was falsy (empty string); now allows lookup when `value` is set (including `''` for empty-id items).
16
+
17
+
### Edited in this release
18
+
-`helpers/react/DynamicDialog/FolderChooser.jsx` — Set `maxResults: 0` in SearchableChooser config so all folders are shown (unlimited, scroll).
19
+
-`helpers/react/DynamicDialog/SpaceChooser.jsx` — Added `isMountedRef` and mount-tracking effect; replaced `isMounted` references with `isMountedRef.current` in `loadSpaces` and load effect.
20
+
-`helpers/react/DynamicDialog/SearchableChooser.jsx` — Allow display-value lookup when `value` is `''` (not just truthy); condition changed from `displayValue && ...` to `value !== undefined && value !== null && ...`.
21
+
-`helpers/react/DynamicDialog/ContainedMultiSelectChooser.jsx` — Added `valueSeparator` prop (`'comma'` | `'commaSpace'` | `'space'`) and join/parse logic for string output.
22
+
-`helpers/react/DynamicDialog/FrontmatterKeyChooser.jsx` — Added `valueSeparator` prop, default `'commaSpace'`; pass-through to ContainedMultiSelectChooser.
23
+
-`helpers/react/DynamicDialog/DynamicDialog.jsx` — Added `valueSeparator` to TSettingItem.
24
+
-`helpers/react/DynamicDialog/dialogElementRenderer.js` — Extract and pass `valueSeparator` for frontmatter-key-chooser.
25
+
-`dwertheimer.Forms/src/components/FieldEditor.jsx` — Value Separator dropdown for frontmatter-key-chooser (comma / comma+space / space).
"plugin.lastUpdateInfo": "FolderChooser now shows all folders. Frontmatter Key Chooser supports valueSeparator option -- space, comma, or commaSpace. Thx @jgclark!",
10
10
"plugin.description": "Dynamic Forms for NotePlan using Templating -- fill out a multi-field form and have the data sent to a template for processing",
description: 'Multi-select chooser for frontmatter key values. Returns comma-separated string like "value1,value2". Key is fixed to "status".',
1289
+
description: 'Multi-select chooser for frontmatter key values. Returns string like "value1,value2" (valueSeparator: commaSpace). Key is fixed to "status".',
<divclassName="field-editor-help">If checked, returns selected values as an array. Otherwise, returns as comma-separated string.</div>
1552
+
<divclassName="field-editor-help">If checked, returns selected values as an array. Otherwise, returns as string (format set by Value Separator below).</div>
1553
+
</div>
1554
+
<divclassName="field-editor-row">
1555
+
<label>Value Separator (when not returning array):</label>
Copy file name to clipboardExpand all lines: helpers/react/DynamicDialog/CREATING_NEW_DYNAMICDIALOG_FIELD_TYPES.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,7 @@ export type TSettingItem = {
52
52
- `includePattern?:string`
53
53
- `excludePattern?:string`
54
54
- `returnAsArray?:boolean`
55
+
- `valueSeparator?:'comma'|'commaSpace'|'space'` (for string output: comma, comma+space, or space-separated)
55
56
- `defaultChecked?:boolean`
56
57
- `maxHeight?:string`
57
58
@@ -278,7 +279,7 @@ If your field has custom properties that need to be edited in the Form Builder,
278
279
) :null}
279
280
```
280
281
281
-
Look for similar patterns in the file for other field types to see how to add editor UI.
282
+
For `frontmatter-key-chooser`, the Form Item Editor includes a **Value Separator** dropdown (when not returning as array): Comma (no space), Comma with space, or Space. Look for similar patterns in the file for other field types to see how to add editor UI.
282
283
283
284
### 7. Test/Examples
284
285
@@ -315,6 +316,15 @@ Add examples to the `testFormFields` array. Create a new heading/section for you
315
316
description: 'Example returning array format',
316
317
returnAsArray: true,
317
318
},
319
+
{
320
+
type: 'your-new-type',
321
+
label: 'Your New Chooser (Comma+space string)',
322
+
key: 'testYourNewChooserCommaSpace',
323
+
placeholder: 'Type to search...',
324
+
description: 'Example with valueSeparator: commaSpace (e.g. "a, b, c")',
325
+
returnAsArray: false,
326
+
valueSeparator: 'commaSpace',
327
+
},
318
328
// ... add more examples for each important parameter
319
329
```
320
330
@@ -324,8 +334,8 @@ Add examples to the `testFormFields` array. Create a new heading/section for you
324
334
- Include examples for:
325
335
- Basic usage
326
336
- Each custom property/parameter
327
-
- Different return formats (string vs array, if applicable)
328
-
- Different states (default checked, with filters, etc.)
337
+
- Different return formats (string vs array, if applicable) and string separator options (`valueSeparator`: comma, commaSpace, space) for choosers that support it (e.g. `frontmatter-key-chooser`)
338
+
- Different states (default checked, with filters, etc.)
329
339
- Use descriptive keys like `testYourNewChooser`, `testYourNewChooserCustom`, etc.
330
340
- Include helpful descriptions explaining what each example demonstrates
331
341
@@ -351,7 +361,7 @@ The `tag-chooser` and `mention-chooser` field types serve as complete reference
351
361
2.**Dynamic Data Loading**: Both load data via `requestFromPlugin('getHashtags')` / `requestFromPlugin('getMentions')`
352
362
3.**Memoization**: `getItemDisplayLabel` functions are wrapped in `useCallback`
353
363
4.**Prefix Handling**: Components handle adding/removing prefixes (`#` for tags, `@` for mentions)
354
-
5.**Return Formats**: Support both string (comma-separated) and array return formats via `returnAsArray` prop
364
+
5.**Return Formats**: Support both string and array return formats via `returnAsArray` prop. When returning a string, `valueSeparator` controls how multiple values are joined: `'comma'` (no space), `'commaSpace'` (comma + space for readability), or `'space'` (space-separated).
355
365
6.**Default State**: Support `defaultChecked` to pre-select all items
356
366
7.**Filtering**: Support `includePattern` and `excludePattern` for regex-based filtering
357
367
@@ -399,7 +409,7 @@ After creating your new field type, verify:
399
409
-[ ] Request handler is added to `handleRequest` switch (if needed)
400
410
-[ ] Field type is added to `FIELD_TYPES` array
401
411
-[ ] Editor UI is added to `FieldEditor` (if custom properties)
402
-
-[ ] Examples are added to `FormFieldRenderTest.js`
412
+
-[ ] Examples are added to `FormFieldRenderTest.js` (including valueSeparator variants if the field returns a string of multiple values)
403
413
-[ ] Component handles loading/error/empty states
404
414
-[ ] Component properly memoizes functions (if needed) - note: `requestFromPlugin` is already memoized in parent
405
415
-[ ] Component passes `requestFromPlugin` if needed
},[filteredItems.length,defaultChecked,value,returnAsArray])// Only check filteredItems.length, not filteredItems itself. onChange/getItemDisplayLabel are stable or handled elsewhere
138
+
},[filteredItems.length,defaultChecked,value,returnAsArray,joinSeparator])// Only check filteredItems.length, not filteredItems itself. onChange/getItemDisplayLabel are stable or handled elsewhere
130
139
131
140
// Parse value prop to get selected values and sync selectedValues
132
141
// Only sync from value prop if it's different from what we last synced (to avoid loops)
@@ -181,8 +190,11 @@ export function ContainedMultiSelectChooser({
181
190
// Remove duplicates
182
191
parsed=Array.from(newSet(cleaned))
183
192
}else{
184
-
// If string, split by comma and extract item names
Copy file name to clipboardExpand all lines: helpers/react/DynamicDialog/DynamicDialog.jsx
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -206,6 +206,7 @@ export type TSettingItem = {
206
206
allowCreate?: boolean,// for tag-chooser and mention-chooser, if true, show "+New" button to create new items (default: true)
207
207
singleValue?: boolean,// for tag-chooser, mention-chooser, and frontmatter-key-chooser, if true, allow selecting only one value (no checkboxes, returns single value) (default: false)
208
208
renderAsDropdown?: boolean,// for tag-chooser, mention-chooser, and frontmatter-key-chooser, if true and singleValue is true, render as dropdown-select instead of filterable chooser (default: false)
209
+
valueSeparator?: 'comma'|'commaSpace'|'space',// for frontmatter-key-chooser (and choosers using ContainedMultiSelectChooser): when returnAsArray false, how to join values: 'comma'=no space, 'commaSpace'=comma+space, 'space'=space-separated
209
210
// frontmatter-key-chooser options
210
211
frontmatterKey?: string,// for frontmatter-key-chooser, the frontmatter key to get values for (can be fixed or from sourceKeyKey)
211
212
sourceKeyKey?: string,// Value dependency: for frontmatter-key-chooser, key of another field to get the frontmatter key from dynamically
0 commit comments