Skip to content

Comments

fix(VCST-4278): change language behavior#2059

Merged
ivan-kalachikov merged 3 commits intodevfrom
fix/VCST-4278-choose-language-behavior
Nov 18, 2025
Merged

fix(VCST-4278): change language behavior#2059
ivan-kalachikov merged 3 commits intodevfrom
fix/VCST-4278-choose-language-behavior

Conversation

@ivan-kalachikov
Copy link
Contributor

@ivan-kalachikov ivan-kalachikov commented Nov 17, 2025

Copy link
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

This PR modifies the language selection behavior to check if content exists in the target language before switching, and refactors event handling in the organization switching flow.

  • Changed language selector to asynchronously fetch slug info before changing language to determine if content exists in the target language
  • Added a new standalone getSlugInfo function for direct API calls outside of Vue composables
  • Changed organization switching to use pageReloadEvent instead of reloadAndOpenMainPage

Reviewed Changes

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

File Description
client-app/shared/layout/components/language-selector/language-selector.vue Modified language selection to be async, fetch slug info to check content availability, and conditionally set previousCultureSlug based on whether content exists in the target language
client-app/core/api/graphql/slugInfo/queries/getSlugInfo/index.ts Added new getSlugInfo async function for direct API calls using graphqlClient with error handling and logging
client-app/shared/account/composables/useUser.ts Changed switchOrganization to emit pageReloadEvent instead of reloadAndOpenMainPage, altering the post-switch behavior from redirecting to home to reloading the current page

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

@sonarqubecloud
Copy link

@ivan-kalachikov ivan-kalachikov merged commit f2dadfc into dev Nov 18, 2025
9 checks passed
@ivan-kalachikov ivan-kalachikov deleted the fix/VCST-4278-choose-language-behavior branch November 18, 2025 13:17
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