-
Notifications
You must be signed in to change notification settings - Fork 92
DT-3070: Add codec server form component #2797
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 8000 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rossnelson
wants to merge
10
commits into
main
Choose a base branch
from
codec-server-form
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement codec server configuration form using search-attributes-form as template: - Form fields: endpoint URL, access token toggle, CORS credentials toggle - Expandable custom error message and redirect link section - Smart visibility logic for custom fields when values are populated - Zod validation for required URL endpoints and optional custom links - Toggle switches for better UX instead of checkboxes - Tainted state tracking with badge on save button - SuperForms integration with dataType: 'json' and resetForm: false - Skeleton loading states matching existing patterns - API integration with codec adapter for OSS endpoints - Storybook documentation and examples - Direct imports (no barrel exports) for better tree shaking - Svelte 5 state management instead of legacy stores
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
- Use fetchSettings() from settings-service instead of direct API calls - Properly integrate with existing Settings type structure - Follow same pattern as other codec functionality in codebase - Clear messaging about development limitations vs actual functionality
- Remove namespace parameter from createCodecAdapter() for OSS - OSS operates at cluster level, Cloud will be namespace-scoped - Update messaging and documentation to reflect cluster-level scope - Prepare for future Cloud adapter implementation
Create FormMessage component to handle both form validation errors and status messages. Abstract TaintedBadge logic from duplicated implementations in both forms.
- Move form components to /form/ directory and rename for better organization - Make TaintedBadge and Message components "dumb" - accept resolved values instead of stores - Add comprehensive i18n translations for codec server form - Fix search attributes form reset function error - Clean up component interfaces with better prop naming (message -> value, formErrors -> errors) - Extract tainted count calculation to derived variables in parent components - Add proper TypeScript types for Alert intent
…ating - Replace custom HTML link with Holocene Link component for better consistency - Split endpoint description into prefix/suffix pattern for cleaner templating - Remove manual styling in favor of component defaults - Follow cloud-ui patterns for codec server endpoint links
GiantRobots
reviewed
Jul 1, 2025
passUserAccessToken: codecSettings?.passAccessToken || false, | ||
includeCrossOriginCredentials: codecSettings?.includeCredentials || false, | ||
customMessage: codecSettings?.customErrorMessage?.default?.message || '', | ||
customLink: codecSettings?.customErrorMessage?.default?.link || '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets prefer ?? over ||.
Move retry state and logic from callers into ApiError component itself. Components now pass retryConfig with retryFn instead of managing retry state externally. - Add internal retry state (retryCount, isRetrying) - Replace onRetry callback with retryConfig interface - Add loading state during retry operations - Simplify caller interface to config-based approach
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description & motivation 💭
Creates a reusable codec server configuration form following the established patterns from search- 8000 attributes-form. The implementation emphasizes component abstraction to reduce code duplication while maintaining clean separation of concerns.
Key architectural decisions include using the SuperForms + reactive adapter pattern for flexible data integration, extracting common form components (Message and TaintedBadge) to eliminate duplication between forms, and implementing smart section visibility where the custom error section automatically shows when values are populated.
The form integrates comprehensive i18n support with proper translation templating for HTML links, uses Zod schema validation for URL requirements and type safety, and includes tainted state tracking with visual feedback through badge indicators.
Screenshots (if applicable) 📸
Storybook stories available at Forms/Codec Server Form showing:
Storybook Links
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Manual Testing Steps
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
DT-3070
Docs
Any docs updates needed?
Component includes comprehensive MDX documentation in Storybook with usage examples and API reference.