docs: the tab bar spans the window above the sidebar; the tests that say so
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
80a24a6262
commit
c1fbeab7c1
2 files changed
+42
-12
No files matched your search
+10
-3
@@ -121,9 +121,16 @@ The viewer is **one window with a tab per open company** (P15, D-78;
|
|||||||
(the color scheme and its menu, `scheme_menu.rs`; the tab bar, `tabs.rs`;
|
(the color scheme and its menu, `scheme_menu.rs`; the tab bar, `tabs.rs`;
|
||||||
the data root the companies are in) and a list of `CompanyView`s
|
the data root the companies are in) and a list of `CompanyView`s
|
||||||
(`company.rs`), one per open company, with which is in front. The tab
|
(`company.rs`), one per open company, with which is in front. The tab
|
||||||
bar runs along the top of the window beside the sidebar, which keeps the
|
bar runs across the whole window, above the sidebar: a tab is the top
|
||||||
window's whole height (the owner's 519-point window leaves it none to
|
level, and the sidebar (the company's badge, its pages, its status) is the
|
||||||
spare). A view owns
|
company in the tab's. The bar's height (`tabs::BAR_H`) is taken from the
|
||||||
|
window, so the smallest window the viewer allows is the 400 points below
|
||||||
|
the bar plus the bar. A tab is the company's badge and name, as wide as
|
||||||
|
that between a least and a greatest width; the "+" follows the last tab
|
||||||
|
and stays at the right edge, the tabs scrolling, when they overflow. The
|
||||||
|
app remembers each company's name when its books load (`company.<id>.name`
|
||||||
|
in its kept state), for a tab's title before the books load and for the
|
||||||
|
"+" list, which never reads a journal for a name. A view owns
|
||||||
everything that is one company's: its loader thread (its watcher and its
|
everything that is one company's: its loader thread (its watcher and its
|
||||||
viewer presence on the books), the books it last loaded, where it is
|
viewer presence on the books), the books it last loaded, where it is
|
||||||
(`Nav`), its page state, its receipts' workers, its export and owner menus,
|
(`Nav`), its page state, its receipts' workers, its export and owner menus,
|
||||||
|
|||||||
+32
-9
@@ -4368,19 +4368,42 @@ renderer, as the sidebar's do):
|
|||||||
the "+" is whole in the bar.
|
the "+" is whole in the bar.
|
||||||
- `the_empty_window_and_the_plus_list`: pictures of the empty window and of
|
- `the_empty_window_and_the_plus_list`: pictures of the empty window and of
|
||||||
the "+" list open, light and dark (`tabs_empty_*`, `tabs_plus_*`).
|
the "+" list open, light and dark (`tabs_empty_*`, `tabs_plus_*`).
|
||||||
|
- `the_bar_spans_the_window_above_the_sidebar`: on the laid-out rectangles,
|
||||||
|
the bar's fill is the window's width and `BAR_H` high at its top, every
|
||||||
|
tab is inside it, the first is over the sidebar's column, and the
|
||||||
|
sidebar's links and panel start below it.
|
||||||
|
- `the_plus_follows_the_last_tab_and_stays_whole_when_the_tabs_overflow`:
|
||||||
|
with two tabs the "+" is just after the last; with nine it is at the right
|
||||||
|
edge, whole, with the step controls shown and the tab in front left of it.
|
||||||
|
- `a_name_is_remembered_and_shown_in_the_plus_list_and_on_a_loading_tab`:
|
||||||
|
a closed company is listed by name with its id beside it, one never
|
||||||
|
opened by its id alone; the name is saved as `company.<id>.name`, and an
|
||||||
|
app started from it titles a tab whose books aren't loaded by that name
|
||||||
|
(else by the id).
|
||||||
|
- `the_plus_list_says_so_when_every_company_is_open`: "Every company is
|
||||||
|
already open." and no heading.
|
||||||
- `pictures` (ignored; `SHOT_DIR`): the whole window with each tab in front,
|
- `pictures` (ignored; `SHOT_DIR`): the whole window with each tab in front,
|
||||||
the "+" list and the empty window, for a person to look at.
|
the "+" list and the empty window, for a person to look at.
|
||||||
|
|
||||||
Unit tests moved with the code they test: the sidebar's fit tests, now
|
Unit tests moved with the code they test: the sidebar's fit tests, now
|
||||||
in `company.rs`; the scheme tests, in `scheme_menu.rs`. No other existing
|
in `company.rs`; the scheme tests, in `scheme_menu.rs`. The tab bar runs
|
||||||
test was changed for the tabs, and no existing golden or snapshot image
|
across the top of the window *above* the sidebar (D-78): a tab is the
|
||||||
changed. The tab bar runs along the top of the window *beside* the
|
top level, and the layout shows that the sidebar belongs to the company in
|
||||||
sidebar, not above it, because above it the owner's window fails
|
it. The bar takes `tabs::BAR_H` (36 points) of the window's height, which
|
||||||
`sidenav.rs` (`at_1479x519_every_link_shows_unscrolled`, the rail's at
|
the sidebar had to spare nowhere at the owner's 519 points. So the four
|
||||||
519, the grid at 520 px): measured with bars of 36, 28 and 24 points, the
|
`sidenav.rs` tests that size a window for the sidebar add `BAR_H` to their
|
||||||
links scroll at 519 in all three, the sidebar having no height to spare
|
window heights, through the constant the bar uses (`at_1479x519_…`,
|
||||||
there. The sidebar golden (shapes, and pixels with `SIDENAV_PIXELS=1`) is
|
`the_rail_at_519_…`, the grid's heights in `grid`, and
|
||||||
unchanged for the same reason.
|
`a_tall_sidebar_is_unchanged` at 920), each with a comment, and no
|
||||||
|
assertion in them changed; the viewer's smallest window is 400 points plus
|
||||||
|
`BAR_H` (`lib.rs`). The last one's pixel golden is untouched: the sidebar
|
||||||
|
below the bar, cropped from `BAR_H` down, is pixel for pixel the old
|
||||||
|
image; its shapes hash was recomputed, because the shapes now sit `BAR_H`
|
||||||
|
lower, and covers only the shapes clipped below the bar. In `tabs.rs`, the
|
||||||
|
three tests that click a closed company in the "+" list by its id now click
|
||||||
|
it by its name, which the list shows once the company has been open; the
|
||||||
|
list's empty words are now "Every company is already open." The ten
|
||||||
|
`tabs_*` snapshots were regenerated for the new bar.
|
||||||
|
|
||||||
**Not tested here:** the window title reaching the window system (the
|
**Not tested here:** the window title reaching the window system (the
|
||||||
harness has none: `window_title()` is what is tested); a company opened
|
harness has none: `window_title()` is what is tested); a company opened
|
||||||
|
|||||||
Reference in new issue
Block a user