A notebook opens in its own order
The hand-made order is where a notebook's own arrangement lives: separators show, rows can be put where they belong, nothing slides about by itself. Starting in "last changed" made both of those look broken until the sort menu was found — pressing "+ Separator" there drew a line the order cannot display, so the button appeared dead. A notebook nobody has arranged still reads newest-first, because untouched rows all carry position 0, so nothing is lost by starting there. The views keep "last changed": they are questions asked of every notebook at once and have nowhere to keep an arrangement. The button that draws a line is now only offered in the order that can show one. Removing a chapter left you stuck in the confirmation. Every destructive action goes through one helper that takes the question down again; this one set the dialog directly and bypassed it, so the chapter was removed and the prompt stayed over the app. Closing now happens where the dialog is rendered, so it happens whoever asked and however they asked. The suites did not catch that, and the reason is worth keeping: they read the list straight through the overlay, which is in the DOM the whole time, and passed while the screen was in fact stuck. Both now assert the question is gone afterwards. The separator is no wider than its name. It sat in a fixed 132px slot — chosen so the row would not jump when renaming began — with a short name floating in a gap it did not fill. Thirteen suites green: 345 browser checks, 241 unit tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cc0b58dd2f
commit
c96885d5b3
9 files changed
+223
-69
No files matched your search
@@ -14,6 +14,23 @@
|
||||
|
||||
import type { Chapter, NoteMeta, Separator, SortMode } from "../../types";
|
||||
|
||||
/**
|
||||
* What a notebook is in until it is told otherwise.
|
||||
*
|
||||
* The hand-made order, because that is where a notebook's own arrangement lives:
|
||||
* separators show, rows can be dragged into place, and nothing slides about on
|
||||
* its own. A notebook that has never been arranged loses nothing by it —
|
||||
* untouched rows all carry position 0 and fall back to newest first, which is
|
||||
* what the old default showed.
|
||||
*/
|
||||
export const DEFAULT_NOTEBOOK_SORT: SortMode = "manual";
|
||||
|
||||
/**
|
||||
* What a *view* is in — "All Notes", "Starred", the bin.
|
||||
*
|
||||
* Not the hand-made one: those are questions asked of every notebook at once, so
|
||||
* there is nothing for an arrangement to belong to and nowhere to keep it.
|
||||
*/
|
||||
export const DEFAULT_SORT: SortMode = "updated";
|
||||
|
||||
export const SORT_LABELS: Record<SortMode, string> = {
|
||||
|
||||
Reference in new issue
Block a user