Skip to content

Move Polls and Tasks to side panels, and their editors to windows - #1668

Merged
RedRafe merged 2 commits into
Refactorio:developfrom
lex:gui-panels-3
Oct 30, 2026
Merged

RedRafe merged 2 commits into
Refactorio:developfrom
lex:gui-panels-3

Conversation

@lex

@lex lex commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Polls and Tasks move to the side panel layout from #1662, like Experience, Tag group and Players in #1663: a header with the panel's title, a pin that floats it into a window you can drag anywhere and docks it back, and an X. Their editors become windows of their own.

Change

  • features/gui/poll.lua: Polls is a side panel as wide as its contents. Create poll becomes a + icon in the header, beside the pin, and the bottom row with Close and Create poll goes. The time left is short (9m 56s, was 9 minutes 56 seconds), and Notify me about polls goes in a footer (screenshot 1). The poll editor (new poll and edit poll) is a draggable window closed by its X: Clear on the left, Create poll as the green confirm on the right (screenshot 2).
  • features/gui/tasklist.lua: Tasks is a wide side panel titled Tasks, keeping its Announcements and Tasks sections, each with its own subheader and edit or + button. The Close button goes, and the notify checkbox goes in a footer (screenshot 3). The task editor and the announcements editor are draggable windows closed by their X, with the same buttons (screenshots 4 and 5); the announcements editor is at least as wide as the panel.
  • features/gui/tag_group.lua: the tag editor from Move Experience, Tag group and Players to the side panel header #1663 loses its Close button too, so it's closed by its X like the others.
  • The editors stay open when the panel closes or is pinned, so a half-written poll, task or announcement isn't lost.
  • utils/gui.lua, Gui.add_panel:
    • every panel has an X, docked or floating (Experience, Tag group and Players too); the top button still toggles it;
    • sections = true for a panel made of sections, each an inner frame with its own subheader: it gets a flow to add them to instead of the padded inner frame, so the sections don't sit in a second frame;
    • footer = true adds a footer (Factorio's subfooter_frame) along the bottom of the inner frame, or under the sections, and returns it.
  • Locale: tasklist.frame_title (Tasks), the panel's title, in every language.

The rule from review: every window, docked or not, has its own X, and no Close button.

Clear and Reset are still plain buttons, shorter than the confirm button beside them. The next PR in this series lays out every dialog's button row the same way with one helper (secondary buttons in the dialog style at the same height, confirm on the right), so this one leaves them as they are.

Tests

  • utils/gui_tests.lua: a docked panel has an X, and the X closes it; a footer sits along the bottom of the inner frame, under the content; with sections, it sits under them.
  • The utils/Gui tests with a player, in a 2.1.24 client: 28 passed, 0 failed.
  • Polls (with a poll running), the poll editor, Tasks, the task editor and the announcements editor, before and after, in a 2.1.24 client.
  • pwsh .github/scripts/run-all.ps1 <factorio> crashsite danger-ore diggy frontier: all pass. luacheck .: 0 warnings / 0 errors.

Screenshots

1_polls 2_create_poll 3_tasks 4_new_task 5_edit_announcements

🤖 Generated with Claude Code

Polls and Tasks open as wide side panels with the pin; Create poll becomes an icon in the header,
and Tasks keeps its Announcements and Tasks sections through the new sections option. Their
bottom Close buttons go. The poll, task and announcement editors become draggable windows with
an X next to their own buttons, wide enough for the vanilla dialog buttons they now use, and
they stay open when the panel closes, so pinning it doesn't lose a draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RedRafe

RedRafe commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Few issues I'd like to check with you

Polls

  1. The "X" button to close window is not present
  2. "Notify me..." should go on a footer frame
  3. Window width seems to stretch unnecessarily instead of fitting to content, too wide
  4. Maybe we could also shorten time formatting from "9minutes 54seconds" to "9m 54s"

New poll

  1. Remove "close" button in favour of "X" button just like Polls

Tasks

  1. The "X" button to close window is not present
  2. "Notify me" should go on a footer frame

Create Task, Edit Announcement

  1. Remove "close" button in favour of "X" button just like Polls

I know docked windows can be toggled with toolbar respective button, but for the sake of consistency, I'd choose these rules:

  1. Any window, docked or not, keeps it's own "X" button
  2. Docked or free windows from toolbar can be toggled with the toolbar button
  3. All windows get a "X" button, removing the "Close" button in order to debloat UI

From review: every window, docked or not, has its own X and no Close
button. Polls is as wide as its contents and shows the time left short.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lex

lex commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, all done in 8958da3, with new screenshots in the description:

  • Every panel has an X now, docked or floating, and the top button still toggles it. It's in Gui.add_panel, so Experience, Tag group and Players get it too.
  • "Notify me" goes in a footer on Polls and Tasks: Gui.add_panel takes footer = true and returns a subfooter_frame along the bottom of the inner frame (under the sections on Tasks).
  • Polls is as wide as its contents now, not the fixed wide width.
  • The time left is short: End time: 9m 56s, using Core.format_time_short.
  • The Close button is gone from the poll editor, the task editor and the announcements editor, and from the tag editor from Move Experience, Tag group and Players to the side panel header #1663 as well, so every window closes from its X.

The next PR (the dialog button rows) follows the same rule: no Close button, the X closes.

Comment thread features/gui/poll.lua Resolved
Comment thread features/gui/poll.lua Resolved
@RedRafe
RedRafe merged commit 86c7c24 into Refactorio:develop Oct 30, 2026
6 checks passed
lex added a commit to lex/RedMew that referenced this pull request Oct 30, 2026
From Refactorio#1668's review: every panel and window has its own X and no Close or
Cancel button, so Settings drops Cancel. docs/GUI.md says so, describes
panel footers and the dialog buttons' defaults, and asks for styles to be
set with Gui.set_style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lex added a commit to lex/RedMew that referenced this pull request Nov 1, 2026
From Refactorio#1668's review: every panel and window has its own X and no Close or
Cancel button, so Settings drops Cancel. docs/GUI.md says so, describes
panel footers and the dialog buttons' defaults, and asks for styles to be
set with Gui.set_style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lex added a commit to lex/RedMew that referenced this pull request Nov 2, 2026
From Refactorio#1668's review: every panel and window has its own X and no Close or
Cancel button, so Settings drops Cancel. docs/GUI.md says so, describes
panel footers and the dialog buttons' defaults, and asks for styles to be
set with Gui.set_style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants