[202_106]: Fix duplicate names in table variant dropdown#2876
Open
divyansharma001 wants to merge 1 commit intoMoganLab:mainfrom
Open
[202_106]: Fix duplicate names in table variant dropdown#2876divyansharma001 wants to merge 1 commit intoMoganLab:mainfrom
divyansharma001 wants to merge 1 commit intoMoganLab:mainfrom
Conversation
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
Contributor
There was a problem hiding this comment.
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-nameoverrides sotabular*andblock*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) |
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2782
Problem
When clicking the table variant dropdown on the focus toolbar, "无框表格" and "有框表格" each appear twice because
focus-tag-namestrips the*suffix fromtabular*andblock*, making them display identically totabularandblock.Solution
Added
focus-tag-nameoverrides fortabular*→ "centered tabular" (居中无框表格) andblock*→ "centered block" (居中有框表格) inTeXmacs/progs/table/table-menu.scm. The translation keys already exist in all language dictionaries.How to test
Alt+t