Fix categorization stepper step order index, introduce new composition function for vue, fix config to be properly passed to test functions#2522
Conversation
…hole to not affect the index based on visible catogories only
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@sdirix please review - this is fixing an issue with categorization where when we make categories visible/hidden then the tag/view is switched - the example is here - https://deploy-preview-2522--jsonforms-examples.netlify.app/vue-vuetify/#categorization-stepper-nav-buttons - note that when you select/deselect "Provide Address" or "Vegetarian" you are still on the same tab and that does not change Also some type information for the Date/Time/DateTime renderers are fixed since the build was failing and also the vuetify library is updated |
…config since the config is not been passed when <dispatch-renderer> or <dispatch-cell> are called
…ue package - like useJsonForms. change all placed to use the new composition functions
|
@sdirix updated the PR with some other fixed that I have documented in the description. |
sdirix
left a comment
There was a problem hiding this comment.
The changes overall look good!
Note that the PR title says "Fix categorization stepper step order index, introduce new composition function for vue, fix config to be properly passed to test functions" but it actually also includes:
- Vuetify version bump (3.9 -> 3.11)
useMaskreactivity fix in Date/Time/DateTime controlsclearablebehavior change (AND withenabled)controlWrappersource change (usingoverwrittenControlinstead ofinput.control)undefined->nulltype fixes in picker valuesactivator="parent"removal from menus- DateTime
onPickerChangerewrite - min/max exclusive fix for DateTimeControlRenderer
These are all independent fixes. Splitting into separate PRs would make each easier to review. This PR contained so much again that I pushed reviewing too later to when I have more time.
…t parameter as it was before then that is gurantee to return JsonFormsSubStates and not JsonFormsSubStates | undefined while if we use that change we need to check for undefined
|
@sdirix all fixed and added comment above for the need of |
|
I will take a look at this PR again next week |
|
@sdirix changes are done - please review again - thanks |
| <v-tab | ||
| v-for="(_, index) in visibleCategories" | ||
| :key="`${layout.path}-${visibleCategories.length}-${index}`" | ||
| v-for="entry in visibleCategoriesWithIndex" |
There was a problem hiding this comment.
When the active tab's neighbour becomes hidden, the tab strip ends up with no visually selected tab because this is still position based.
| if (date) { | ||
| // the format is exclusive | ||
| date = date.add(1, 'second'); | ||
| date = date.add(1, this.useSeconds ? 'second' : 'minutes'); |
There was a problem hiding this comment.
'minutes' (plural) mixed with 'second' (singular) is inconsistent with the rest of this file, which uses 'minute' and 'second'.
|
|
||
| if (!jsonforms && !optional) { | ||
| throw new Error( | ||
| "'jsonforms couldn't be injected. Are you within JSON Forms?" |
There was a problem hiding this comment.
Pre-existing typo carried over from vue-vuetify: missing closing single quote after jsonforms. Same problem on lines 558, 578, 600 for useDispatch, useTranslator, useAjv. Worth fixing while you're already touching this code.
| return jsonforms!.i18n!.translate!; | ||
| }); | ||
|
|
||
| return translate; |
There was a problem hiding this comment.
When optional=true and no jsonforms is injected, this still returns the computed (the overload says ComputedRef<Translator> | undefined, but the body always returns translate). Accessing .value then dereferences jsonforms!.i18n!.translate! on undefined and throws. That breaks the use case in ValidationBadge.vue, which previously got a clean null and now will throw the first time the template evaluates t. Return undefined early when jsonforms (or its translator) is missing in the optional path.
Uh oh!
There was an error while loading. Please reload this page.