Skip to content

[201_86] Remove popups to improve UI when inserting Automatic Content#2895

Open
git-lakshy wants to merge 2 commits intoMoganLab:mainfrom
git-lakshy:myb4
Open

[201_86] Remove popups to improve UI when inserting Automatic Content#2895
git-lakshy wants to merge 2 commits intoMoganLab:mainfrom
git-lakshy:myb4

Conversation

@git-lakshy
Copy link
Contributor

@git-lakshy git-lakshy commented Feb 28, 2026

Issue :

On inserting Automatic Content Screen popups causing flash and bad ui, the editor shows repeated popup/wait dialogs and visible screen disturbance.
also issue #2814
on debian:

Screencast.From.2026-02-28.22-34-00.mp4

How to Test

Open any text document with section/index/glossary markers.
Trigger any of this via Insert -> Automatic:

  • Table of contents
  • Index
  • Glossary
  • List of figures
  • List of tables
    Content will be inserted just like before but without popup, Wait cursor appears during the update and resets after. (wait cursor may not be visible due to fast update)
    Instead of popup now "Updating current buffer ..." message is shown in status bar.

What Changed

document-edit.scm: system-waitset-message + wait cursor

  • Replaced popup dialog with footer status bar message
  • Added set-cursor-style "wait"/"normal" around update-document

edit_process.cpp: system_waitset_message

Replaced popup in generate_bibliography, generate_index, generate_glossary.

Screen-Rec

(Cursor not visible due to my system settings)

Screencast.From.2026-02-28.23-05-47.mp4

Copilot AI review requested due to automatic review settings February 28, 2026 07:18
Copy link
Contributor

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 aims to reduce UI popups/screen flashing when inserting “Automatic” content (TOC, Index, Glossary, List of Figures/Tables) by avoiding a full document update on each insertion.

Changes:

  • Added developer note devel/201_86.md describing Issue #2814, the rationale, and test steps.
  • Updated automatic-menu insertion actions in text-menu.scm to call update-document with per-item keys instead of "all".

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
devel/201_86.md Adds a short write-up of the issue, the behavioral change, and manual test steps.
TeXmacs/progs/text/text-menu.scm Switches automatic insertion flows from update-document "all" to per-item update keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 493 to 498
(make-aux "list-of-figures" "figure-list-prefix" "figure")
(update-document "all")))
(update-document "list-of-figures")))
("List of tables"
(begin
(make-aux "list-of-tables" "table-list-prefix" "table")
(update-document "all"))))
(update-document "list-of-tables"))))
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

Switching these actions from (update-document "all") to a specific key (e.g. "the-index") routes through update-document’s (generate-aux what) path. In edit_process_rep::generate_aux_recursively, all auxiliary blocks are cleared unconditionally before the conditional which check, so calling generate-aux with a non-empty key can leave any other existing automatic content (TOC/index/glossary/lists) empty in documents that contain multiple auxiliary blocks. To avoid a regression vs the previous full update, consider regenerating all aux content without the heavyweight UI path (e.g. a helper that does generate-all-aux/generate-aux "" without system-wait), or adjust aux generation so only matching blocks are cleared/regenerated.

Copilot uses AI. Check for mistakes.
devel/201_86.md Outdated
- List of figures
- List of tables
Content is inserted and generated as before.
No more popupo or screen flashing.
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

Typo: "popupo" should be "popups".

Suggested change
No more popupo or screen flashing.
No more popups or screen flashing.

Copilot uses AI. Check for mistakes.
@git-lakshy git-lakshy marked this pull request as draft February 28, 2026 09:30
@git-lakshy git-lakshy changed the title [201_86] Reduce popup/screen flashing when inserting Automatic content [201_86] Remove popups to improve UI when inserting utomatic Content Feb 28, 2026
@git-lakshy git-lakshy changed the title [201_86] Remove popups to improve UI when inserting utomatic Content [201_86] Remove popups to improve UI when inserting Automatic Content Feb 28, 2026
@git-lakshy git-lakshy marked this pull request as ready for review February 28, 2026 17:41
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