Skip to content

feat(ENG-295): Support dynamic type alert in configFields#153

Open
sourabh-stackone wants to merge 5 commits into
StackOneHQ:mainfrom
sourabh-stackone:ENG-295/Support_dynamic_type_alert_in_config_and_setupFields
Open

feat(ENG-295): Support dynamic type alert in configFields#153
sourabh-stackone wants to merge 5 commits into
StackOneHQ:mainfrom
sourabh-stackone:ENG-295/Support_dynamic_type_alert_in_config_and_setupFields

Conversation

@sourabh-stackone
Copy link
Copy Markdown

@sourabh-stackone sourabh-stackone commented May 11, 2026

Applied Alert configField here in HiBob Connector: https://github.com/StackOneHQ/connectors/pull/1713#top

Copilot AI review requested due to automatic review settings May 11, 2026 05:57
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for a new non-input connector config field type (alert) so connector configs can display informational/warning messages in the integration picker UI without being treated as form inputs/validation targets.

Changes:

  • Extend ConnectorConfigField to support type: 'alert' and alertType.
  • Render alert fields via the Malachite <Alert /> component (including when there are no input fields).
  • Exclude alert fields from the generated Zod form schema.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/modules/integration-picker/utils/zodSchema.ts Skips alert fields when building the Zod object schema.
src/modules/integration-picker/types.ts Extends connector field typing to include alert + alertType.
src/modules/integration-picker/components/IntegrationFields.tsx Renders alert fields in the form and in the no-input-fields state.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/integration-picker/components/IntegrationFields.tsx Outdated
Comment thread src/modules/integration-picker/components/IntegrationFields.tsx Outdated
Comment thread src/modules/integration-picker/types.ts Outdated
Typography,
} from '@stackone/malachite';
import { useEffect, useMemo, useRef, useState } from 'react';
import { Fragment, useEffect, useMemo, useRef, useState } from 'react';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fragment is imported but never used in this file — Biome will fail this on lint.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed unused imports

@@ -309,7 +322,7 @@ export const IntegrationForm: React.FC<IntegrationFieldsProps> = ({
}, [isValid, onValidationChange]);

if (fields.length === 0) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Edge case: this guard uses fields.length, but displayedFields (fields with display !== false) can still be empty when fields.length > 0. When that happens fieldKeys is [], so firstKey/lastKey are undefined and no top or bottom notices render anywhere — they're silently dropped. Consider switching the guard to displayedFields.length === 0 so NoFieldsView (which renders top notices) takes over.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated.

flexDirection: 'column',
gap: '8px',
width: '100%',
}}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This wrapper used to be <div style={{ width: '100%' }}> and is now flex column with gap: 8px applied unconditionally. That changes vertical spacing for every field, even ones with no notices attached. Worth a visual QA pass across existing integrations to make sure nothing regresses — or only apply the flex/gap styles when there are notices to render.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated.

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