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

configurable ui-language-switcher-dialog.component.ts #2550

Merged
merged 15 commits into from
Dec 4, 2023
Merged

configurable ui-language-switcher-dialog.component.ts #2550

merged 15 commits into from
Dec 4, 2023

Conversation

HoseinGhanbari
Copy link
Contributor

Description

Addressing the requirements described here #2413

Breaking changes

⭕There might be a chance that getAppConfig().availableLocales don't filled with default value called defaultAvailableLocales when user didn't set any specific availableLocales on their AdminUiConfig.

⭕Actually currently I couldn't verify 100% that this is going to break current users admin-ui as they probably have not set any availableLocales but this might be the only breaking change.

Screenshots

currently nothing applicable as a screenshot

Copy link

netlify bot commented Nov 27, 2023

Deploy Preview for effervescent-donut-4977b2 canceled.

Name Link
🔨 Latest commit ab785a1
🔍 Latest deploy log https://app.netlify.com/sites/effervescent-donut-4977b2/deploys/6567ac522a64fe00087c0ec7

@HoseinGhanbari
Copy link
Contributor Author

Also worth noting that during development session of this PR I figured out in some cases (at least during development) that if users didn't set availableLanguages OR availableLocales on their configs (vendure-ui-config.json), a method of admin-ui-plugin called getAdminUiConfig which is responsible for returning a complete config object is not using default values provided by propOrDefault helper.

I don't know if this is right to set configs inside vendure-ui-config.json during a development session or not but this undefined value bug for default values might not the case in production builds or official Vendure's releases.

Copy link
Member

@michaelbromley michaelbromley left a comment

Choose a reason for hiding this comment

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

Overall looks good - I have a few points of feedback to address. Also, please make this PR against the minor branch as it is adding new functionality.

@HoseinGhanbari HoseinGhanbari changed the base branch from master to minor November 29, 2023 21:27
@michaelbromley michaelbromley merged commit dfddf0f into vendure-ecommerce:minor Dec 4, 2023
18 checks passed
@michaelbromley
Copy link
Member

Thank you for your excellent work on this!

@HoseinGhanbari
Copy link
Contributor Author

Anytime 🙏 I'm glad it was helpful !

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.

2 participants