Skip to content

Releases: Cratis/Components

Release v1.1.4

01 Mar 07:53
9af90db

Choose a tag to compare

Fixed

  • Simplifying CommandDialog to rely on CommandForm for all the heavy lifting and have very little custom logic. This removes quite a few challenges around validation inside it and fixes bugs where the isValid is not calculated correctly.

Release v1.1.3

28 Feb 08:13
abf4e10

Choose a tag to compare

Fixed

  • Removing unused and unsupported CommandDialog.Fields property - this is in alignment with CommandForm from Arc.

Release v1.1.2

27 Feb 15:00
a66d74d

Choose a tag to compare

Fixed

  • Standardizing styles a bit more as a package vendor.

Release v1.1.1

27 Feb 14:08
4ed5fec

Choose a tag to compare

Fixed

  • Including compiled styles in the package for a better "out-of-the-box" experience and everything looking good when used in an app. Pre-requisitve is still PrimeReact.

Release v1.1.0

27 Feb 10:13
cbb895c

Choose a tag to compare

Added

  • Floating toolbar component for use in editors like whiteboards or similar.

Release v1.0.5

26 Feb 14:47
12ae337

Choose a tag to compare

CommandForm always runs silent client validation on init, but CommandDialog only derived button validity from commandResult — which is only populated on explicit submit or when validateOnInit: true is set. This meant the Primary/Confirm button remained enabled even when the form was initially invalid.

Fixed

  • CommandDialogWrapper: Replace manual validity computation (!commandResult || commandResult.isValid) with isValid from useCommandFormContext

The context's isValid already accounts for both commandResult and silentValidationResult (the silent init validation result), so this single-line change is sufficient:

// Before
const { setCommandValues, setCommandResult, commandResult } = useCommandFormContext<TCommand>();
const isDialogValid = !commandResult || commandResult.isValid;

// After
const { setCommandValues, setCommandResult, isValid } = useCommandFormContext<TCommand>();
const isDialogValid = isValid;
Original prompt

This section details on the original issue you should resolve

<issue_title>Fix CommandDialog to honor the initial load state from the CommandForm</issue_title>
<issue_description>In ComamndForm we silently run all client validation on init:
https://www.cratis.io/docs/Arc/frontend/react/commands/command-form/validation.html#silent-validation-on-load

This should be reflected in the CommandDialog, meaning that "Primary" buttons should automatically be disabled if things aren't valid.</issue_description>

Comments on the Issue (you are @copilot in this section)

  • Fixes #4

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Release v1.0.4

25 Feb 07:56
739e1e6

Choose a tag to compare

Merge pull request #1 from Cratis:fix/command-dialog

Fix/command-dialog

Release v1.0.3

22 Feb 12:27

Choose a tag to compare

No release notes

Release v1.0.2

22 Feb 12:20

Choose a tag to compare

No release notes

Release v1.0.1

22 Feb 12:12

Choose a tag to compare

No release notes