Skip to content

feat(presets): default donuts follow the #806 slot table - #972

Open
SeoJCalive wants to merge 1 commit into
mainfrom
feat/default-slot-table
Open

SeoJCalive wants to merge 1 commit into
mainfrom
feat/default-slot-table

Conversation

@SeoJCalive

Copy link
Copy Markdown
Collaborator

What does this change?

Part of #806. This changes the default slots of all 19 built-in donuts to the table agreed in the issue:

Only new installs and Reset library / Reset donut get the new layout. An existing user's donuts don't change, and neither does anything migrated or imported from an older version.

The new layout

Donut Front Back
Images 6 8
PDF 7 8
Documents 7 3
Spreadsheets 6 5
Presentations 7 4
HWP / HWPX 7 4
Text 6 4
E-books 6 2
Video 6 8
Audio 5 5
Subtitles 2 1
Vector 5 5
Archives 4 0
CAD 5 3
Fonts 4 1
Data 5 4
3D models 5 1
GIS 5 1
Mixed 5 2

How each face was built:

  • Front faces: core + stage-1 slots, in the order of the posted table. GIF is a core slot on the image front, right after WEBP.
  • Back faces of donuts with editing tools (images, PDF, video, audio): the edit slots, then metadata removal where there's room, then the conversions re-picked in the second comment, then "ZIP one". Metadata removal is on video, audio and PDF (in place of ODT). Images have no room for it.
  • Back faces of the other donuts: stage-1 and stage-2 slots in their current order. Mixed keeps JPG and DOCX.
  • New slots: none outside the two decided ones, GIF on images and metadata removal on video/audio. No new presets or groups. Every removed slot stays in the preset library, so users can put it back in the toolbar editor.

Type of change

  • New feature or improvement

Existing users

Saved profiles are never compared with the defaults when they're read, so a user's own donuts can't change. What could leak the new layout into old data were the migrations that copy the current defaults:

  • AddBackFaces, for profiles saved without back faces (before schema 30, or in a bundle);
  • AddPdfSlides (schema < 18);
  • the migrations that add a donut that didn't exist yet (v4, v5, GIS, data, subtitles, 3D models, catalog);
  • re-adding the mixed donut when every mixed donut was deleted.

These now read a frozen copy of the previous defaults, BuiltInData schema-58 profiles, which is identical to CreateProfiles() at 51a6ba2. PdfDonut keeps the schema-18–58 PDF front for AddPdfSlides. New installs, ResetLibrary and ResetProfile use the new CreateProfiles(). The schema version doesn't change, because the file format and existing data are the same.

How "unchanged" is judged: for each case the new code's result is compared with a fixture captured by running the old code (51a6ba2) on the same input. The fixtures were not derived from the new code. Each comparison covers:

  • every donut's front and back slot ids and their order;
  • the order of the donut list;
  • extensions;
  • user-edited preset options and names.

The cases are Load and Import of:

  • the old defaults;
  • an edited layout;
  • a schema-17 PDF front;
  • a default donut without a back face;
  • a user donut without a back face;
  • schema-29 data.

How was it tested?

  • dotnet format --verify-no-changes
  • dotnet test. On Linux I ran Core (900/900) and the App tests for the toolbar, profiles, presets, DefaultPlacementTests and RenderTests (371/372). I didn't run the whole App suite locally; CI covers it.
    • The one failure is RenderTests.Engines_page_shows_versions_descriptions_and_download_speed. The system Ghostscript and LibreOffice on that machine report an empty version. This PR doesn't touch engines or the engines page.
  • DefaultPlacementTests (as asked): 8/8 pass, no violations, no generic-only slots.
  • Tried it in the app: before/after screenshots of every donut face are below.

Mutation checks. Each change was applied on its own, then reverted:

Change Result
Load/Import overwrite profiles with the new CreateProfiles() the 11 old-vs-new comparisons fail
AddBackFaces uses the new defaults the 5 comparisons that need it fail
Remove to-png from the frozen image front the frozen-baseline test fails

Screenshots (UI changes)

Each image shows before on the left and after on the right, rendered by the same headless render test on 51a6ba2 and on this branch. Greyed slots are tools whose engine isn't installed on the capture machine (FFmpeg, Calibre), the same before and after.

images front images back
PDF back video back
audio back documents back
presentations back mixed back
The other 22 faces that changed
PDF front documents front
spreadsheets front spreadsheets back
HWP / HWPX front HWP / HWPX back
text front text back
e-books front e-books back
video front audio front
subtitles front vector front
vector back archives front
CAD back fonts front
data front 3D models front
3D models back GIS front

The 7 faces not shown are unchanged: presentations, CAD and mixed fronts; subtitles, fonts, data and GIS backs. The archives back has no slots before or after.

Checklist

  • New UI strings are in all src/Filee.App/Assets/i18n/*.json files (none added)
  • 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)

New installs and library or donut resets get the agreed layout: every
face 8 slots or fewer, core and stage-1 slots on the front, edit slots
first on the back of the edit-type donuts, GIF after WEBP on images and
metadata removal on video, audio and PDF.

Migrations that used to copy the current defaults (AddBackFaces,
AddPdfSlides, missing-donut and mixed-donut migrations) now read a
frozen copy of the previous defaults, so data from older versions and
imported bundles come out as before. Tests compare those paths with
results captured from the previous code.

Part of #806
@github-actions github-actions Bot added the feature New features label Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant