Commit 6435b33
authored
Fix 3296 by adjusting buttons location for the array field toolbar (#4859)
* Fix 3296 by adjusting buttons location for the array field toolbar
Fixed #3296 by updating `ArrayFieldItemTemplateProps` to add `displayLabel` and `hasDescription` and using them in the themes to adjust buttons location
- In `@rjsf/utils`, updated `ArrayFieldItemTemplateProps` to add `displayLabel` and `hasDescription` flags
- In `@rjsf/core`, updated `ArrayField` to compute and pass `displayLabel` and `hasDescription` flags
- Updated `ArrayFieldItemTemplate` to use `displayLabel` and `hasDescription` to adjust buttons location
- Also fixed bug where `StringField` was not using the `title` passed to it as found in `mantine` theme
- In `@rjsf/antd`, updated `ArrayFieldItemTemplate` and `ArrayFieldTemplate` to adjust sizes and buttons location using `displayLabel` and `hasDescription`
- In `@rjsf/chakra-ui`, updated snapshots due to `StringField` fix
- In `@rjsf/daisyui`, updated `ArrayFieldItemTemplate` to adjust buttons location using `displayLabel` and `hasDescription`
- Also updated `WrapIfAdditionalTemplate` and `BaseInputTemplate` to make the inputs full width
- Also updated `FieldTemplate` to render the `description` which was missing in the theme
- In `@rjsf/fluentui-rc`, updated `ArrayFieldItemTemplate` to adjust buttons location using `displayLabel`
- Also updated `WrapIfAdditionalTemplate` to add `flexGrow` to allow the array item fields to grow properly for non-container elements
- In `@rjsf/mantine`, updated `utils.ts` to add `label` to the cleanup fields to filter it from the `uiOptions`
- Also updated `BaseInputTemplate` to display `description` which was missing in the theme
- Also updated `ArrayFieldTitleTemplate` to support the `optionalData`
- In `@rjsf/mui`, updated `ArrayFieldItemTemplate` to adjust buttons location using `displayLabel` and `hasDescription`
- In `@rjsf/primereact`, updated `ArrayFieldItemTemplate` to adjust buttons location using `displayLabel`
- In `@rjsf/react-bootstrap`, updated `ArrayFieldItemTemplate` to adjust buttons location using `displayLabel` and `hasDescription`
- Also, updated `ArrayFieldTemplate` to improve it's responsiveness in relation to the `ArrayFieldItemTemplate` changes
- In `@rjsf/semantic-ui`, updated `ArrayFieldItemTemplate` to adjust buttons location using `displayLabel` and `hasDescription`
- In `@rjsf/shadcn`, updated `ArrayFieldItemTemplate` to adjust buttons location using `displayLabel` and `hasDescription`
- Also updated `ArrayFieldTemplate` to add `justify-end` to the `AddButton` rendering
- Updated all snapshots due to above changes
- Updated `uiSchema.md` in the docs to document the new `enableMarkdownInHelp` flag from previous PR
- Updated the `CHANGELOG.md` accordingly
* Update packages/mantine/src/templates/BaseInputTemplate.tsx
* - Updated snapshots
* - Restored space in `classNames` that was accidentally removed1 parent 47c8513 commit 6435b33
File tree
60 files changed
+3499
-2290
lines changed- packages
- antd
- src/templates
- ArrayFieldItemTemplate
- ArrayFieldTemplate
- test/__snapshots__
- chakra-ui/test/__snapshots__
- core
- src/components
- fields
- templates
- ButtonTemplates
- test/__snapshots__
- daisyui
- src/templates
- ArrayFieldItemTemplate
- BaseInputTemplate
- FieldTemplate
- WrapIfAdditionalTemplate
- test/__snapshots__
- docs/docs/api-reference
- fluentui-rc
- src
- ArrayFieldItemTemplate
- WrapIfAdditionalTemplate
- test/__snapshots__
- mantine
- src
- templates
- test/__snapshots__
- mui
- src/ArrayFieldItemTemplate
- test/__snapshots__
- primereact
- src/ArrayFieldItemTemplate
- test/__snapshots__
- react-bootstrap
- src
- ArrayFieldItemTemplate
- ArrayFieldTemplate
- test/__snapshots__
- semantic-ui
- src/ArrayFieldItemTemplate
- test/__snapshots__
- shadcn
- src
- ArrayFieldItemTemplate
- ArrayFieldTemplate
- test/__snapshots__
- utils/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
60 files changed
+3499
-2290
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 25 | + | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
32 | | - | |
| 29 | + | |
33 | 30 | | |
34 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | | - | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | | - | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
47 | 56 | | |
48 | | - | |
| 57 | + | |
49 | 58 | | |
50 | 59 | | |
| 60 | + | |
51 | 61 | | |
52 | | - | |
| 62 | + | |
53 | 63 | | |
54 | 64 | | |
| 65 | + | |
55 | 66 | | |
56 | | - | |
| 67 | + | |
57 | 68 | | |
58 | 69 | | |
| 70 | + | |
| 71 | + | |
59 | 72 | | |
60 | | - | |
| 73 | + | |
61 | 74 | | |
62 | 75 | | |
| 76 | + | |
63 | 77 | | |
64 | | - | |
| 78 | + | |
65 | 79 | | |
66 | 80 | | |
| 81 | + | |
| 82 | + | |
67 | 83 | | |
68 | 84 | | |
69 | 85 | | |
70 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
71 | 91 | | |
| 92 | + | |
72 | 93 | | |
73 | 94 | | |
74 | 95 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
0 commit comments