fix: give quick compose's Move to the main window an arrow going in, not the exit full screen arrows

This commit is contained in:
Linus Rath
2026-11-04 12:54:21 +01:00
parent 07b6cae9e8
commit 2efbaed728
2 changed files with 12 additions and 1 deletions
@@ -112,6 +112,15 @@ function target(shown = true): ComposerPopOut & { handed: ComposerDraftData[]; c
const DRAFT: ComposerDraftData = { to: '', cc: '', bcc: '', subject: 'Old', body: '', showCc: false, showBcc: false, selectedIdentityId: null, subAddressTag: '', mode: 'compose', draftId: null };
describe('"Move to the main window" in quick compose', () => {
it('shows an arrow going in, not the arrows of leaving full screen', () => {
mount({ popOut: vi.fn(() => target()), popOutToMainLabel: 'Move to the main window' });
const svg = screen.getByTestId('composer-back-to-main').querySelector('svg');
expect(svg?.getAttribute('class')).toContain('tabler-icon-login');
expect(svg?.getAttribute('class')).not.toContain('minimize');
});
});
describe('"Open in new window" on a composer', () => {
it('is not there without the host offering it: browsers stay as they are', () => {
mount({});
+3 -1
View File
@@ -38,6 +38,7 @@ import {
Minimize2,
Trash2,
ExternalLink,
LogIn,
ReplyAll,
Reply,
Forward,
@@ -4682,7 +4683,8 @@ export function EmailComposer({
title={popOutToMainLabel ?? tWindows('open_in_window')}
data-testid={popOutToMainLabel ? "composer-back-to-main" : "composer-open-in-window"}
>
{popOutToMainLabel ? <Minimize2 className={iconClassName} /> : <ExternalLink className={iconClassName} />}
{/* Into the main window: an arrow going in, not the inward arrows of leaving full screen. */}
{popOutToMainLabel ? <LogIn className={iconClassName} /> : <ExternalLink className={iconClassName} />}
</button>
);