Page MenuHomePhabricator

Maximize and minimize dialog windows for Codex
Open, In Progress, LowPublic

Assigned To
Authored By
Nux
Aug 8 2026, 12:51 PM
Referenced Files
F97932105: obraz.png
Aug 10 2026, 5:51 PM
F97931344: obraz.png
Aug 10 2026, 5:51 PM
F97842190: obraz.png
Aug 10 2026, 12:04 AM
F97841580: obraz.png
Aug 10 2026, 12:04 AM
F97838480: obraz.png
Aug 9 2026, 11:33 PM
F97835169: obraz.png
Aug 9 2026, 11:33 PM
F97604268: obraz.png
Aug 8 2026, 12:51 PM

Description

Feature summary (what you would like to be able to do and where):

When using Codex, there currently seems to be no option to create a dialog window that I could maximize or minimize. In fact, I don't think I can resize it either.
https://doc.wikimedia.org/codex/latest/components/demos/dialog.html

  • Maximization could work either by double-tapping/double-clicking the title bar (a common feature on PCs) or by using a separate button with a maximization icon.
  • Minimization could either collapse the dialog to an icon (which would have to be provided in configuration) or to just the title bar. What is important is that any progress made in the task would not be lost or modified. In other words, the elements should be hidden, not removed.

This would become more important once T434356 is done (adding the ability to move the dialog).

Example of collapsing to a title bar:

obraz.png (245×56 px, 4 KB)

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  • Gadgets for taking notes (and needing to copy something into the window). This would benefit from maximization when I want to focus on writing a note, and minimization when I'm done. One such gadget collapses to an icon when you close the window, but it is not ideal (the icon is placed somewhat randomly on the side of the screen).
  • Gadgets for tracking threats like the interceptor could be used in a collapsed stated as a companion, and you would only open it when new threat arrives (like a bad edit for review that might need to be reverted or removed).
  • Writing about the current article when submitting a nomination (for deletion, for a medal, or for the Did You Know column). This can be a large window, and it might take some time to complete the task. You might want to minimize it to more easily re-read some fragments or check notifications or maximize it to focus (people have problems with focus these days).
  • Cat-a-lot could benefit from using a more standardized solution for minimization.

Benefits (why should this be implemented?):

Maximization is probably only important on larger screens (desktops/laptops), so it is more relevant to editors than readers. Minimization could also work on mobile: e.g. an insert-link dialog pops up, I minimize it to copy some text, then maximize it to paste the text into the dialog.

Note that on PCs (and Macs), most windows can be maximized and almost all can be minimized (even modal windows). Also note that while readers tend to use mobile devices, active editors still tend to use desktop computers or laptops to edit Wikipedia.

For example, at the moment I see 73 mobile edits out of 500 actions (486 edits in total) on enwiki on RC (link below). That is about 15% mobile edits and 85% other edits (taking 486 as 100%). It is a random sample, but this is also what I hear from active editors at conferences: people do make edits and perform other actions on mobile, but these are relatively rare – typically when waiting for a train, etc., or when there are no other options for them. Most of the time active users use a larger screen on which windows are not taking the whole screen.

https://en.wikipedia.org/wiki/Special:RecentChanges?hidebots=1&hidecategorization=1&hideWikibase=1&limit=500&days=14&urlversion=2

Details

Related Changes in Gerrit:

Event Timeline

Les4353 subscribed.

Hello, can you provide example screenshot for this feature?

Les4353 moved this task from Backlog to Upcoming on the Codex board.

Example of bad behaviour when minimizing to a corner without global management. This is the current interaction between Cat-a-lot and ProveIt (one of the reasons I don't use ProveIt).

obraz.png (114×79 px, 1 KB)

Example of minimizing to same edge with global management (what it could look like):

obraz.png (267×58 px, 2 KB)

Example of minimizing (collapsing) to a title bar that you can drag around (the maximize icon is wrong though):

obraz.png (245×56 px, 4 KB)

Maximize icon:

<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path d="M7 2H2V7M13 2H18V7M7 18H2V13M13 18H18V13" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>

The minimize icon should just be a dash (a line).

BTW, classes like cdx-icon--small don't work well for components, as you would have to change cdx-icon--medium (the current class for the dialog header button) to --small upon minimization. I mean, normally, classes shouldn't be used to micromanage state. But in the end, whatever works :). Just something you might want to change if it's still possible.

We should use exists icon in icon library to do that, not use "just a character" or some random svg.

Just to be sure, here is an example of why maximize can be useful for a current script. I was just testing how ProveIt works now for a wiki.

current, no maximizeProveIt maximized (*)
obraz.png (1,395×1,038 px, 152 KB)
obraz.png (1,395×1,038 px, 46 KB)

(*) With some fixes because ProveIt currently tries really hard to be of static width and height, which would not be needed if size was managed by a better dialog window.

Also note I didn't add a header. ProveIt doesn't use a dialog and cannot use it now (in current state of things); it is another case for non-modal dialogs T434355 and for dragging/and positioning dialogs, so T434356.

@Nux I am working for a prototype and will give you a link to test that, please give suggestions about it, thanks for your feature request deeply!

We should use exists icon in icon library to do that, not use "just a character" or some random svg.

Is there a maximize icon for Codex? If there is then just use it.

Les4353 changed the task status from Open to In Progress.Aug 10 2026, 12:06 AM
Les4353 moved this task from Upcoming to In Progress on the Codex board.

Change #1323836 had a related patch set uploaded (by Les4353; author: Les4353):

[design/codex@main] Dialog: Add minimize and maximize button

https://gerrit.wikimedia.org/r/1323836

I see icons are to be added later, OK. A single window works fine generally, but should be smaller when minimized.

Current:

obraz.png (1,039×169 px, 7 KB)

Expected:

obraz.png (1,039×169 px, 6 KB)

Changes roughly:

.cdx-dialog-backdrop--minimized {

.cdx-dialog {
				/* width: calc(100vw - 2rem); */
}
.cdx-dialog__header__title-group {
				/* flex-grow: 1; */
				padding-right: .4em;
}
.cdx-dialog__header {
				/* padding: 16px 24px 8px; */
				padding: 4px 8px;
	 .cdx-dialog__header__title {
				/* font-size: var(--font-size-x-large, 1.25rem); */
				/* line-height: var(--line-height-x-large, 1.875rem); */
				font-size: 1rem;
				line-height: 1rem;
	}
}
.cdx-dialog__header--default {
				/* align-items: baseline; */
				align-items: center;
}

}

+ icon size change

Oh, I assume this would not work with two dialogs (not sure if the prototype is meant to work for more dialogs). Minimized dialogs should be displayed side by side, and I'm not sure if they would work in current layout.

@Nux Thanks for feedback, completed! Please try it out (in the same URL), if still has any problems, tell me!

Still too big when minimized for it to be more useful (smaller font, smaller icons, less space).

Also could you make a 2nd resizable dialog in the demo? Would be easier to test behaviour with two mimized dialogs.

@Nux OK! I make the text be small and reduced width, try now!

Also, in current situtation, multiple minimized dialog is basiclly impossible to implement...

@Nux The icon is filled now, if have any other problems or suggestions to my implementation, tell me anytime, deeply thanks for your idea!

Looks good to me, thanks. For it to be more useful it should be allowed to have two windows minimized and still be useful. That might be done in a separate issue though.