Skip to content
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

🪟 🔧 Use experiment for new streams table design #21230

Merged
merged 2 commits into from
Jan 11, 2023

Conversation

edmundito
Copy link
Contributor

What

Resolves #20196

Updates flagging for new table design to use LaunchDarkly experiment.

How

Creates a helper hook that checks for the experiment or the current env variable. While there is work to make this easier, I decided to use this custom solution to enable this in cloud sooner.

Some changes were made to how the validationSchema was created to use the hook. Creating the schema validation is also a hook so that the flags and experiments don't need to be passed directly.

tidyConnectionFormValues also now takes the generated validation schema instead of re-generating it.

Recommended reading order

Top top bottom

* Update formConfig validationSchema to use a hook to get the feature flags directly
* Add useNewTableDesignExperiment helper hook
* Rename isNewStreamsTableEnabled -> isNewTableDesignEnabld
* Cleanup tidyFormValues to take the existing schema in
@octavia-squidington-iv octavia-squidington-iv added the area/frontend Related to the Airbyte webapp label Jan 10, 2023
Copy link
Contributor

@krishnaglick krishnaglick left a comment

Choose a reason for hiding this comment

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

LGTM, did not test locally but since this is mostly a swap-in-place I expect tests and build to catch any errors.

@@ -59,7 +54,7 @@ export const ConnectionReplicationTab: React.FC = () => {
const { connection, schemaRefreshing, schemaHasBeenRefreshed, updateConnection, discardRefreshedSchema } =
useConnectionEditService();
const { initialValues, mode, schemaError, getErrorMessage, setSubmitError } = useConnectionFormService();
const allowSubOneHourCronExpressions = useFeature(FeatureItem.AllowSyncSubOneHourCronExpressions);
const validationSchema = useConnectionValidationSchema({ mode });
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is done both here and in the create form I think this should be moved to the Connection Form Service.

@edmundito edmundito merged commit b14ca94 into master Jan 11, 2023
@edmundito edmundito deleted the edmundito/add-table-design-experiment branch January 11, 2023 21:05
jbfbell pushed a commit that referenced this pull request Jan 13, 2023
* Use experiment for new streams table design

* Update formConfig validationSchema to use a hook to get the feature flags directly
* Add useNewTableDesignExperiment helper hook
* Rename isNewStreamsTableEnabled -> isNewTableDesignEnabld
* Cleanup tidyFormValues to take the existing schema in

* Fix var name in CatalogTreeTableHeader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add webapp feature flag for streams table redesign
3 participants