Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 30 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@ because it turns other people's test suites red.

### Changed

- **Nine things the owner saw in the running window.** A field's
explanation opens on the same raised surface as an open list, so it no
longer lies flat on the section it covers. A list of formats keeps its
tick in front of the picture and the word, the shape it had before the
tick moved to the end of every row. A list opens downward whenever a few
rows fit under its box, shorter and scrolling, and turns upward only for
a box standing just over the bar at the foot. A menu no longer opens
marked as holding the keyboard when the window comes to the front, which
is what made the first menu on the first screen blue and every other one
grey - the mark is drawn for the keyboard alone, as it always was meant to
be. A box for a name, a template, a file name, a password or a list of
sizes is the width of two number boxes rather than of the whole row, and
only a path still takes the row. The tick in a checked box fills its
square. The first start is sized for the first screen rather than the
tallest one - see the entry on the window's height further down. Preview,
Choose, Duplicate and Add a batch have a raised
face rather than an outline round nothing. And the busy face - the frozen
form, Cancel, the bar - waits a moment before it appears, so a preview
that is over in a blink no longer flashes it and takes it back, and the
run buttons stand where they stood once the work is done.

- **The window draws its own buttons, switches and choosers.** A button now
has one filled face for the action that does the work and an outline for the
ones beside it, lightens under the pointer, darkens when pressed, and shows a
Expand Down Expand Up @@ -84,13 +105,15 @@ because it turns other people's test suites red.
binary is about 800 kB larger for it. The command line binary carries no
font and is unchanged.

- **The window opens as tall as its screens need, and no taller than a
1080p screen.** A first start used to open at a height measured against the
forms of an earlier version, and left a band of nothing under the form once
the forms grew shorter. It now opens exactly tall enough for the tallest
screen to show whole - today that is 917 px - and never taller than fits a
1080p screen with its taskbar. A window you have resized still comes back at
the size you left it.
- **The window opens as tall as the screen it opens on needs, and no taller
than a 1080p screen.** A first start used to open at a height measured
against the forms of an earlier version, and left a band of nothing under
the form once the forms grew shorter. It now opens exactly tall enough for
the first screen to show whole - today that is 851 px - and never taller
than fits a 1080p screen with its taskbar. The taller screens scroll a
little on arrival, which the batch screen does from the second batch on in
any case. A window you have resized still comes back at the size you left
it.

- **The files inside an archive are a table with one row of headings.** The
table on the batch screen named every column again in every row, so two
Expand Down
100 changes: 100 additions & 0 deletions internal/guard/boxwidth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,103 @@ func TestADeclaredSettingStandsOnTheSameEdgeAsTheFieldsAboveIt(t *testing.T) {
})
}
}

// Only a path takes the whole row.
//
// The owner's question from the running window on 2026-09-21: why are Batch
// name, File names, Password, Spread, Kind of case and Manifest file name so
// long. They took the row on the sentence that free text has no length to
// promise, which is true and beside the point - a name is a short thing, and
// a box 806 px wide for one promises something the value will never be, the
// same defect TestABoxForANumberIsNotAsWideAsTheForm holds for a number.
// The one value that can be long is a path, so the output directory keeps
// the row and everything else typed into these screens is held under half
// the column.
//
// Every box a person types into, on all three screens, rather than the six
// the owner named: the seventh is the one nobody names. The folded sections
// are opened first, because a box that is not on the screen has no laid out
// width (the lesson of the guard above), and the two boxes the report named
// inside them - a password, a kind of case - are exactly the ones a guard
// reading the open screen would never see.
func TestOnlyAPathTakesTheWholeRow(t *testing.T) {
ourTheme(t)
host := newFakeHost(t)
window.Open(host)
if host.content == nil {
t.Fatal("opening the window put no screen in it")
}
w := test.NewWindow(host.content)
t.Cleanup(w.Close)
layOut := func() {
w.Resize(fyne.NewSize(window.LargestOpening.Width, 1599))
w.Resize(fyne.NewSize(window.LargestOpening.Width, 1600))
}
layOut()

batches := selectTab(t, host.content, text.TabRecipe())
// A zip holds the one password box in the registry, and the notes hold the
// kind of case.
if picker, ok := controlUnder(batches, text.FieldFormat()).(*parts.Chooser); ok {
picker.SetSelected("zip")
} else {
t.Fatal("the first batch has no format list, so this guard read the wrong tree")
}
openFold(t, batches, "", text.SettingsFor("zip"))
openFold(t, batches, text.BatchHeading(1), text.SectionManifestNotes())
layOut()

half := float32(parts.ColumnWidth) / 2
checked, paths := 0, 0
for _, tab := range []string{text.TabOneTarget(), text.TabPresets(), text.TabRecipe()} {
screen := selectTab(t, host.content, tab)
layOut()
path := controlUnder(screen, text.FieldOutputDir())
if path == nil {
t.Fatalf("the %s screen has no output directory, so this guard cannot tell the path from the rest", tab)
}
onThePath := map[fyne.CanvasObject]bool{}
walk(path, func(o fyne.CanvasObject) { onThePath[o] = true })

walk(screen, func(o fyne.CanvasObject) {
box, is := o.(*parts.Entry)
if !is || !box.Visible() || box.Size().Width == 0 {
return
}
if onThePath[box] {
paths++
return
}
checked++
if box.Size().Width > half {
t.Errorf("%s: the box holding %q (placeholder %q) is %.0f px of a %d px column, and only a path is allowed the row",
tab, box.Text, box.PlaceHolder, box.Size().Width, parts.ColumnWidth)
}
})
}
// The boxes the owner named, by name, so a screen that stopped drawing
// one of them is a red guard and not a smaller count.
for _, named := range []struct{ tab, label string }{
{text.TabOneTarget(), text.FieldTargetID()},
{text.TabOneTarget(), text.FieldNameTemplate()},
{text.TabPresets(), text.SettingLabel("spread")},
{text.TabRecipe(), text.FieldManifest()},
{text.TabRecipe(), text.FieldGroup()},
{text.TabRecipe(), text.SettingLabel("password")},
} {
screen := selectTab(t, host.content, named.tab)
layOut()
control := controlUnder(screen, named.label)
if control == nil {
t.Errorf("%s: no field is labelled %q, so its width cannot be measured", named.tab, named.label)
continue
}
if width := typedInWidth(control); width == 0 || width > half {
t.Errorf("%s: the box under %q is %.0f px wide (nought is a box not on the screen)", named.tab, named.label, width)
}
}
if checked < 6 || paths < 3 {
t.Fatalf("checked %d boxes and %d paths across three screens, which is not the whole window", checked, paths)
}
t.Logf("%d boxes held under half the column, %d paths allowed the row", checked, paths)
}
Loading
Loading