Skip to content

Fix categorization stepper step order index, introduce new composition function for vue, fix config to be properly passed to test functions#2522

Open
kchobantonov wants to merge 29 commits into
eclipsesource:masterfrom
kchobantonov:fix-categorization-stepper-step-order-index
Open

Fix categorization stepper step order index, introduce new composition function for vue, fix config to be properly passed to test functions#2522
kchobantonov wants to merge 29 commits into
eclipsesource:masterfrom
kchobantonov:fix-categorization-stepper-step-order-index

Conversation

@kchobantonov
Copy link
Copy Markdown
Contributor

@kchobantonov kchobantonov commented Dec 28, 2025

  1. Make sure that category stepper is working correctly when making categories visible/hidden.
  2. Introduce new composition functions in vue package (moved and enhanced from the vue-vuetify package) that are useful for vue and not related to vuetify
  3. Fix the DispatchRenderer and DispatchCell to use the resolved config and pass that to the TestContext - otherwise since there is not mapping for the config whenever the or are called the config inside the testers is always undefined.

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 28, 2025

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit f9ef99e
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/69fb7cb4a83ede0009588daf
😎 Deploy Preview https://deploy-preview-2522--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kchobantonov
Copy link
Copy Markdown
Contributor Author

kchobantonov commented Dec 28, 2025

@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
@kchobantonov kchobantonov changed the title Fix categorization stepper step order index Fix categorization stepper step order index, introduce new composition function for vue, fix config to be properly passed to test functions Dec 30, 2025
@kchobantonov
Copy link
Copy Markdown
Contributor Author

@sdirix updated the PR with some other fixed that I have documented in the description.

@coveralls
Copy link
Copy Markdown

coveralls commented Jan 27, 2026

Coverage Status

coverage: 82.959%. remained the same — kchobantonov:fix-categorization-stepper-step-order-index into eclipsesource:master

Copy link
Copy Markdown
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
  • useMask reactivity fix in Date/Time/DateTime controls
  • clearable behavior change (AND with enabled)
  • controlWrapper source change (using overwrittenControl instead of input.control)
  • undefined -> null type fixes in picker values
  • activator="parent" removal from menus
  • DateTime onPickerChange rewrite
  • 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.

Comment thread packages/vue-vuetify/src/controls/DateControlRenderer.vue Outdated
Comment thread packages/vue/src/jsonFormsCompositions.ts Outdated
Comment thread packages/vue/src/jsonFormsCompositions.ts Outdated
@kchobantonov kchobantonov requested a review from sdirix March 5, 2026 15:19
@kchobantonov
Copy link
Copy Markdown
Contributor Author

@sdirix all fixed and added comment above for the need of
const jsonforms = optional === true ? useJsonForms(true) : useJsonForms();

@sdirix
Copy link
Copy Markdown
Member

sdirix commented Apr 6, 2026

I will take a look at this PR again next week

Comment thread packages/vue/src/jsonFormsCompositions.ts Outdated
Comment thread packages/vue-vuetify/src/layouts/CategorizationStepperRenderer.vue
Comment thread packages/vue-vuetify/src/layouts/CategorizationStepperRenderer.vue
@kchobantonov kchobantonov requested a review from sdirix May 6, 2026 17:39
@kchobantonov
Copy link
Copy Markdown
Contributor Author

@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"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'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?"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants