Skip to content

Conversation

madsrasmussen
Copy link
Contributor

@madsrasmussen madsrasmussen commented May 9, 2025

Fixes #16853

@Copilot Copilot AI review requested due to automatic review settings May 9, 2025 12:48
Copy link
Contributor

@Copilot 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 updates the document workspace editor to switch the workspace variant dynamically when the app language changes.

  • Added logic to obtain the active segment from the split view.
  • Created a new variant ID based on the new app language and active segment, and switched the variant accordingly.

@@ -32,6 +33,11 @@ export class UmbDocumentWorkspaceEditorElement extends UmbLitElement {
this.observe(this.#appLanguage?.appLanguageCulture, (appCulture) => {
this.#appCulture = appCulture;
this.#generateRoutes();
// If the global app language changes, we update the first split view editor to the new app language.
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to only update if the left side panel was the old App Language?
Or update all splitViews that had the same Culture as the old?

Cause what if I ended up having it in reversed order?
And what if I was working with segments and wanted to change culture?

@madsrasmussen madsrasmussen marked this pull request as draft May 21, 2025 07:34
@madsrasmussen
Copy link
Contributor Author

Closing this PR as the solution has changed after we introduced a Variant Context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot turn pages smoothly
2 participants