Skip to content

[202_106]: Fix duplicate names in table variant dropdown#2876

Open
divyansharma001 wants to merge 1 commit intoMoganLab:mainfrom
divyansharma001:da/202_106/fix_table_variant_names
Open

[202_106]: Fix duplicate names in table variant dropdown#2876
divyansharma001 wants to merge 1 commit intoMoganLab:mainfrom
divyansharma001:da/202_106/fix_table_variant_names

Conversation

@divyansharma001
Copy link
Contributor

Fixes #2782

Problem

When clicking the table variant dropdown on the focus toolbar, "无框表格" and "有框表格" each appear twice because focus-tag-name strips the * suffix from tabular* and block*, making them display identically to tabular and block.

Solution

Added focus-tag-name overrides for tabular* → "centered tabular" (居中无框表格) and block* → "centered block" (居中有框表格) in TeXmacs/progs/table/table-menu.scm. The translation keys already exist in all language dictionaries.

How to test

  1. Open Mogan, insert a table with Alt+t
  2. Click the "tabular" dropdown on the focus toolbar
  3. Verify all 6 variants now have distinct names

Add focus-tag-name overrides for tabular* and block* so they display
as 'centered tabular' and 'centered block' instead of duplicating
'tabular' and 'block' in the table environment switching dropdown.

Fixes: MoganLab#2782
Copilot AI review requested due to automatic review settings February 26, 2026 20:27
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

Resolves duplicate entries in the focus-toolbar table variant dropdown by providing distinct focus-tag-name labels for the starred table environments (tabular*, block*).

Changes:

  • Added focus-tag-name overrides so tabular* and block* display as “centered tabular” / “centered block”.
  • Added a developer note (devel/202_106.md) describing the issue, fix, and manual test steps.

Reviewed changes

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

File Description
devel/202_106.md Documents the problem, fix, and how to verify distinct dropdown labels.
TeXmacs/progs/table/table-menu.scm Adds focus-tag-name dispatches for tabular* and block* to avoid duplicate names.

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

Comment on lines +556 to +560
(tm-define (focus-tag-name l)
(:require (== l 'tabular*))
"centered tabular")

(tm-define (focus-tag-name l)
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

This PR changes focus-tag-name dispatch for tabular*/block*, but there is already a regression-test group for focus-tag-name in TeXmacs/progs/generic/generic-test.scm. Please add/extend a regression test to cover these two symbols so the dropdown naming behavior doesn’t regress.

Copilot uses AI. Check for mistakes.
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