Repository navigation
feat(toolbar): show what a palette chip takes in its hover tooltip - #628
Merged
Merged
Conversation
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.
Owner
|
@SeoJCalive 님, 머지했어요. 고마워요! #548에서 정한 모양 그대로이고, 테스트도 꼼꼼하네요. 질문 주신 긴 목록은 지금처럼 스크롤 없이 두는 걸로 충분해요. 900px 높이에 들어간다면 괜찮고, 화면이 더 작은 환경에서 잘린다는 제보가 오면 그때 스크롤을 붙여요. 다른 툴팁 글꼴 문제는 따로 이슈로 열어 주시면 좋겠어요. |
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.
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:
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.UsableFormatsgives the formats a preset is usable for, using the same check as the existing single-format judgement.PresetFormatTipbuilds 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 onPresetEdited. 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_rejudgingchecked 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
How was it tested?
dotnet format --verify-no-changesdotnet 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 LibreOfficeNew tests
PaletteChipTipModelTests(5) andPaletteChipTipViewTests(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)
Checklist
src/Filee.App/Assets/i18n/*.jsonfilesTHIRD-PARTY-NOTICES.md(none added)Questions
Follow-up