Every place an entry is logged or edited shows the same panel, EntryPanel in apps/renderer/src/components/entries/EntryPanel.tsx:
- the command palette (Frictionless Capture);
- a log dialog (
LogDialog), opened from a Home card’s +, a trackable’s page, Home’s Diet totals, or an issue’s Answer, which logs on the issue’s day; - the Rundown, one question at a time (The Rundown);
- a calendar day’s Log something, which logs on that day at the moment’s time (Calendar Drill-down);
- the new-entry page, and for an entry already logged, its own page and its dialog, opened from a chart’s point, a calendar cell, a table row, an issue or a log’s toast.
So a trackable is logged the same way wherever you meet it, and a fix to the panel reaches every one of them. The one edit kept apart is the entries table’s inline cell, a quick fix of one value that commits on blur (Data Table).
The header
- The trackable’s icon and name.
- ‹ and › step through the trackable’s entries, newest first, with New at the end. The arrows sit in a slot of fixed width, so they hold still as the label between them changes.
- Between the arrows, for a new entry, the app’s moment in a compact form (The Moment), so a dialog that covers the top bar still shows and changes when the entry is logged at. For an interval or a whole-day trackable it is a day picker instead, since the time is the entry’s own or there is none. For an entry already logged, its own day and time, changed right there in the platform’s own date and time fields.
- On a touch screen in a dialog, a close button at the end of the row, since there is no Escape and a corner button would sit on top of the arrows.
The body
What fills the body depends on the trackable’s kind, each kind’s body registered by kind for a new entry and for one already logged (The List Model):
- a value: a number with its unit, steppers and quick-add amounts, or a slider where the number has one; options; Yes and No. A new number starts inside its limits;
- a moment logged with no value: its large time, which starts at the app’s moment and can be nudged, with Back to now under a time that was moved;
- an interval: its two ends on one row, or the running one with Stop (Intervals);
- an amount of an item: the item picker, how many, and the unit;
- a record: its fields, each by its kind’s widget, and its own value, where it has one beside them (Weight beside Fasted), by the value’s own control above;
- words: a text box.
A whole-day trackable opens on the day’s entry when there is one, with Save changes, and shows the day without a time. A time still to come is said (“This time is in the future.”) rather than snapped back.
The footer
The note button and Log, which logs and offers Undo in a toast, with Add a note beside it. On an entry already logged, Save changes and Delete, which asks first. An entry logged for you says what logged it and that changing it makes it yours (Logged for You). Where a routine is open, the panel says the entry goes into it, with a cross to opt out (Events); a Routine’s own new entry offers its templates to start with.
A number outside its limits says why in Log’s place, at the button’s height (“Water is between 0 glasses and 20 glasses.”), so nothing above it moves while the number is stepped past a limit. A surface with no button, a table’s cell, says it under the number.
The note on an entry (Entry) is out of the way until wanted, since one log in twenty has one: the note button beside Log opens a line above the row, its height animating so nothing jumps, with the caret in it. Enter logs the value and the note together and Escape closes the line, so a log without a note stays one tap. An entry being edited opens with its line open when it has a note, and the toast’s Add a note opens the entry just logged with its line open. A text trackable’s panel, the Inbox’s among them, has no note button, since its words are the value.
Hosts
- The command palette shows the panel inline under the chosen row, with no frame and no name, since the row above already shows them, and its Enter presses the panel’s Log (Frictionless Capture). The palette’s text can also go straight to the Inbox (Inbox).
- An Inbox entry offers Move to…, which turns the same panel into the chosen trackable’s new entry at the time the words were written, with the words as its note. Logging it takes them out of the Inbox, with Undo.
- The Rundown hosts the panel for its current question, and can ask an interval for one end (The Rundown).
On a phone
The app’s viewport is set to interactive-widget=resizes-content, so when the keyboard opens the window shrinks to the space above it, and anything centred in the window would jump. The panel’s dialogs hold still instead:
- Dialogs sit near the top on a touch screen. The library’s dialog placement pins a dialog close to the top on a coarse pointer and caps its height to the visible space, so the keyboard trims it rather than moving it. A mouse keeps the centred dialog. A tap outside a dialog closes it.
- The palette keeps its own place near the top, and its opened row glides to the top of its list, so the panel has the room below it and the keyboard cuts away rows beneath rather than the panel.
- A time is changed where it is shown, in the platform’s own time field: a tap opens the phone’s picker, and a desktop takes typing. There is no popup in between.
Related
The List Model · Intervals · The Moment · Inbox · Frictionless Capture · Events