Skip to content

Add button for adding device panel vertically into view panel - #2883

Open
k311093 wants to merge 1 commit into
google:mainfrom
k311093:vertical
Open

Add button for adding device panel vertically into view panel#2883
k311093 wants to merge 1 commit into
google:mainfrom
k311093:vertical

Conversation

@k311093

@k311093 k311093 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

In the multiple device scanerio with landscape device screen, stacking device panel horizontally is not a good experience to use. (it need to scroll page right side to see the device).

Add a toggle button to adding device panel vertically to support this case.

b/534778982

@k311093 k311093 added the kokoro:run Run e2e tests. label Jul 22, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Jul 22, 2026
@k311093 k311093 added the kokoro:run Run e2e tests. label Jul 23, 2026
@k311093
k311093 requested review from 0405ysj and ikicha July 23, 2026 01:43
@k311093
k311093 marked this pull request as ready for review July 23, 2026 01:43
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Jul 23, 2026
Comment thread frontend/src/operator/webui/src/app/app.component.html

@0405ysj 0405ysj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not certain if I'm the right person to review, as I don't have much experience on Angular.

Comment thread frontend/src/operator/webui/src/app/view-pane/view-pane.component.ts Outdated
Comment thread frontend/src/operator/webui/src/app/view-pane/view-pane.component.ts Outdated
Comment thread frontend/src/operator/webui/src/app/view-pane/view-pane.component.ts Outdated
Comment thread frontend/src/operator/webui/src/app/view-pane/view-pane.component.ts Outdated
@k311093
k311093 force-pushed the vertical branch 4 times, most recently from 4f270eb to ae32fd6 Compare July 23, 2026 07:28
Comment thread frontend/src/operator/webui/src/app/view-pane/view-pane.component.ts Outdated
@k311093
k311093 force-pushed the vertical branch 3 times, most recently from 0d68a29 to 5f1397a Compare August 4, 2026 07:31
@k311093 k311093 added the kokoro:run Run e2e tests. label Aug 4, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Aug 4, 2026
In the multiple device scanerio with landscape device screen,
stacking device panel horizontally is not a good experience to use.
(it need to scroll page right side to see the device).

Add a toggle button to adding device panel vertically to support this
case.

b/534778982
stackVertical = true;
} else {
stackVertical =
layout.length !== 0 && rightBorder + item.w > this.cols;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

layout.length !== 0 is not necessary here, as there should be no diff whether stacking horizontal or vertical when no item exists. So I think we can shrink like:

stackVertical = this.displaysService.addVertically$.value && rightBorder + item.w > this.cols;

const lastMaxY =
let stackVertical = false;
const lastItemY =
layout.length !== 0 ? Math.max(...layout.map(obj => obj.y)) : 0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: const lastItemY = Math.max(...layout.map(obj => obj.y), 0);?

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