Skip to content

feat(toolbar): show what a palette chip takes in its hover tooltip - #628

Merged
KnifeLemon merged 3 commits into
mainfrom
feat/548-chip-format-tooltip
Oct 26, 2026
Merged

KnifeLemon merged 3 commits into
mainfrom
feat/548-chip-format-tooltip

Conversation

@SeoJCalive

Copy link
Copy Markdown
Collaborator

What does this change?

Closes #548. Hovering a usable chip in the Donut toolbar palette now shows what the preset makes and which formats it takes, in the layout agreed in #548:

  • the preset name, then "-> FORMAT · kind" (same-format presets say they keep the format, the folder preset names the folder)
  • "Accepted formats N", then up to 6 kind rows: the kind with its count, and up to 3 names (outputs of built-in presets first, then registry order) with "+N"
  • kinds that are only reachable in three steps are only counted in the last "+N more" line
  • when something is cut, the last line says to hold Shift; holding Shift over the chip shows every kind and every name, and letting go returns to the summary
  • Pack into one archive says it takes any file; a chip with no usable format shows only its reason

Dimmed chips keep their existing reason tooltip, and group chips get no tooltip. Moving the pointer onto the tooltip closes it: Avalonia keeps a tooltip open while the pointer is over it, and this one opens just below the chip, over the chips of the next rows.

PresetAvailability.UsableFormats gives the formats a preset is usable for, using the same check as the existing single-format judgement. PresetFormatTip builds the tooltip lazily the first time it opens and is cached per preset; the cache is dropped for every preset when the catalog or an external library changes, and only for the edited preset on PresetEdited. The tooltip card sets the app font itself, because the popup does not inherit the window's font.

10 new keys (toolbar.chip_tip.*) are in all 17 language files; the code adds no punctuation of its own. In Arabic the name lists and the output name stay left to right.

The existing test ToolbarPaletteViewTests.External_library_save_restores_selected_tab_after_rejudging checked a usable chip's tooltip text; it now checks that a usable chip has the new tooltip and a dimmed chip keeps its reason.

Type of change

  • Bug fix
  • New feature or improvement
  • New format or engine
  • Translation
  • Documentation
  • Build, CI or dependencies

How was it tested?

  • dotnet format --verify-no-changes
  • dotnet test: Core 635/635; App tests for the donut, palette and toolbar 235/235; full App run (before the last two small changes) 1408 passed, 9 skipped (Windows-only), 1 failed: RenderTests.Engines_page_shows_versions_descriptions_and_download_speed, which also fails on main on this Linux machine because it finds the system Ghostscript and LibreOffice
  • Tried it in the app (what you converted or clicked, and on which OS): Linux, headless MainWindow. Opened the tooltip for To XLSX, PDF slides, Half size and To PDF in English, Korean, Russian and Arabic, light and dark, with and without Shift.

New tests PaletteChipTipModelTests (5) and PaletteChipTipViewTests (21) open the real tooltip and compare it with the rules: XLSX (the spreadsheet row has CSV), MP3 (no vector or 3D rows), same-format, folder, pack-into-one-archive, crop/PDF tools, a group chip, a chip with no usable format, Shift held when opening, left/right Shift, Shift released in another window, the pointer moving onto the tooltip, and cache drops on catalog, library and preset edits. Each rule was checked by changing it in the code and seeing a test fail (19 changes, all caught).

Building a tooltip the first time it opens took 52 ms (median) and 128 ms at most (To MOBI) over all 119 usable chips with the real library (headless Linux, Release). It happens once per preset.

Screenshots (UI changes)

Hovering Holding Shift
image image
image image
image image

Checklist

  • New UI strings are in all src/Filee.App/Assets/i18n/*.json files
  • New third-party code or binaries are listed in THIRD-PARTY-NOTICES.md (none added)
  • The PR does one thing (unrelated changes go in a separate PR)

Questions

  1. Long lists: with Shift held, a preset like To PDF lists every format (183 here). It still fits on a 900px-high window, so I didn't add scrolling. Is that okay?

Follow-up

  • Other tooltips in the app probably also use the fallback font, because the popup doesn't inherit the window's font. I only fixed the new tooltip here.

A usable palette chip now shows the preset name, what it makes, how many
formats it accepts and up to six kind rows with up to three names each.
Kinds reached only in three steps are counted in the last line, and
holding Shift shows every kind and every name. Pack into one archive says
it takes any file; a chip with no usable format shows its reason. Dimmed
and group chips keep their behaviour.

The tip is built when first shown and cached per preset, dropped on
catalog or library changes and on edits to that preset. Keyboard focus
opens it like hovering. New toolbar.chip_tip.* keys are in all 17
language files.

Closes #548
Keyboard focus opened the tooltip at the mouse pointer, away from the
focused chip, and focus opening was not part of what #548 agreed. The
tooltip now opens on hover only.
Avalonia keeps a tooltip open while the pointer is over it. The format
tooltip opens just below the chip, so moving down to the next row landed
on it and it stayed open over the chips there.
@github-actions github-actions Bot added the feature New features label Oct 26, 2026
@SeoJCalive SeoJCalive added the macos Run the macOS packages and tests in CI for this pull request label Oct 26, 2026
@KnifeLemon
KnifeLemon merged commit 61bd692 into main Oct 26, 2026
21 of 26 checks passed

KnifeLemon commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

@SeoJCalive 님, 머지했어요. 고마워요! #548에서 정한 모양 그대로이고, 테스트도 꼼꼼하네요.

질문 주신 긴 목록은 지금처럼 스크롤 없이 두는 걸로 충분해요. 900px 높이에 들어간다면 괜찮고, 화면이 더 작은 환경에서 잘린다는 제보가 오면 그때 스크롤을 붙여요. 다른 툴팁 글꼴 문제는 따로 이슈로 열어 주시면 좋겠어요.

@SeoJCalive
SeoJCalive deleted the feat/548-chip-format-tooltip branch October 26, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features macos Run the macOS packages and tests in CI for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Show what a preset accepts when hovering its chip on the Donut toolbar page

2 participants