-
Notifications
You must be signed in to change notification settings - Fork 3k
fix: BROS-193: Follow up fixes #8057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
… anything changed
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8057 +/- ##
===========================================
- Coverage 70.37% 65.89% -4.48%
===========================================
Files 719 505 -214
Lines 51023 33494 -17529
Branches 8621 8621
===========================================
- Hits 35906 22070 -13836
+ Misses 15114 11421 -3693
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pull request introduces updates to the
StorageProviderForm
and related components, focusing on improving edit mode handling, validation logic, and error display. Key changes include enhancements to provider configuration, the addition of debug logging, and adjustments to schema handling for optional fields.Improvements to edit mode handling:
web/libs/app-common/src/blocks/StorageProviderForm/hooks/useStorageForm.ts
: Added logic to wait for provider registry initialization and debug logging for missing provider configurations in edit mode. Updated form data initialization to handle optional fields more robustly. [1] [2] [3]web/libs/app-common/src/blocks/StorageProviderForm/index.tsx
: Updatedtype
state initialization to use storage type or provider in edit mode. Added synchronization offormData.provider
withtype
in edit mode. [1] [2]Validation and schema enhancements:
web/libs/app-common/src/blocks/StorageProviderForm/types/provider.ts
: Adjusted schema generation to make optional fields nullable and optional, improving handling of null values from the server.web/libs/app-common/src/blocks/StorageProviderForm/hooks/useStorageForm.ts
: Simplified validation reset logic to trigger on any field change instead of specific connection fields.Error handling and display improvements:
web/libs/app-common/src/blocks/StorageProviderForm/index.tsx
: Added anInlineError
component for better error visibility in the form UI.web/libs/app-common/src/blocks/StorageProviderForm/components/field-renderer.tsx
: Updated error-related CSS class to use a more descriptive name (border-negative-content
).Provider configuration updates:
web/libs/app-common/src/blocks/StorageProviderForm/providers.ts
: Ensured provider names are stored in lowercase in the registry for consistency.web/libs/app-common/src/blocks/StorageProviderForm/hooks/useStorageForm.ts
: Added support for theproviderRegistry
to manage dynamic provider configurations.Removed redundant code:
web/libs/app-common/src/blocks/StorageProviderForm/Steps/preview-step.tsx
,provider-details-step.tsx
: Removed unusedInlineError
imports and instances. [1] [2] [3] [4]web/libs/app-common/src/blocks/StorageProviderForm/components/provider-grid.stories.tsx
: Removed outdated Storybook stories forProviderGrid
.