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

CB-4652 migrate server configuration form #2916

Merged
merged 12 commits into from
Sep 25, 2024

Conversation

devnaumov
Copy link
Member

No description provided.

@devnaumov devnaumov self-assigned this Sep 16, 2024
Comment on lines +37 to +40
export type IServerConfigurationFormPartState = {
serverConfig: schema.infer<typeof ServerConfigurationFormPartStateConfigSchema>;
navigatorConfig: schema.infer<typeof ServerConfigurationFormPartStateNavigatorSchema>;
};
Copy link
Member

Choose a reason for hiding this comment

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

why not ?

const ServerConfigurationFormPartStateSchema = schema.object({
  serverConfig: ServerConfigurationFormPartStateConfigSchema,
  navigatorConfig: ServerConfigurationFormPartStateNavigatorSchema
});

Copy link
Member Author

@devnaumov devnaumov Sep 17, 2024

Choose a reason for hiding this comment

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

Seems like we cant use ServerConfigurationFormPartStateConfigSchema as a type cause its a value

Copy link
Contributor

@sergeyteleshev sergeyteleshev left a comment

Choose a reason for hiding this comment

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

Nice refactor!

await this.authProvidersResource.load(CachedMapAllKey);

if (this.authProvidersResource.has(AUTH_PROVIDER_LOCAL_ID)) {
await this.passwordPolicyResource.load();
Copy link
Contributor

Choose a reason for hiding this comment

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

You preloaded the resource, but it is not used in this current form part. Seems like it can be removed from here completely

Copy link
Member Author

Choose a reason for hiding this comment

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

image

it should be preloaded so validatePassword is working correctly

Comment on lines 109 to 111
const config = await this.serverConfigResource.load();
const productInfo = await this.productInfoResource.load();
const defaultNavigatorSettings = await this.defaultNavigatorSettingsResource.load();
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets load data in parallel mode so user have a better UX

Suggested change
const config = await this.serverConfigResource.load();
const productInfo = await this.productInfoResource.load();
const defaultNavigatorSettings = await this.defaultNavigatorSettingsResource.load();
[config, productInfo, defaultNavigatorSettings] = await Promise.all([
this.serverConfigResource.load(),
this.productInfoResource.load(),
this.defaultNavigatorSettingsResource.load()
]);

function reset() {
service.loadConfig(true);
}
const changed = part.isChanged;
Copy link
Contributor

Choose a reason for hiding this comment

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

currently it is a function so it is not working properly
after the merge of bad.setState ticket should be fine I suppose. but please check it after the merge wether it is working correctly

Copy link
Member Author

Choose a reason for hiding this comment

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

I've tested it on your branch

@Wroud Wroud merged commit fe020f8 into devel Sep 25, 2024
7 checks passed
@Wroud Wroud deleted the CB-4652-migrate-server-configuration-form branch September 25, 2024 08:46
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.

5 participants