Skip to content

observable for detecting if split view is active #19394

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nielslyngsoe
Copy link
Member

making an observable on contentDetailWorkspaceContext.splitView called splitViewActive which returns true when more than one variant is open.

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 introduces an observable property named splitViewActive that determines if the split view is active based on whether more than one variant is present.

  • Added splitViewActive observable derived from #activeVariantsInfo using a length check
  • Updates the workspace split view manager controller to expose this new state
Comments suppressed due to low confidence (1)

src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-split-view-manager.controller.ts:19

  • Consider adding or updating tests to verify that splitViewActive correctly reflects the active split view state as the variants change.
public readonly splitViewActive = this.#activeVariantsInfo.asObservablePart((x) => x.length > 1);

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

Successfully merging this pull request may close these issues.

1 participant