Family¶
Requirements and design for the use of the application by a family.
Requirements¶
Day of the members¶
req~family-day~1
The user sees a day with one column per member of the family: the tasks of the member for that day, to be ticked off there, and the day as a calendar with the tasks of the member that have a time and with the calendar that is kept next to the list of the member. A member is a list, such as one in a directory of the repository of the family, and a task belongs to the member whose context it has. The view shows today and moves to the days before and after it; it is operated by touch.
Covers:
feat~family~1
Needs: dsn
Stars for completed tasks¶
req~stars~1
A member who completes a task gets its stars: one, or the number that the task states. A ranking compares the stars that the members got on a day, in a week, a month, a quarter or a year.
Covers:
feat~family~1
Needs: dsn
Absences from the calendars of a member¶
req~absences~1
A member names, on a device of their own, the addresses at which calendars of theirs are published as iCalendar files. The family view of every device then shows the times of the events of these calendars in the column of the member as absences, without what the events are.
Covers:
feat~family~1
Needs: dsn
Calendars of a member whose events are told¶
req~absence-titles~1
A member marks, for each of their calendars, whether the family may know what its events are, such as for the calendar of a club. The family view then shows the events of such a calendar with their titles.
Covers:
feat~family~1
Needs: dsn
Busy times from the plan of a member¶
req~busy-plan~1
A member names, on a device of their own, that its plan is theirs. The family view of every device then shows the times that this plan takes in the column of the member as busy. It names a task of the list of the member, which the family has anyway, and does not tell what any other task is.
Covers:
feat~family~1
Needs: dsn
Tasks of a member planned into their times¶
req~member-plan~1
The family names, for a member, the times of the week at which the member does their tasks, such as the afternoons of a child. The family view then shows the open tasks of the member in these times of the day, around what else the calendar of the member holds; tasks without a due date are planned as well.
Covers:
feat~family~1
Needs: dsn
Plan of the device of a member¶
req~plan-of-a-member~1
A member who plans on a device of their own gets the tasks of their list planned with the tasks of their own file, and not the tasks that are those of other members alone.
Covers:
feat~family~1
Needs: dsn
Tasks of several members¶
req~tasks-of-several-members~1
A task that names several members stands with each of them, and it is done for all of them when one of them ticks it off. Its stars go to the member who ticked it off.
Covers:
feat~family~1
Needs: dsn
Design¶
Stars and ranking¶
dsn~stars~1
The tag stars: holds the stars of a task as a number from zero on; Task.stars reads it and gives one without the tag and for any other value.
Family.ranking adds up, per member, the stars of the completed tasks whose completion date lies in the period that holds a day (RankingPeriod: the day, the week from Monday, the month, the quarter or the year), and orders the members by them; members with the same stars share a place.
The completed tasks stay in the file, so the ranking is derived from it and needs no file of its own; a completed task without a completion date counts for no period.
TodoController.toggle therefore writes the completion date of a task of a member also where the settings write no dates.
The next occurrence of a recurring task keeps the tag.
Covers:
req~stars~1adr~stars-tag~1
Needs: impl, utest
Members, their tasks and appointments¶
dsn~family-day~1
The members are the names of the lists of SharedLists in their order (SharedLists.names), which TodoController.members holds; Family.membersOf gives the members whose context, or a level below it, a task has.
Family.appointments gives the tasks of a member with a fixed time (at:) whose due date is the day, completed or not, each for its duration or for 30 minutes.
Family.todos gives the other tasks of a member for a day in the order of the list: the open ones that are due on the day, on the current day also the overdue ones and those without a due date, without those before their start date; behind them the tasks that were completed on the day.
SharedLists.readCompanionOf reads the calendar.txt next to the list of a member, whose blocks TodoController.blocksOf holds; they are read with the configuration, so that a synchronization updates them.
Covers:
req~family-day~1
Needs: impl, utest
Family view¶
dsn~family-view~1
FamilyCalendar is the view Family, whose switch stands last and is there only while the tasks have members (TodoController.views); settings that name the view without members show the list.
Its first row has the buttons for the day before and the day after, the day, which says so when it is today, Today while another day is shown, the periods of the ranking, and the ranking: the members by their place, each with its stars, the first place in the primary color unless nobody has a star.
On a narrow screen, the periods and the ranking wrap below the day, so that all members are seen there, of whose columns a phone shows two.
Below it stands the day as a calendar with a column per member under the name of the member, at least 120 dp wide, so that a phone shows three members and more columns than fit scroll sideways.
The calendar shares its height among its hours, at least from 07:00 to 21:00, as the week does, with a line at the current minute of today; in a window too low for the day, it scrolls and starts an hour before now.
The calendar of a member draws the blocks of the calendar.txt of the list first and the appointments over them (DayColumn), each with its start and its end, as the hours are too low to read the end from; in a column narrower than 180 dp, the title stands first and the times on the line below, so that a short block still says what it is and a long one shows its whole title; a click on an appointment opens its task.
The text of a block stays in view while the start of the block is scrolled out of it, so that a block that runs now says what it is.
The tasks of the day stand apart from the calendar, as a column of the calendar is too narrow for their texts: per member the name, a button that opens the dialog of a new task with the context of the member, and the tasks.
A task has a box to tick it off, its text, which opens its dialog, and its stars; an overdue task says since when in the color of an error, and a completed one is struck through.
In a window that is higher than wide, or narrower than 600 dp, the tasks stand below the calendar, as many members beside each other as have 240 dp each; they take at most two fifths of the height.
In a window that is wider than high, such as a tablet or a phone held across, the height is needed for the hours: the tasks stand beside the calendar in a pane of 320 dp, the members below each other.
Tasks that do not fit scroll, and More tasks below says so until the last one is in view.
The buttons that float above the other views, for a new task and for the search, are left out: they would cover the calendar, each member has a button for a new task, and there is nothing to search.
The answers to the flow: the day is looked at first, so the calendar stands first, and ticking a task is what is done most, so the tasks are in view without scrolling, below or beside it; it takes effect at once and is undone by the same box; a failure to write is shown as any other; the period is kept in the settings of the device as rankingPeriod, the day is not, as the view is to show today; on a phone, everything is reached by touch.
The filter does not apply, as the view shows the day of everybody: on a wide screen, the filter panel and the field of the search are left out, and the columns take the width.
With Ctrl, 8 shows the view.
Covers:
req~family-day~1req~stars~1
Needs: impl, utest
Absences in the calendar.txt of a member¶
dsn~absences~1
The setting memberCalendars of the device holds the calendars, one per line as member = address (Family.calendars).
The tab File of the settings dialog edits it below the shared lists, while the tasks have members and the platform reads calendars: one field per member for the address, or for several separated by blanks, so that neither a name nor a notation is typed; the text above the fields says first that the address stays on the device.
A line of a member that is no list at present is kept as it is.
TodoController.updateAbsences reads the calendars of each member with busyTimes for 28 days from today and passes their times to CalendarTxt.withAbsences, which replaces the blocks named Absent of the days from today on in the calendar.txt of the list of the member and leaves everything else of the file as it is.
SharedLists.writeCompanionOf writes the file if it changed and has the storage record it as Update the absences of @member, so that the other devices get it with the synchronization and draw it as any block of that file (dsn~family-view~1).
App does this at its start and every 30 minutes, whatever view is shown.
A member whose name is no list, and a member one of whose calendars cannot be read, are reported in the family view above the columns in the color of an error, the calendar by its host only, as its address is a secret; the absences of such a member stay as they are.
Events of whole days are left out, as busyTimes leaves them out.
The answers to the flow: the fields are set once per device and therefore stand last in their tab; Save keeps them and starts the reading, Cancel leaves them as they were; what the reading gave shows in the family view, as its absences or as its failure; the calendars are read off the main thread.
Covers:
req~absences~1adr~absences-in-calendar-txt~1
Needs: impl, utest
Busy times in the calendar.txt of a member¶
dsn~busy-plan~1
The setting planMember of the device holds the member whose plan the device keeps, and is blank on a shared device.
The tab File of the settings dialog chooses it above the calendars of the members, while the tasks have members: under This device belongs to, the choice of Nobody or one of the members, of which one is always selected, and below it a text that says what is planned and what the family sees.
Family.busy turns the blocks of the plan, those of the calendar.txt next to the main file, into what the family learns.
A block of a task of the list of the member becomes Busy: with the description of the task, as that list is in the repository of the family anyway; this is how the content of a task is shared, and a task of a child, which is in the list of the child, is therefore always named.
A block of a task of another member is left out.
Any other block, such as one of a task of the main file, becomes Busy, joined with those it touches, so that neither the text nor the number of the tasks leaves the device.
The family view shows such a block with the description alone, as Busy: is there for the file, to tell which blocks the plan wrote.
TodoController.updateAbsences passes them, for 28 days from today, to CalendarTxt.withAbsences, which replaces the blocks named Busy, or starting with Busy:, of the days from today on.
A device without the plan of the member leaves these blocks, and one without a calendar of the member leaves the absences, as two devices of a member may write the two.
The blocks are written with the absences, at the start and every 30 minutes (dsn~absences~1), and after the tasks were planned.
A member that is no list is reported as a calendar of such a member is.
TodoController.updateSettings remembers a member that the settings named before, and the next writing, which follows at once, takes the busy times of that member back, so that Nobody leaves none behind.
DayColumn leaves a gap below each block, as a busy time and a named task often follow each other at once and would read as one block.
The answers to the flow: the choice is set once per device and therefore stands last in its tab; Save keeps it and starts the writing, Cancel leaves it as it was; what was written shows in the family view, as does a failure.
Covers:
req~busy-plan~1
Needs: impl, utest
Titles of the events of a calendar¶
dsn~absence-titles~1
A line of memberCalendars with the word titles behind the address names a calendar whose titles are told (MemberCalendar).
The settings dialog has a field per calendar of a member and an empty one behind them for a further calendar, and below a field with an address the box Show the family what the events of this calendar are, instead of Absent, which is off for a new address, as an address is that of a private calendar more often than not.
events reads the events of a calendar as busyTimes does, each with its title.
CalendarTxt.withAbsences writes an event of such a calendar as Absent: with the title, and replaces the blocks that start so with the absences; an event without a title is an absence like the others.
The family view shows such a block with the title alone, as it does for Busy:.
The answers to the flow: the box stands at its calendar and is changed rarely; Save keeps it and starts the reading, which writes the titles or takes them back; Cancel leaves it as it was.
Covers:
req~absence-titles~1
Needs: impl, utest
Plan of the tasks of a member¶
dsn~member-plan~1
The times are the time map Tasks in the koppter.yml of the list of the member, where every device of the family reads them; it stands first there, as the first map is the one of tasks that name no other.
Times beside the name of a member in the tasks of the family view opens TimeMapEditor for it, with the title Times for the tasks of the member without the fields for a name and dates, and with green and the eraser only, as one map has no times to weigh against others; TodoController.setTimeMaps writes the file, recorded as Set the times for the tasks of @member.
Family.planned plans the open tasks of the member with the planner and the configuration of that file, around the blocks of the calendar.txt of the member that are no plan, for 28 days.
A task with a time of the day keeps it and gets no block, as it is an appointment already.
The day is planned from midnight and not from now, so that the plan of a day stays as it is and is not written anew over the day; a task that was not done at its time stays there until the next day.
TodoController.updateMemberPlans writes the blocks as Planned: with the description of the task into the calendar.txt of the list, through CalendarTxt.withAbsences, which replaces the blocks that start so; the storage records it as Plan the tasks of @member.
Every device does this, whenever the open tasks of the member, the configuration or the day change, and after the absences were written.
The devices come to the same plan, so the file changes only when its inputs did; of two plans written at the same time, the synchronization takes the newer one, as for the plan of the main file.
The family view shows such a block with the description alone.
The answers to the flow: the times are set rarely, so the button is a word beside the name and not in the calendar; Save writes them and the tasks are planned at once, Cancel and Esc leave them, with the question the editor asks for changes; Delete removes the map, after which the blocks that are written stay until the map is set again; a failure to write shows as any other.
Covers:
req~member-plan~1
Needs: impl, utest
One line for a task of several members¶
dsn~tasks-of-several-members~1
SharedLists writes a line with the contexts of several lists, with these contexts, into the list in whose directory these lists lie, so that it is one line that every member has: the main file for the members next to it, and the shared list of the family on a device with a main file of its own.
GitSetup.parentsOfMembers names that list for each member, and a list that is named among the several only because the line was read from it does not count.
Lists that lie in no common directory leave the line in the main file.
Family.todos, Family.appointments and Family.planned take a task for each member that Family.membersOf gives.
The row of such a task in the family view says below its text whom it is shared with, as With and the other members, so that it is seen that ticking it off takes it from their columns as well.
TodoController.toggle is told the member in whose column the box is ticked and writes that member as the tag doneby: of a task of several members; Task.reopen removes the tag.
Family.doersOf gives the members who get the stars of a completed task: the one that the tag names, and without the tag, or with a name that is none of its members, all its members; Family.ranking counts with it.
The answers to the flow: ticking is what is done most and is the box that every task has; it takes effect at once and the same box in the column of any of the members undoes it; a failure to write shows as any other; nothing is kept in the settings; on a phone, the label is text and needs no hover.
Covers:
req~tasks-of-several-members~1adr~task-of-several-members~1
Needs: impl, utest
Tasks in the plan of the device of a member¶
dsn~plan-of-a-member~1
The member of the setting planMember (dsn~busy-plan~1) is also the one whose tasks the device plans.
TodoController.plan gives the planner the tasks without a member, which are those of the main file, and the tasks that Family.membersOf gives that member, a task of several members among them; a task of other members alone is left out.
A device of nobody plans all tasks.
The text under This device belongs to in the settings says so, before what it says of the busy times.
The answers to the flow: the choice is made once per device, and it decides what the settings of the family below it mean, so it stands first among them with its text below it; Save keeps it and Cancel leaves it; the plan changes with the next planning; a failure to write shows as any other; the choice is the setting planMember; on a phone, the chips are touched.
Covers:
req~plan-of-a-member~1
Needs: impl, utest