User interface¶
Requirements and design for the screens shared by all platforms.
Requirements¶
Labels at the top right of a task¶
req~labels-top-right~1
Each task in the list shows its description and, in a row at the right, in the line of the description or above it, its projects, contexts, hashtags, tags such as the due date, and its priority as labels. The description contains no metadata.
Covers:
feat~task-list~1
Needs: dsn
Near due date¶
req~near-due-accent~1
A task whose due date is at most three days away, or has passed, stands out in the list, the board and the agenda, the more so the nearer the date is, so that a task of a low priority is not overlooked. Without groups, the list shows these tasks in a group of their own above the other open tasks. A task with a due date further away, or without one, does not stand out: the order of the list tells about it.
Covers:
feat~task-list~1
Needs: dsn
Dates in words¶
req~dates-in-words~1
The description that the user types for a task may name its dates in words at the end of its text, such as tomorrow, next week, by Wed or tomorrow 3pm.
The task gets the due date, the start date and the times that the words name.
The application shows the resulting line before the task is saved.
Covers:
feat~task-editing~1
Needs: dsn
Complete, reopen and delete a task¶
req~complete-and-delete~1
The user completes and reopens a task in the list and deletes a task in its edit dialog.
Covers:
feat~task-editing~1
Needs: dsn
Edit dialog¶
req~edit-dialog~1
The edit dialog shows the description without metadata in its first field. Below it, the dialog has fields for priority, due date, start date, recurrence, duration, the task of ContextSwitcher, projects, contexts and hashtags. Below these fields, the dialog shows the line as it will be written to the todo.txt file, in a monospaced font.
Covers:
feat~task-editing~1
Needs: dsn
Context menu of the deadline¶
dsn~deadline-menu~1
The context menu of the field Deadline in EditDialog offers, after the entries for the text, the days of deadlineChoices: in 2, 4 and 8 weeks, then the last days of three quarters, named such as Q2 2027.
The quarters start with the one after the next, as the weeks reach the current and the next quarter.
Choosing an entry writes its day into the field; Save writes it into the task, Cancel leaves no trace.
On Android, the entries appear where Compose shows its own text menu; the calendar of the field remains the way there.
Covers:
req~deadline~1
Needs: impl, utest
Dependencies in the edit dialog¶
req~edit-dependencies~1
In the edit dialog, the user chooses the tasks that the task waits for and the tasks that wait for it, without typing tags.
Covers:
feat~task-editing~1
Needs: dsn
Names for priorities¶
req~priority-names~1
The user gives priorities names, such as the numbers 1, 2, 3, 5 and 8 for A to E. The application shows the names where it shows a priority, offers the named priorities for a task, and accepts a name where a filter is typed. The settings offer scales to choose with one click: numbers and steps of the Fibonacci sequence, also preceded by -2, -1 and 0. The file keeps the letters of the todo.txt format.
Covers:
feat~task-list~1feat~task-editing~1
Needs: dsn
Line of the edit dialog¶
req~edit-line~1
The line that the edit dialog shows can be edited as text, and the fields of the dialog follow what is typed.
Covers:
feat~task-editing~1
Needs: dsn
Moving the due date¶
req~move-due-date~1
The user moves the due date of a task to a day nearby with one click: today, tomorrow, this weekend, next weekend, in two weeks or in a month. In the list, this needs no opening of the task.
Covers:
feat~task-list~1
Needs: dsn
Skipping an occurrence¶
req~skip-occurrence~1
The user leaves out one occurrence of a recurring task without completing it, so that it counts as not done and its time is free for other tasks, and the task comes back on its next day. In the list, this needs no opening of the task.
Covers:
feat~task-list~1
Needs: dsn
Failures in the log¶
req~failure-log~1
The application records what failed in its log, so that a problem can be looked up after the fact.
Covers:
feat~platforms~1
Needs: dsn
Sharing the log¶
req~share-log~1
On Android, where the log file is hard to reach on the device, the user passes the log to another application from the settings.
Covers:
feat~platforms~1
Needs: dsn
Version of the build¶
req~build-version~1
The settings show at their bottom the version and the commit the application was built from, so that the user tells which build runs.
Covers:
feat~platforms~1
Needs: dsn
Links in the text of a task¶
req~links~1
An address of the web in the text of a task opens in the browser with a click. A long address takes little room, and the user sees the whole one on request. A task that is saved with an address shows the title of its page instead, as soon as the page is read.
Covers:
feat~task-list~1
Needs: dsn
Folders in the text of a task¶
req~folder-links~1
The path of a folder or file in the text of a task or a note, such as C:\Users\me\Projects or /home/me/projects, opens in the file manager of the system with a click.
Covers:
feat~task-list~1
Needs: dsn
Groups in the list¶
req~list-groups~1
The user divides the list into groups with headings: by priority, project, context, hashtag or due date range.
Covers:
feat~task-list~1
Needs: dsn
Renaming a label¶
req~label-rename~1
The user gives a project, a context or a hashtag another name in all tasks at once.
Covers:
feat~task-editing~1
Needs: dsn
Filter panel¶
req~filter-panel~1
A panel offers the filter criteria. Priorities, projects, contexts and hashtags are offered as the values that occur in the file. The panel stands beside the list where the window is wide enough and slides over the list otherwise.
Covers:
feat~filtering~1
Needs: dsn
Changes by other programs¶
req~external-changes~1
A change that another program makes to the todo.txt file appears in the application without a restart.
Covers:
feat~sync-local-folder~1
Needs: dsn
Choose the file¶
req~choose-file~1
The user sets the location of the todo.txt file.
Covers:
feat~sync-local-folder~1
Needs: dsn
Keyboard¶
req~keyboard-shortcuts~1
With a keyboard, the user adds a task, saves the edit dialog, changes the view and reaches the fields for a new task and for the text of the filter without the pointer.
Covers:
feat~task-editing~1feat~task-list~1
Needs: dsn
Changes that are not saved¶
req~unsaved-changes~1
A dialog that holds changes does not close by accident: before it closes without saving, the user is asked and may return to the dialog.
Covers:
feat~task-editing~1
Needs: dsn
Draft of a new task¶
req~new-task-draft~1
What was entered for a new task is not lost when the dialog is canceled: the next new task starts with it, until it is saved or discarded.
Covers:
feat~task-editing~1
Needs: dsn
Color themes¶
req~color-themes~1
The user chooses the colors of the application: the palette Nord or Everforest, each light, dark or as the system is set, or one of the themes Muted Slate, Dawn and Matrix of the task manager tuxedo, each in its only variant.
Covers:
feat~task-list~1
Needs: dsn
Application icon¶
req~application-icon~1
The application has an icon by which the user tells it from other applications: on the window and in the task bar on the desktop, and in the launcher on Android.
Covers:
feat~platforms~1
Needs: dsn
Settings survive a restart¶
req~persistent-settings~1
The settings are kept between runs of the application.
Covers:
feat~sync-local-folder~1feat~task-editing~1
Needs: dsn
Links to the application¶
req~app-links~1
A link in another program, such as a page of a notebook, opens the application with the tasks of a project, a context or a hashtag. If the application is open already, its window shows the tasks; no second window opens. The user copies the link of a project, a context or a hashtag from its label.
Covers:
feat~filtering~1feat~platforms~1
Needs: dsn
Filter shared with ContextSwitcher¶
req~contextswitcher-sync~1
On the desktop, the user lets koppter and ContextSwitcher share the projects and contexts of their filters. When the projects or the contexts of the filter change in koppter, ContextSwitcher shows the categories of these projects and contexts; when ContextSwitcher changes its project or context, the filter of koppter follows. A change that came from ContextSwitcher is not sent back to it. A selection that comes from ContextSwitcher changes neither the view nor the other criteria of the filter, and does not bring the window to the front, as the user works in ContextSwitcher. The sharing is off until the user turns it on in the settings.
Covers:
feat~filtering~1
Needs: dsn
Links of projects and contexts¶
req~label-links~1
The user gives a project, a context or a hashtag a link, such as one to the section of a notebook or to a category of ContextSwitcher, and opens it from the label. The links are the same on every device that synchronizes the file.
Covers:
feat~task-list~1feat~filtering~1
Needs: dsn
Properties of a project¶
req~project-properties~1
The user edits what the configuration keeps of a project, such as its link, from the label of the project.
Covers:
feat~task-list~1
Needs: dsn
What a new task starts with¶
req~new-task-defaults~1
A new task starts with a priority and a due date that the user states once, so that adding a task takes fewer steps.
Covers:
feat~task-editing~1
Needs: dsn
Contexts of projects¶
req~project-contexts~1
The user states which contexts the tasks of a project have, and a task that is given the project in its dialog is given these contexts with it. The dialog shows which of the offered projects belong to a context of the task, and which contexts to a project of it.
Covers:
feat~task-editing~1
Needs: dsn
Restart to update¶
req~restart-to-update~1
A user who runs the desktop application from a checkout of its sources gets a newer version without leaving the application for a terminal: the application tells that there is one, and one click starts it.
Covers:
feat~platforms~1
Needs: dsn
What's new before a restart¶
req~whats-new~1
Before the restart to an update, the user sees which changes the update brings, and can keep the running version.
Covers:
feat~platforms~1
Needs: dsn
Window after a change of the displays¶
req~display-change~1
When the desktop window moves to a display with another scale, such as when a laptop leaves its docking station, the content fills the window again.
Covers:
feat~platforms~1
Needs: dsn
Design¶
Controller¶
dsn~task-operations~1
TodoController holds the file, the filter and the settings as Compose state.
Adding, completing, reopening, replacing and deleting a task write the whole file to the storage at once; there is no unsaved state.
Before an operation, the controller looks the task up in the current file, because the file may have been reloaded since the task was shown.
Whether dates are written is taken from the settings.
Covers:
req~complete-and-delete~1req~no-dates-by-default~1
Needs: impl, utest
Visible tasks¶
dsn~visible-tasks~1
TodoController.visible is the list of entries that match the filter, in list order.
With a search text, the list and the inbox also show the tasks before their start date.
Covers:
req~filter-criteria~1req~list-order~1
Needs: impl, utest
Task card¶
dsn~task-card~1
TaskCard shows a checkbox for the completion state and, to its right, the description and the labels in a right-aligned flow row.
Where both fit next to each other, they share one line, so that the description stands at the height of the checkbox; otherwise the labels stand above the description, each with the whole width.
A click on the card opens the edit dialog.
Covers:
req~labels-top-right~1req~complete-and-delete~1
Needs: impl, utest
Accent of a near due date¶
dsn~near-due-accent~1
Task.nearDue gives the days until the due date of an open task, 0 from its day on, for at most NEAR_DUE_DAYS days ahead, and null otherwise.
TaskCard draws a border in the color of errors, opaque on the day and fainter by a fifth for each day before it, and states the urgency, such as Due in 2 days, to a screen reader.
Covers:
req~near-due-accent~1
Needs: impl, utest
Group of the tasks due within three days¶
dsn~near-due-group~1
listParts puts the open tasks that are not overdue and for which Task.nearDue gives a number into the part Due within 3 days, between Overdue and Later, so that a task of a low priority that is due within three days stands above the tasks of a higher priority that are not.
Within the part, the tasks keep the order of the list: by priority, then by due date.
Covers:
req~near-due-accent~1
Needs: impl, utest
Groups of the list¶
dsn~list-groups~1
TodoController.listGroups divides the visible tasks by the attribute listGroupKey with groupEntries, as the board does for its columns.
Without an attribute, listParts divides them into the overdue tasks, the tasks due within three days, the other open tasks and the completed ones, with the titles Overdue, Due within 3 days, Later and Done; a part without tasks is left out.
TaskList shows the groups one after the other, each below a heading with its title and the number of its tasks.
The heading stays at the top of the list while the tasks of its group are scrolled, until the heading of the next group takes its place.
A change of the filter scrolls the list to its top.
The heading of a priority, there and above a column of the board, shows the label of the priority as the tasks have it: a priority may be named by a number, which next to the number of the tasks reads as a second count.
A task with several values of the attribute stands in each of their groups.
A step and a drag stay within a group; a task is given another value on the board or in the edit dialog.
Covers:
req~list-groups~1
Needs: impl, utest
Log of failures¶
dsn~failure-log~1
TodoController passes what failed to the function log that the platform gives it: an operation whose failure it shows to the user, with the exception, a synchronization that failed, with the cause that SyncStatus carries, and a clone that failed in the settings dialog, with the exception.
For a calendar that was not read, it passes the host of the address and the kind of the exception only, as the address is a secret.
The desktop application and the Android application write these as errors to tinylog, and they do the same for an exception that no code caught.
logToFile names the log file for tinylog before anything logs: the desktop application passes the directory logs of its data directory, and KoppterApplication passes the directory logs of the application in the shared storage of the device, or in its private storage if there is none.
On Android, warnings and errors go to logcat as well.
Covers:
req~failure-log~1
Needs: impl, utest
Button that shares the log¶
dsn~share-log~1
App takes a function shareLog; if the platform gives one, SettingsDialog shows the button Share log, which calls it and leaves the dialog open.
MainActivity gives the function: it sends the entries of the last hour of the newest log file, at most their last 60,000 characters, as text to the application that the user chooses, with koppter itself left out of the choice.
As text, the log is shown by the receiving application before it is sent on, and it fits into what Android passes between applications.
logSince cuts the log at the first entry of that hour by the date that starts each entry; older entries belong to another problem than the one reported.
The desktop application gives no function: its log directory is reached with the file manager.
Covers:
req~share-log~1
Needs: impl, utest
Line with the version of the build¶
dsn~build-version~1
App takes a text version; if the platform gives one, SettingsDialog shows it as its last line; a long press on it copies the hash of the commit to the clipboard and adds Copied with the hash to the line.
The build of :android writes the short hash and the date of the commit of HEAD into BuildConfig.GIT_COMMIT_LINE; MainActivity puts the version name of a release before it.
The build of :app writes the version of a release and the same commit line into the resource koppter-version.txt, which the desktop application reads.
Covers:
req~build-version~1
Needs: impl, utest
Links¶
dsn~links~1
LinkedText shows the parts of a description that start with http:// or https:// (webAddresses) as links, which the task card and the tasks of a context in the overview show in the primary color and underlined.
An address ends at a blank, and before a mark that ends a sentence or closes a bracket.
An address of more than 50 characters is shown with its first 49 characters and an ellipsis (shortened); the link and the file keep the whole address.
While the pointer of the mouse rests on a cut address, a tooltip shows the whole one.
The tooltip does not react to a long press, which starts the drag of a card.
A click on a link opens it through the UriHandler of the application and does not open the task.
Covers:
req~links~1
Needs: impl, utest
Links of folders¶
dsn~folder-links~1
LinkedText shows the paths in a text (folderPaths) as it shows addresses of the web.
A path starts a word, or follows an opening bracket, with a drive (C:\), a share (\\server), the home (~/) or the root (/); it ends at a blank and before a mark that ends a sentence or closes a bracket, so a path with a blank is cut there.
A click passes the link koppter-folder: with the path to the UriHandler of the application, which opens it with openFolder through the program that the system gives the folder or file.
A path that does not exist, and any path on Android, shows Not found: or Not opened: with the path in the error line.
Covers:
req~folder-links~1
Needs: impl, utest
Titles of links¶
dsn~link-titles~1
After the edit dialog saves a task, addLinkTitles reads the page of each address of the web in it that is not yet part of a Markdown link, in the background.
The title of the page (pageTitle) replaces the address in the file by the Markdown link [title](address) (withLinkTitle).
Brackets in the title become parentheses, and a word of the title that would be a project, context, hashtag or tag loses that form, so that the link stays one link and adds no label.
A page that cannot be read or has no title leaves the address, and so does a task that changed in the meantime.
LinkedText shows a Markdown link with its title, and a tooltip shows its address while the pointer of the mouse rests on it.
Covers:
req~links~1
Needs: impl, utest
Links of projects and contexts¶
dsn~label-links~1
The key links of koppter.yml maps a project, a context or a hashtag, written with its sign as +Fair, @phone or #quick, to a link; the settings dialog edits it, one per line as label = link.
ConfigFile.link gives the link of a label: its own, or that of the nearest project or context above it.
The menu of a label (WithLinkMenu), at a task and in the filter panel, has Open link for a label with a link, which opens the link through the UriHandler of the application.
The link is not checked: what the platform cannot open is reported as for a link in a task.
Covers:
req~label-links~1adr~label-links~1
Needs: impl, utest
Properties of a project¶
dsn~project-properties~1
The menu of a project label, at a task and in the filter panel, has Edit…, which opens a dialog with the link, the contexts of the tasks and the LaTeX document of the project.
They are the entries of the project under the keys links, project-contexts and latex of koppter.yml (ConfigFile.projectProperties, ConfigFile.withProjectProperties); an empty field removes the entry.
Without a configuration file, as for a file chosen through the document picker of Android, the item is disabled.
Covers:
req~project-properties~1
Needs: impl, utest
What a new task starts with¶
dsn~new-task-defaults~1
The key new-task of koppter.yml has the entries priority and due; the settings dialog edits it, one per line as name = value.
ConfigFile.newTask gives the task that the dialog of a new task starts with.
The priority is given by its name or by its letter.
The due date is given by a name of dueDays, which are the days of the menu of the due date under their names on every day, or as a filter reads a date: tomorrow, or an interval from today such as 10d.
A value that is not understood is left out.
The dialog saves a new task only once it differs from what it started with, so that the priority and the due date alone are no task.
A storage that keeps no configuration file starts a new task empty.
Covers:
req~new-task-defaults~1
Needs: impl, utest
Contexts of projects¶
dsn~project-contexts~1
The key project-contexts of koppter.yml maps a project, written with its sign as +Fair, to its contexts, separated by blanks or commas; the settings dialog edits it, one project per line as +project = @context.
ConfigFile.contextsOf gives the contexts of a project: its own and those of each project above it.
EditDialog adds them to the contexts of the task when a project is added to its projects, for a new task and an existing one.
A project that the task already has adds nothing, so that a context that the user removes stays removed, and so does a project that is typed into the description.
Covers:
req~project-contexts~1
Needs: impl, utest
Related names in the dialog of a task¶
dsn~edit-related-names~1
Among the known names that the dialog of a task offers, EditDialog marks those that belong to a name of the other kind that the task has.
A project is marked when one of its contexts (ConfigFile.contextsOf) is a context of the task or a level above one, and has the colors of a context (contextColors).
A context is marked when it is one of the contexts of a project of the task and the task does not have it, and has the colors of a project (projectColors).
The colors of the other kind tell where the relation comes from, and a marked name cannot be taken for one of the task, which has the colors of its own kind and a cross.
A screen reader reads a marked name as Related.
A list that would hide a marked name behind More… starts open, as a whole, so that the order of the names stays the same; Less closes it, and what the user chose with More… or Less stays while the dialog is open.
Picking the project of a context that is already chosen, such as the one that the filter gave a new task, is the frequent case: the marked project is in view without a search.
Covers:
req~project-contexts~1
Needs: impl, utest
Completion of projects and contexts in the settings¶
dsn~config-completion~1
The fields Contexts of projects, Links of projects and contexts and Share actions offer the projects and contexts of the file as chips below the field while a word that starts with + or @ is typed, as the dialog of a task does.
Any part of a name matches.
A chip replaces the typed word with the name and its sign.
Covers:
req~project-contexts~1
Needs: impl, utest
A file opened from the settings¶
dsn~settings-open-file~1
A file that the user chooses with Choose file and the todo.txt file of a folder chosen with Choose folder becomes the file of the application through onOpenFile, and the dialog is left, so that the tasks of the file show.
Nothing that stood in the dialog is written, neither to that file nor to the one from before: what was typed into the dialog is dropped.
A chooser that fails is reported at the field, in the color for errors, and the dialog and the open file stay; a chooser that the user leaves without a choice changes nothing.
The configuration of the dialog is thus written to the file it was read from, never to another one.
A path typed into the field takes effect with Save, which writes the fields of the dialog to the file that is still open and then opens the other one.
A repository that the dialog clones is opened the same way: dsn~git-setup-dialog~1 says what Clone does.
Covers:
req~choose-file~1
Needs: impl, utest
Line below the overdue tasks¶
dsn~overdue-separator~1
TaskList draws a line between the last overdue task and the first task that is not overdue, in each group that has tasks of both kinds.
When the pointer rests on the line, or after a long press on it on a phone, a tooltip says that the overdue tasks stand above it.
The list without groups has none, as its overdue tasks stand below a heading of their own.
Covers:
req~list-order~1
Needs: impl, utest
Menu of the due date¶
dsn~due-menu~1
A click with the secondary mouse button on a task card opens a menu at the pointer; a click on the label of its due date opens it below the label.
The menu offers the days of dueChoices: today, tomorrow, this weekend, in three days, next weekend, in two weeks and in a month, each day once and in the order of the days; a weekend stands for its Sunday.
A weekend and a week end on their Sunday, as in the dates that are typed in words.
Choosing a day calls TodoController.setDue, which sets the due: tag and leaves the rest of the line as it is.
Edit… follows the days and opens the calendar of the due date of the edit dialog on the due date of the task, with the description of the task in its title, as the calendar covers the card; its OK sets the chosen day, its No date removes the tag, and Esc or a click beside it changes nothing.
For a task that names an item of Outlook in its tag ol:, Focus in Outlook follows the days and shows the item in Outlook, as the label Outlook does.
For a task with a due date, the menu ends with No due date, which removes the tag.
The cards of the board and of the agenda are the same TaskCard and have the menu as well.
A long press with the finger vibrates, and lifting the finger then opens the menu where the finger was; a finger that moves instead drags the card where the card can be dragged.
Focus in Outlook stands only where the bridge to Outlook runs, as the label Outlook opens the item only there.
Covers:
req~move-due-date~1
Needs: impl, utest
Skipping an occurrence¶
dsn~skip-occurrence~1
The menu of a task card ends with Skip this time for an open task that comes back: one with the tag rec:, and one whose text an entry of ice_recur.txt has, as iceRecurAdds compares them like the run of the schedule.
For a task with rec:, the item shows the day of the next occurrence; a line separates it from the days.
TodoController.skip replaces a task with rec: in its line by Task.nextOccurrence, and removes a task of the schedule; nothing is completed, so no stars are given and no next occurrence is added a second time.
The controller reads ice_recur.txt together with the configuration and after an edit of the schedule, so that drawing a menu reads no file.
A task of Outlook and a TODO of LaTeX are not offered, as they cannot be completed in the list either.
Covers:
req~skip-occurrence~1adr~skipped-occurrence~1
Needs: impl, utest
Days for the due date in the edit dialog¶
dsn~due-chips~1
Above its date fields, EditDialog shows the days of dueChoices as chips.
A click on a chip writes its day into the field of the due date, and a click on the chip of the day that the field holds empties the field.
A device without a mouse thereby reaches these days also for a task without due date, which has no label that opens the menu.
Covers:
req~move-due-date~1
Needs: impl, utest
Task labels¶
dsn~task-labels~1
TaskLabels emits one label per project, context, hashtag and tag and one for the priority, in this order.
A tag label shows its key in front of the value.
The colors are taken from the Material color scheme; a due date in the past uses the error colors.
Covers:
req~labels-top-right~1
Needs: impl
Dates in words¶
dsn~dates-in-words~1
Task.withDates, which DatePhrase implements, reads the words.
The phrases are those that SkedPal reads in the title of a task, in English and in any case of the letters; the documentation lists them.
A phrase is read at the end of the text only, where projects, contexts, hashtags and tags may follow it; the same words elsewhere stay text.
It is removed from the text and becomes the tags t:, due:, at: and dueby:.
A tag that the line already has stays.
A weekday or a day of a month names the first such day from today on, and a week runs from Monday to Sunday.
Covers:
req~dates-in-words~1
Needs: impl, utest
Dates in words in the edit dialog¶
dsn~edit-dates~1
EditDialog applies Task.withDates to the task that its fields give, once the description differs from that of the task: words that a task was written with stay words.
The dialog marks the words that become dates with a background and says below the field what the mark means; the resulting line shows the tags.
A date in a field of the dialog wins over the words.
Covers:
req~dates-in-words~1
Needs: impl, utest
Buttons in the heading of a dialog¶
dsn~dialog-header~1
The buttons that close a dialog, such as Cancel and Save, stand in its heading (DialogHeading), which does not scroll with the fields: they stay in view on a phone and are not covered by its keyboard.
This holds for the edit dialog, the settings, the plan dialog, the editor of a time map, the editor of the schedule, the templates and the applications of the device.
A line below the heading marks its edge once the fields scroll below it; it is always laid out, so that the fields do not move when it appears.
Buttons that do not close the dialog, such as Delete, Revert and Share log, stay at the end of the fields, away from Save.
The plan dialog scrolls to the result of the planning, which stands below the settings.
Covers:
req~edit-dialog~1req~unsaved-changes~1
Needs: impl, utest
Width and place of a dialog¶
dsn~dialog-frame~1
The dialogs with a heading are 760 dp wide where the window allows that, and stand at the top of the window, 16 dp below its edge.
So their buttons are at the same place in each dialog, and a dialog that grows while it is open grows downwards and does not move its heading.
The edit dialog has the width that the user dragged it to (dsn~edit-resize~1).
A click beside the dialog closes it as before.
Covers:
req~edit-dialog~1req~unsaved-changes~1
Needs: impl, utest
Dialogs without an animation¶
dsn~dialog-without-animation~1
Every dialog, including the questions and the pickers of a date or a time, appears and closes without fading. On the desktop, Compose Multiplatform 1.12 removes the layer of a dialog only at the end of its fade-out; a dialog whose fade-out did not end stayed as an invisible layer over the window, which took every click, key and movement of the mouse.
Covers:
req~edit-dialog~1req~unsaved-changes~1
Needs: impl, utest
Calendar of a date that depends on the due date¶
dsn~date-picker-context~1
The calendar of a field of EditDialog names the field in its title.
For the start date and the deadline, the title also names the due date, as the calendar marks only today and the chosen day, and without a date of the field the calendar opens on the month of the due date.
The buttons that write a value, such as 1 week before due, stand between the calendar and the buttons No date and OK.
Covers:
req~edit-dialog~1
Needs: impl, utest
Help at the fields of the edit dialog¶
dsn~edit-help~1
The fields of EditDialog for the dates, the times and the recurrence show a sentence on what they mean, with their tag, while the pointer rests on them for half a second (WithHelp).
The help is bound to the pointer alone: on a touch screen, a long press on a field belongs to its text.
The field for the tag t: is named Start date, as topydo names that date; Simpletask calls it the threshold date.
Covers:
req~edit-dialog~1
Needs: impl, utest
Start date before the due date¶
dsn~start-before-due~1
The field Start date of EditDialog takes a date or the distance before the due date, such as 7d or 1w (Task.startBefore).
Below the field, the dialog shows the other form: Starts and the date for a distance, the distance for a date.
While the dialog is open, a distance follows a change of the due date; the file gets the date, as other todo.txt tools read only a date in t:, and a recurrence keeps the distance from then on.
A distance without a due date is an error of the field.
The calendar of the field and its context menu offer 1 week before due and 3 days before due, which write the distance into the field, each with a sentence on its meaning while the pointer rests on it.
Covers:
req~edit-dialog~1
Needs: impl, utest
Choosing times and durations in the edit dialog¶
dsn~edit-pickers~1
The fields of EditDialog for the due time and the fixed time have a button that opens the clock face of Material with 24 hours (TimeField); without a time, it starts at noon.
The fields for the duration, the travel time and the time spent have a button that opens two wheels for hours and minutes, the minutes in steps of five (DurationField, decision 0037); without a duration, they start at half an hour.
The field for the recurrence has a button that opens a wheel for the amount, from 1 to 30, a wheel for the unit, and the choice whether the interval counts from the completion or from the due date (RecurrenceField); without a recurrence, they start at one week from the completion.
One notch of a mouse wheel moves a wheel by one value (NotchPicker).
OK writes what was chosen into the field as text, and the other button of each dialog empties the field.
The fields still take typed text.
Covers:
req~edit-dialog~1
Needs: impl, utest
Edit dialog¶
dsn~edit-dialog~1
EditDialog keeps the edited values as dialog state and computes the resulting task with Task.edit and Task.withTag on every change.
The resulting line is shown below the fields in a monospaced font.
A heading names the dialog: New task or Edit task.
The description starts with the cursor at its end.
Projects, contexts and hashtags are chips: those of the task, then the three known ones that the most open tasks carry, to add with a click, then More….
A field of the size of a chip to search for a name or add another one stands at the right end of the row in a dialog at least 600 dp wide, so that the three fields stand one below the other; in a narrower one it follows the chips, as a column of its own would leave one chip per line.
Adding a known name is what the user does here most often, and a file has dozens of them: all as chips would push the fields below out of view on a phone.
More… shows the other known names after them, in the order of the hierarchy and wrapped like the chips before them, as a row that scrolls sideways hid names on a phone; Less hides them again.
Typing into the field shows, instead, all known ones that contain the typed text, so that a context below another one is found by its last level.
A chip of the task has the colors of its label in the list (projectColors, contextColors, hashtagColors).
The calendar of the deadline has the button Use due date while the task has a due date, as the two are often the same day.
The calendar of a date starts its weeks on Monday, whatever the locale of the system (mondayFirstLocale, decision 0049).
Save is disabled while a date, the recurrence or the duration is invalid or the task is empty.
The dialog also serves for a new task.
Covers:
req~edit-dialog~1req~complete-and-delete~1adr~metadata-after-description~1
Needs: impl, utest
New name in the edit dialog¶
dsn~new-name-chip~1
Typed text that is no known name of its kind shows one more chip after the found ones: the sign and exactly the typed letters, marked with a plus. Creating a name is rarer than choosing a known one, so the chip comes last, and it is the first one that Shift+Tab reaches from the field. Enter in the field, a click on that chip, or Enter on it while it has the focus adds the name; a click on a found chip adds that one instead. Shift+Tab goes on to the left through the chips, Tab to the right and back into the field. Text that differs from a known name only in case adds the known name and shows no chip, as two spellings would split the tasks of one name. A name that is known in the very spelling of the text, as a chip offers it, is that one, even if the file holds it in another case as well.
Covers:
req~edit-dialog~1
Needs: impl, utest
One search for projects, contexts and hashtags¶
dsn~search-all-names~1
Text typed into the field of projects, contexts or hashtags shows the known names that contain it in all three lists, not only in its own. Which kind a name is, is easily mixed up, and a known name of another kind is mostly what was meant: it is in view before a new name is created. The chip of a new name stands only in the list whose field holds the text. Adding a name, of whichever list, empties the field.
Covers:
req~edit-dialog~1
Needs: impl, utest
Dependencies in the edit dialog¶
dsn~edit-dependencies~1
Below the hashtags, EditDialog has the rows Waits for and Before: the chosen tasks as chips, and a field whose text suggests up to five open tasks whose description contains it.
The two labels have the same width, so that the two fields start at the same place.
waitsFor and waitingFor fill the rows from the tags id: and p: of the tasks of the file, as topydo writes them.
withDependencies writes the choice back: a task that the task waits for gets p: with the id: of the task, a task that waits for it gives its id: to a p: of the task, and a task that needs an id: and has none gets the next free number.
Removing a chip removes only the tag of that dependency.
Save writes the other tasks that changed together with the task.
Covers:
req~edit-dependencies~1
Needs: impl, utest
Width of the edit dialog¶
dsn~edit-resize~1
The edit dialog is 760 dp wide where the window allows that, which is enough for the priorities and the days of the due date in one row each.
On a device with a keyboard, its right edge has a handle that is dragged: the dialog stays in the middle of the width of the window, so its width changes by twice the way of the pointer, between 420 and 2400 dp.
The dialog is a layer of the window of the application and not a window of its own, so it has no frame of the operating system to drag.
The width is kept in the settings of the device as editWidth when the drag ends.
Covers:
req~edit-dialog~1
Needs: impl, utest
Names for priorities¶
dsn~priority-names~1
The key priorities of koppter.yml maps the letter of a priority to its name; the settings dialog edits it, one priority per line as letter = name.
PriorityNames gives the name of a priority, which is its letter if it has none, and the priorities to offer: those with a name, or A to F without names.
The label of a priority, the filter panel, the titles of the board columns by priority and the edit dialog show the name.
TodoController.boardColumns replaces a name by its letter in the priority terms of the filters, so that a filter names a priority by its name or by its letter, and the settings keep the filter as it was typed.
Below the field for the names, the settings dialog has one button per scale, which fills the field.
Covers:
req~priority-names~1adr~priority-names~1
Needs: impl, utest
Line of the edit dialog¶
dsn~edit-line~1
The line of EditDialog is a text field.
What is typed there is parsed as a task, from which the fields of the dialog start anew; a tag that has no field stays in the line.
While the field has the focus, it shows the text as it was typed; a field that is edited afterwards changes the line as before.
Covers:
req~edit-line~1
Needs: impl, utest
Filter panel¶
dsn~filter-panel~2
FilterPanel shows the criteria of Filter under the heading Filter: the start date as a checkbox at the top, and the completion state as the two switches Open and Done at the bottom, of which at least one is on.
The two switches stay in view below the part of the panel that scrolls, so that a window of common height shows them.
The button Clear all in the heading resets the filter, Top and Next.
The text of the filter is a field (SearchField) of the main screen above the list where the panel stands beside it; on a narrower screen, it is the first field of the panel in the drawer, and a search button to the left of the button for a new task opens the drawer and gives the field the focus.
While the field has a text, a button at its end empties it.
Priorities, projects, contexts and hashtags are shown as the labels that the task list uses for them.
The selected values, framed in the accent color, stand below the title of the criterion and the other values below them, both sorted; a click on a label moves it to the other group.
While none is selected or excluded, the word any follows the title.
Without a keyboard, the area of a label that reacts to a tap reaches 10 dp above and below it, instead of 5 dp.
From a width of 840 dp on, the main screen places the panel beside the list; below that, the panel is the content of a navigation drawer and has a button that closes it.
Covers:
req~filter-panel~1
Needs: impl, utest
Sign of an active filter¶
dsn~filter-active~1
In a narrower window, the drawer hides the criteria of the filter, so the search button tells whether they narrow the list. While the filter differs from its default or Top or Next is on, which is when Clear all is enabled, the button has the accent color of a selected switch, and its description for a screen reader adds that a filter is active. A wide window shows the criteria beside the list and has no such sign.
Covers:
req~filter-panel~1
Needs: impl, utest
Matches of the filter text in the drawer¶
dsn~filter-matches~1
While the field for the text of the filter in the drawer has a text and the view shows all its matches, a line below it shows the number of visible tasks and the button Go to results, which closes the drawer.
Covers:
req~filter-panel~1
Needs: impl, utest
Matches of the filter text that the view hides¶
dsn~filter-hidden-matches~2
While the text of the filter finds more tasks in the file, completed ones and those before their start date included, than the view shows, a line below the field reads, for example, 2 matches in the file, 0 shown here. Its button Show in List, or Show all in the list, switches to the list and shows every task with the text: it keeps the text and resets the other criteria of the filter, Top and Next; in the drawer, it also closes the drawer. While the view shows all matches, the line is absent, so that it stands only where it explains why a match is missing. Clearing the text of the filter that Show all left ends it: the filter returns to the open tasks, since completed ones are rarely searched for. The views of the plan count the tasks of their days: today, the seven days of the agenda, and the current week.
Covers:
req~filter-panel~1
Needs: impl, utest
Excluding in the filter panel¶
dsn~filter-exclusion~1
Filter holds excluded projects, contexts and hashtags: Filter.matches leaves out a task that has one of them, a project or a context with those below it, whatever is selected.
The menu of a label of the filter panel, which a click with the secondary button or a long press opens, has the entry Hide these tasks; it excludes the value and ends its selection.
An excluded value stands beside the title of its criterion after the word not, and a click on it ends the exclusion; Clear all ends all of them.
The exclusion is part of the filter, so that the list, the board, the overview and the inbox follow it.
Covers:
req~filter-panel~1req~filter-criteria~1
Needs: impl, utest
Search for labels in the filter panel¶
dsn~filter-label-search~2
The projects, the contexts and the hashtags of FilterPanel each have a field at the end of their title line that narrows the values of that criterion to those whose name contains the typed text, whatever the case of its letters.
A leading +, @ or # is ignored.
A project or a context above a found one stays, so that the tree keeps its shape; the selected and the excluded values stay as well.
The field does not change the filter and is not kept.
While it has a text, a button at its end empties it, and a line below it says how many values it finds, for example 3 of 6 match.
Covers:
req~filter-panel~1
Needs: impl, utest
Labels of another kind that a search finds¶
dsn~filter-label-search-elsewhere~1
While the text of the search field of projects, contexts or hashtags also finds labels of the other two kinds, and their fields do not hold the same text, the line below the field also names them with their numbers, for example also: contexts (2), hashtags (1). Its button Search there too puts the text into the fields of these kinds. The other kinds are not narrowed while the text is typed, so that the panel does not change below the field that is typed into.
Covers:
req~filter-panel~1
Needs: impl, utest
Width of the filter panel¶
dsn~filter-resize~1
Where the filter panel stands beside the list, a handle between them is dragged sideways to change the width of the panel, between 260 dp and half the width of the window.
The width is kept in the settings of the device as filterWidth when the drag ends.
Covers:
req~filter-panel~1
Needs: impl, utest
Renaming a label in the filter panel¶
dsn~label-rename~1
The menu of a project, a context or a hashtag of the filter panel has the entry Rename…, which asks for the new name: one word, and for a hashtag one that a hashtag can have.
TodoController.rename writes the name with TodoFile.rename into every line that has the label, completed tasks included, and leaves the other lines as they are.
renameLabel replaces the label where it is a word of its own, and the start of each label below it, so that renaming +papers makes +papers>survey a project below the new name and leaves +papers2 alone.
The scheduled tasks of ice_recur.txt are renamed in the same way, as they would bring the old name back, and the filter follows.
ConfigFile.renamed renames the label in the links and in the contexts of projects of koppter.yml, where the contexts of a project with a renamed context are then written with their signs and separated by blanks.
The limits and the board columns of koppter.yml keep the old name.
Covers:
req~label-rename~1
Needs: impl, utest
Filter after a restart¶
dsn~filter-remembered~1
Filter.toLink writes the whole filter as a link to the application, and filterOfLink reads it back.
TodoController keeps that link in the settings of the device with every change of the filter and starts with the filter it names; the filter that restricts nothing is kept as an empty value.
A change of the todo.txt file in the settings ends the filter, as it names projects and contexts of the former file.
The options of the first tasks and of the next actions are not kept.
Covers:
req~persistent-settings~1req~filter-panel~1
Needs: impl, utest
View after a restart¶
dsn~view-remembered~1
TodoController reads the view, the attribute of the groups of the list, that of the columns of the board and that of the tiles of the overview from the settings of the device and writes them there with every change.
The application therefore starts with the view that was shown last.
A name that this version does not know gives the list, the list without groups, the board by priority and the overview of the contexts.
Covers:
req~persistent-settings~1
Needs: impl, utest
Main screen¶
dsn~main-screen~1
The main screen consists of the top bar, the filter panel, the switches for the view, the field for the text of the filter below them where the window is wide, the task list and a button for a new task, which opens the edit dialog; a narrower window has a search button of the same size to its left instead of the field.
A wide window has no top bar: the title of the window already names the application, and the buttons of the top bar stand at the end of the row of the switches for the view, which leaves the filter panel and the tasks a line more.
There, the button for a new task is the first of these buttons.
A button of the top bar shows its description while the pointer rests on it.
In a narrower window, the buttons for a new task and for the search float above the list: they slide away while the user scrolls down, so that they cover no task, and return with a scroll up, at the end of the list and with another view.
Errors of the storage are shown in a snackbar.
The texts use two sizes of the type scale of Material (compactTypography): the medium body size for texts, fields, buttons and titles, and the small body size for labels and remarks; a title differs from a text by its weight.
That suits a window on a desktop and keeps a field of one line at the same height whether it is empty or filled.
The search fields (SearchField) are 32 dp high, as the field that adds a project in the edit dialog, instead of the at least 56 dp of a text field of Material.
Covers:
req~filter-panel~1
Needs: impl, utest
Keyboard shortcuts¶
dsn~keyboard-shortcuts~1
The main screen is focusable and takes the focus whenever none of its elements has it and no dialog is open, so that keys always reach it; it handles the keys before its elements do.
With Ctrl, or the command key: N opens the dialog for a new task, E searches as this key does in OneNote, F gives the focus to the text of the filter as this key searches in browsers and editors, and 1 to 8 show the views in the order of their switches: today, list, agenda, week, board, inbox, overview and, where there is one, the family view.
The search shows the list with every task, the completed ones and those before their start date included: it resets the filter with its option for the first tasks and gives the focus to the text of the filter.
Where that field lies in the drawer, the drawer opens first.
With Ctrl and Shift: A opens the dialog for a new task, F gives the focus to the text of the filter, L opens the plan dialog, and O, Y and C show the list, the agenda and the week, as these keys do in SkedPal.
In the edit dialog, Ctrl and Enter save if Save is enabled.
LocalKeyboard tells whether the device has a keyboard; with one, the description of the edit dialog and the field of the inbox get the focus when they appear.
Without one, the description gets the focus in the dialog of a new task only, as the keyboard of the screen hides half of an existing task.
On Android, it is the keyboard of the configuration of the device.
Covers:
req~keyboard-shortcuts~1
Needs: impl, utest
Changes that are not saved¶
dsn~unsaved-changes~1
GuardedDialog is the dialog of the edit dialog, the settings, the plan dialog and the editor of the schedule.
On Esc, on a click beside the dialog and on the back button, it closes only if the values of the fields are those the dialog started with, or those that the plan dialog saved last.
Otherwise it asks whether to discard the changes; Keep editing returns to the dialog as it was.
The buttons of a dialog that close it without saving do so without the question.
Covers:
req~unsaved-changes~1
Needs: impl, utest
Draft of a new task¶
dsn~new-task-draft~1
Cancel in the dialog of a new task hands what differs from an empty new task to App as a Draft: the task, the note and the images added to it.
The dialog of the next new task starts with the draft and says so in its heading.
Save removes the draft, and so does Discard: with a draft, the dialog asks on Esc, on a click beside it and on the back button even if nothing was typed since.
The draft holds no dependencies, as the other tasks may change while it waits, and it lasts as long as the application runs.
Covers:
req~new-task-draft~1
Needs: impl, utest
Reload on external change¶
dsn~reload-on-external-change~1
The main screen asks the storage for its version every two seconds and reloads the file when the version differs from the one last read or written. A reload that returns the text that koppter's last write replaced is skipped once, as a document provider on Android may return it for a while after the write: a deleted task stays away.
Covers:
req~external-changes~1
Needs: impl, utest
File storage¶
dsn~file-storage~1
FileStorage reads and writes a file in the file system.
It writes to a temporary file in the same directory and moves it over the target.
The version is the modification time together with the size.
Covers:
req~choose-file~1req~external-changes~1
Needs: impl, utest
Settings file¶
dsn~settings-file~1
The settings are stored as a Java properties file. Unknown keys are ignored and missing keys take their default.
Covers:
req~persistent-settings~1
Needs: impl, utest
Color themes¶
dsn~color-themes~1
colorScheme fills the roles of the Material color scheme with the colors of the chosen palette in its light or dark variant.
A container color is the color of its role mixed into the color of the cards; the text on an accent color is the end of the palette with the higher contrast.
A selected chip has the accent color (selectedChipColors), as the pale container that Material gives it hardly stands out from an unselected chip.
The palette and the variant are settings; App asks the system for the variant if the setting leaves it to the system.
A palette with one variant names it in ColorTheme.dark, which overrides the setting of the variant; the settings dialog hides that setting while such a palette is chosen.
A choice in the settings dialog is saved and applied at once, so that the user sees the colors behind the dialog.
Covers:
req~color-themes~1adr~colors-from-published-palettes~1adr~palettes-with-one-variant~1
Needs: impl, utest
Title bar in the variant of the colors¶
dsn~title-bar-theme~1
On Windows and macOS, the title bar of the window is drawn by the system.
App reports the light or dark variant to the platform.
On Windows, the desktop target sets the attribute DWMWA_USE_IMMERSIVE_DARK_MODE of the window to it; on macOS, the client property apple.awt.windowAppearance of its root pane.
Covers:
req~color-themes~1
Needs: impl
Application icon¶
dsn~application-icon~1
docs/logo.svg is the drawing of the icon: a K as the cabin of a helicopter, in colors of the palette Nord.
The desktop window shows koppter.png, an export of that drawing in the resources of the desktop target.
The Android application has an adaptive icon whose foreground repeats the paths of the drawing as a vector drawable.
Covers:
req~application-icon~1
Needs: impl
Settings dialog¶
dsn~settings-dialog~1
SettingsDialog edits the location of the todo.txt file, the switch for writing dates, the number of top tasks, the board columns defined by filters, the names of the priorities, the links of projects and contexts and the colors.
Tabs group the settings: File (the file, the shared lists and the git repository), Tasks, Colors, and Integrations where the platform offers Outlook, ContextSwitcher or LaTeX.
The title, the tabs and the buttons stay in view while the content of a tab scrolls, and what was typed in a tab stays when another tab is shown.
The dialog takes the height of the window, so that its edges stay where they are when another tab is shown.
A changed location makes the controller load the other file.
The fields for the board columns and the share actions hold what is in effect, which without a definition of the user are the defaults of the configuration.
A field for a block of the configuration file shows an example in a pale color while it is empty.
The help of the field for the file tells that the files next to the todo.txt file belong to it, and a note that the platform passes stands below the button that chooses a file (dsn~choose-file~1).
Below the field for the file stands what holds for a file in a git repository.
Covers:
req~choose-file~1req~no-dates-by-default~1
Needs: impl, utest
Locations on the desktop¶
dsn~desktop-locations~1
On the desktop, the settings file is settings.properties in %APPDATA%\koppter on Windows and in $XDG_CONFIG_HOME/koppter or ~/.config/koppter on Linux.
The files that the application creates are in its data directory: %APPDATA%\koppter on Windows and $XDG_DATA_HOME/koppter or ~/.local/share/koppter on Linux.
Its directory logs holds the log files koppter-0.log and following, the highest number being the newest; a file is closed at one megabyte, and three files are kept.
Without a configured location, the todo.txt file is todo.txt in the home directory if that file exists, as earlier versions kept it there, and todo.txt in the data directory otherwise.
Covers:
req~persistent-settings~1req~choose-file~1
Needs: impl
Links to the application¶
dsn~app-links~1
A link has the form koppter://filter?project=papers>survey&context=phone&hashtag=someday: each of the keys project, context and hashtag may be given, also several times.
The other criteria of the filter have keys as well: not-project, not-context and not-hashtag for what is excluded, priority with a letter, text, show with all or done for completed tasks, and future=1 for tasks before their start date.
filterOfLink reads it into a filter; it decodes characters that a program wrote as %3E, takes a name with or without its sign, and accepts the forms koppter:filter? and koppter://filter/?, which programs make of the link.
TodoController.openLink replaces the filter by that of the link, turns off the options of the first tasks and of the next actions, and shows the list; a text that is no such link changes nothing.
The link koppter://new, also as koppter:new, opens the dialog for a new task instead.
Covers:
req~app-links~1adr~links-with-query~1
Needs: impl, utest
One window for links on the desktop¶
dsn~link-single-instance~1
The desktop application takes a link as its argument.
The running application listens on a port of the computer itself and writes its number to the file link.port in the data directory.
A start with a link sends it to that port and ends if the answer is that of the application; otherwise it starts as usual and opens the link itself.
The running application opens a received link and brings its window to the front.
A start without a link opens a window of its own, as before.
Covers:
req~app-links~1
Needs: impl, utest
Scheme of the links on Windows¶
dsn~link-scheme-windows~1
On Windows, the installed program writes at each start to the registry of the current user that links of the scheme koppter are opened with it: the key Software\Classes\koppter with the value URL Protocol, and the command of the program with the link as its argument.
Writing at each start keeps the entry right after an update, and needs neither the installer nor rights of an administrator.
A start from the build registers nothing.
Covers:
req~app-links~1
Needs: impl, utest
Scheme of the links on Linux¶
dsn~link-scheme-linux~1
On Linux, the installed program (the launcher …/bin/koppter of the package) writes at each start the desktop entry koppter-links.desktop to the applications of the user ($XDG_DATA_HOME/applications, else ~/.local/share/applications) when its content differs: MimeType=x-scheme-handler/koppter;, the program in Exec (quoted only when it holds a blank or a sign other than /._+-, as the fallback of xdg-open does not read quotes) with %u as the link, and NoDisplay=true, so that the menu shows no second entry.
Then xdg-mime default koppter-links.desktop x-scheme-handler/koppter makes it the handler of the scheme, and update-desktop-database updates the cache of the folder; a missing program is logged and skipped.
The link then arrives as the argument of a start, as on Windows.
A start from the build registers nothing.
Covers:
req~app-links~1
Needs: impl, utest
Scheme of the links on macOS¶
dsn~link-scheme-macos~1
On macOS, the package declares the scheme koppter with CFBundleURLTypes in the Info.plist of the application, so that the system registers it when the application is installed.
macOS hands a link to the running application, or starts it and then hands the link, as an event instead of an argument; the application takes it with the OpenURIHandler of java.awt.Desktop and opens it as a link from the port of dsn~link-single-instance~1.
Covers:
req~app-links~1
Needs: impl
Filter shared with ContextSwitcher¶
dsn~contextswitcher-sync~1
The setting contextSwitcherSync turns the sharing on; the settings dialog offers it where the platform opens links of other programs, which on the desktop it does through java.awt.Desktop.browse.
When the setter of TodoController.filter changes the projects or the contexts (SyncSelection), it opens contextswitcher://filter?project=…&context=… with the names encoded as in a link of koppter; a link without either key clears the filter of ContextSwitcher.
ContextSwitcher sends koppter://sync?project=…&context=…, which syncOfLink reads; a key it does not name is cleared.
TodoController.applySync puts these into the filter and keeps its other criteria, the view and the options of the list.
The desktop application takes such a link through the port of dsn~link-single-instance~1 but does not bring its window to the front.
Without a running application, the start that got the link writes the filter into the settings and ends without a window, as ContextSwitcher sends a link at every change and would otherwise open koppter each time.
SyncGuard remembers the last selection that was sent or received and sends only one that differs from it, so a selection that came from ContextSwitcher does not go back and the two applications do not answer each other without end.
With the setting off, a received link changes nothing.
Android has no ContextSwitcher and sends nothing; a sync link there is no link of filterOfLink and changes nothing.
Covers:
req~contextswitcher-sync~1
Needs: impl, utest
Copying a link¶
dsn~app-link-copy~1
linkTo writes the link to a project, a context or a hashtag and encodes every character of the name that is not a letter, a digit or one of -._~, so that a program that finds links in a text takes the whole link.
WithLinkMenu wraps the labels of projects, contexts and hashtags of a task and of the filter panel: a click with the secondary button opens a menu.
At the label of a task, its entry Copy link puts the link on the clipboard; the menu of the filter panel has no such entry, as it is there to change the labels.
The click is taken before the card of the task sees it, so that the card does not open its menu of due dates.
In the filter panel, a finger that stays on a label opens the menu as well, and lifting it does not select the label; the label of a task has no such menu, as a long press there picks up the card.
Covers:
req~app-links~1
Needs: impl, utest
Restart to update¶
dsn~restart-to-update~1
A running application cannot replace its own classes, so the update is a restart.
just run-loop, also just loop, runs scripts/run-loop.sh or, on Windows, scripts/run-loop.cmd: in the checkout, it pulls, builds the application with its runtime (:app:createDistributable) and starts it, with the commit it built in the environment variable KOPPTER_RUN_LOOP.
A pull that fails, such as without a network, does not stop the start.
When the application ends with the exit code 55, the script does the same again; every other exit code ends it, so that closing the window stays a quit.
The script prints Running koppter... before each start and koppter finished when it ends, as the window may open on another desktop.
Started that way, the desktop application fetches at its start and every half hour and counts the commits of the upstream branch that the commit it runs lacks (commitsBehind).
It counts from that commit and not from HEAD, as a pull outside the application moves HEAD while the old build keeps running.
If there is one, the top bar shows the button Restart to update, which ends the application with the exit code 55.
Whenever git cannot tell, nothing is shown.
Without the variable, the application neither fetches nor shows the button, as nothing would start it again.
Covers:
req~restart-to-update~1
Needs: impl, utest
What's new before a restart¶
dsn~whats-new~1
With every fetch that finds an update, the desktop application compares CHANGELOG.md of the commit it runs with the one of the upstream branch (changelogNews).
The news are the bullets of the upstream changelog that the running one lacks, compared by their text, as a release moves them under a date unchanged; each keeps the heading it stands under, such as Added.
The button then carries their number, such as Restart to update (3), and opens the dialog What's new, with their number in its title, such as What's new: 3 changes, and the bullets under their headings with the Markdown marks dropped; the list scrolls while the title and the buttons stay in view.
Restart restarts; Later, Esc and a click beside the dialog close it and keep the running version and the button.
Without news, as after an update of the build only, the button restarts at once, as before.
The Android application passes no news, so its button stays as it is.
Covers:
req~whats-new~1
Needs: impl, utest
Window after a change of the displays¶
dsn~display-change~1
On Windows, after a change of the scale of the display, the drawing surface of the window may keep the size of the old scale, so that the content covers only part of the window. Restoring and maximizing the window again, or resizing it, gives the surface its size. The desktop application does that itself: when the graphics configuration of the window changes, it waits half a second for the display change to settle, then restores and maximizes a maximized window again, or makes any other window one pixel wider and back.
Covers:
req~display-change~1
Needs: impl