Browse Source

New redesigned form for adding todos

* New redesigned input for adding todos
* New buttons for scheduling and setting a priority directly when adding a todo
master
Nicolas Petton 2 years ago
parent
commit
5bfd661f5d
No known key found for this signature in database GPG Key ID: E8BCD7866AFCF978
13 changed files with 100 additions and 86 deletions
  1. +3
    -4
      plugins/nico/projectify/tiddlers/doc/Projects.tid
  2. +28
    -1
      plugins/nico/projectify/tiddlers/styles/form-control.tid
  3. +2
    -2
      plugins/nico/projectify/tiddlers/styles/welcome.tid
  4. +0
    -16
      plugins/nico/projectify/tiddlers/ui/buttons/AddTodo.tid
  5. +2
    -2
      plugins/nico/projectify/tiddlers/ui/buttons/ArchiveProject.tid
  6. +2
    -4
      plugins/nico/projectify/tiddlers/ui/buttons/ToggleCompletedTodos.tid
  7. +1
    -1
      plugins/nico/projectify/tiddlers/ui/dashboard/InboxAndProjects.tid
  8. +38
    -13
      plugins/nico/projectify/tiddlers/ui/forms/AddTodo.tid
  9. +0
    -30
      plugins/nico/projectify/tiddlers/ui/forms/ProjectActions.tid
  10. +4
    -5
      plugins/nico/projectify/tiddlers/ui/inbox/Inbox.tid
  11. +12
    -3
      plugins/nico/projectify/tiddlers/ui/project/Project.tid
  12. +7
    -1
      plugins/nico/projectify/tiddlers/ui/widgets/date-picker.js
  13. +1
    -4
      tiddlers/$__StoryList.tid

+ 3
- 4
plugins/nico/projectify/tiddlers/doc/Projects.tid View File

@ -1,5 +1,5 @@
created: 20200427152938733
modified: 20201228222008629
modified: 20210205175449859
tags: [[Projectify documentation]]
title: $:/plugins/nico/projectify/doc/Projects
type: text/vnd.tiddlywiki
@ -17,9 +17,8 @@ button in the projects section of the
[[Dashboard|$:/plugins/nico/projectify/doc/Dashboard]] let you change how
projects are displayed and reorder them.
From within a project tiddler, the
{{$:/plugins/nico/projectify/ui/buttons/AddTodo}} button lets you quickly add
[[Todos|$:/plugins/nico/projectify/doc/Todos]] directly to a project. The
At the bottom of a project tiddler, the input lets you quickly add
[[Todos|$:/plugins/nico/projectify/doc/Todos]] directly to the project. The
{{$:/plugins/nico/projectify/ui/buttons/ArchiveProject}} button lets you archive
a project so that it is hidden from the main project list in the
[[Dashboard|$:/plugins/nico/projectify/doc/Dashboard]].


+ 28
- 1
plugins/nico/projectify/tiddlers/styles/form-control.tid View File

@ -65,6 +65,33 @@ type: text/vnd.tiddlywiki
margin-top: 20px;
}
.py-composite-input {
position: relative;
padding: 10px 12px;
border-radius: 8px;
border: 1px solid <<colour tiddler-editor-border>>;
}
.py-composite-input:focus-within {
border-color: <<colour primary>>;
}
.py-composite-input input.py-input {
border: none;
width: 100%;
padding: 5px 0;
}
.py-composite-input input.py-input:focus {
border: none;
box-shadow: none;
}
.py-composite-input .py-todo-actions {
margin-top: 6px;
font-size: .9em;
}
input.py-input {
transition: border .14s ease-in-out;
border: 1px solid <<colour tiddler-editor-border>>;
@ -85,7 +112,7 @@ input.py-input.input-larger {
max-width: 100%;
}
Input.py-input.input-large {
input.py-input.input-large {
width: 100%;
padding: .5em 1em;
font-size: 1.1em;


+ 2
- 2
plugins/nico/projectify/tiddlers/styles/welcome.tid View File

@ -1,5 +1,5 @@
created: 20210117173623112
modified: 20210117174118787
modified: 20210205180906058
tags: $:/tags/Stylesheet
title: $:/plugins/nico/projectify/styles/welcome
type: text/vnd.tiddlywiki
@ -11,7 +11,7 @@ type: text/vnd.tiddlywiki
max-width: 800px;
text-align: center;
padding: 40px 20px;
margin: 20px auto;
margin: 0 auto;
background: <<colour message-background>>;
color: <<colour message-foreground>>;
border-radius: 12px;


+ 0
- 16
plugins/nico/projectify/tiddlers/ui/buttons/AddTodo.tid View File

@ -1,16 +0,0 @@
created: 20201212172804699
modified: 20210112180541864
title: $:/plugins/nico/projectify/ui/buttons/AddTodo
type: text/vnd.tiddlywiki
\define lingo-base() $:/language/projectify/
<$button
class="py-btn"
set=<<stateTiddler>>
setTo="show"
tooltip={{$:/language/projectify/AddTodo/Hint}}
aria-label={{$:/language/projectify/AddTodo/Hint}}
>
{{$:/core/images/list-bullet}} <<lingo AddTodo/Caption>>
</$button>

+ 2
- 2
plugins/nico/projectify/tiddlers/ui/buttons/ArchiveProject.tid View File

@ -1,5 +1,5 @@
created: 20201209150027612
modified: 20210112180541889
modified: 20210205111043378
tags:
title: $:/plugins/nico/projectify/ui/buttons/ArchiveProject
type: text/vnd.tiddlywiki
@ -8,7 +8,7 @@ type: text/vnd.tiddlywiki
<$fieldmangler>
<$button
class="py-btn btn-danger nc-archive-project"
class="py-btn btn-small btn-danger nc-archive-project"
tooltip={{$:/language/projectify/ArchiveProject/Hint}}
aria-label={{$:/language/projectify/ArchiveProject/Hint}}
>


+ 2
- 4
plugins/nico/projectify/tiddlers/ui/buttons/ToggleCompletedTodos.tid View File

@ -1,5 +1,5 @@
created: 20201212172804699
modified: 20210131212757806
modified: 20210205173145448
title: $:/plugins/nico/projectify/ui/buttons/ToggleCompletedTodos
type: text/vnd.tiddlywiki
@ -17,14 +17,12 @@ type: text/vnd.tiddlywiki
</$reveal>
<$reveal type="match" state=<<stateTiddler>> text="yes" default=<<default>>>
<$macrocall $name="todo-list-completed"/>
<div class="py-actions">
<$button class="tc-btn-invisible py-link-muted" set=<<stateTiddler>> setTo="no">
{{$:/plugins/nico/projectify/images/eyeslash}} <<lingo HideCompleted/Caption>>
</$button>
</div>
<$macrocall $name="todo-list-completed"/>
</$reveal>
</$vars>
</$list>

+ 1
- 1
plugins/nico/projectify/tiddlers/ui/dashboard/InboxAndProjects.tid View File

@ -1,6 +1,6 @@
caption: {{$:/plugins/nico/projectify/images/collection}} {{$:/language/projectify/Projects}}
created: 20200425193559847
modified: 20210122213121097
modified: 20210205175036448
tags: $:/plugins/nico/projectify/tags/dashboard
title: $:/plugins/nico/projectify/ui/dashboard/InboxAndProjects
type: text/vnd.tiddlywiki


+ 38
- 13
plugins/nico/projectify/tiddlers/ui/forms/AddTodo.tid View File

@ -1,28 +1,53 @@
created: 20201207165347344
modified: 20210204223916170
modified: 20210205204831470
title: $:/plugins/nico/projectify/ui/forms/AddTodo
type: text/vnd.tiddlywiki
\define lingo-base() $:/language/projectify/
\define add-todo-actions()
<$action-createtiddler
$basetitle={{{ [<stateTiddler>get[todo-name]] }}}
$savetitle="$:/state/projectify/new-todo"
$savetitle="$:/temp/projectify/new-todo"
/>
<$action-listops $tiddler={{$:/state/projectify/new-todo}} $tags=<<todo-tags>>/>
<$action-setfield $tiddler=<<stateTiddler>> todo-name=""/>
<$action-listops $tiddler={{$:/temp/projectify/new-todo}} $tags=<<todo-tags>>/>
<$action-setfield $tiddler={{$:/temp/projectify/new-todo}} due={{{ [<stateTiddler>get[due]] }}}/>
<$action-setfield $tiddler={{$:/temp/projectify/new-todo}} priority={{{ [<stateTiddler>get[priority]] }}}/>
<$action-deletefield $tiddler=<<stateTiddler>> $field="todo-name"/>
<$action-deletefield $tiddler=<<stateTiddler>> $field="due"/>
<$action-deletefield $tiddler=<<stateTiddler>> $field="priority"/>
<$action-sendmessage $message="tm-auto-save-wiki"/>
\end
<$vars stateTiddler=<<qualify "$:/temp/projectify/add-todo-form">>>
<$keyboard key="enter">
<div class="py-composite-input">
<$keyboard key="enter">
<<add-todo-actions>>
<$edit-text
class="py-input"
focus="true"
tiddler=<<stateTiddler>>
field="todo-name"
placeholder=<<placeholder>>
/>
</$keyboard>
<$edit-text
class="py-input"
tiddler=<<stateTiddler>>
field="todo-name"
placeholder=<<placeholder>>
/>
</$keyboard>
<div class="py-todo-actions">
<$vars currentTiddler=<<stateTiddler>>>
<$transclude tiddler="$:/plugins/nico/projectify/ui/buttons/TodoDueDate" mode="inline"/>
<$transclude tiddler="$:/plugins/nico/projectify/ui/buttons/TodoPriority" mode="inline"/>
</$vars>
</div>
</div>
<div class="py-actions">
<$button
class="py-btn btn-primary"
actions=<<add-todo-actions>>
tooltip={{$:/language/projectify/AddTodo/Hint}}
aria-label={{$:/language/projectify/AddTodo/Hint}}
>
<<lingo AddTodo/Caption>>
</$button>
</div>
</$vars>

+ 0
- 30
plugins/nico/projectify/tiddlers/ui/forms/ProjectActions.tid View File

@ -1,30 +0,0 @@
created: 20201207165347344
modified: 20210204223351144
title: $:/plugins/nico/projectify/ui/forms/ProjectActions
type: text/vnd.tiddlywiki
\define lingo-base() $:/language/projectify/
<$vars
stateTiddler=<<qualify "$:/temp/projectify/todo-form">>
todo-tags="[{!!title}] todo"
placeholder={{$:/language/projectify/AddTodoToProject/Placeholder}}
>
<div class="py-actions">
<$reveal type="match" state=<<stateTiddler>> text="">
{{||$:/plugins/nico/projectify/ui/buttons/AddTodo}}
<$list filter=<<py-is-open>>>
<<lingo Or>> {{||$:/plugins/nico/projectify/ui/buttons/ArchiveProject}}
</$list>
</$reveal>
<$reveal type="match" state=<<stateTiddler>> text="show">
{{||$:/plugins/nico/projectify/ui/forms/AddTodo}}
<div class="py-actions">
{{||$:/plugins/nico/projectify/ui/buttons/Save}}
or
{{||$:/plugins/nico/projectify/ui/buttons/Cancel}}
</div>
</$reveal>
</div>
</$vars>

+ 4
- 5
plugins/nico/projectify/tiddlers/ui/inbox/Inbox.tid View File

@ -1,6 +1,6 @@
caption: {{$:/plugins/nico/projectify/images/inbox}} {{$:/language/projectify/Inbox}}
created: 20200425193337699
modified: 20210204224309284
modified: 20210205205023525
tags:
title: $:/plugins/nico/projectify/ui/inbox/Inbox
type: text/vnd.tiddlywiki
@ -17,16 +17,15 @@ type: text/vnd.tiddlywiki
<h2>{{$:/language/projectify/Inbox}} <<inbox-count>></h2>
<label class="py-label py-right-aligned">
<<lingo AddToInbox/Hint>>
</label>
<$vars
todo-tags="Inbox todo"
placeholder={{$:/language/projectify/AddToInbox/Placeholder}}
>
{{$:/plugins/nico/projectify/ui/forms/AddTodo}}
<label class="py-label">
<<lingo AddToInbox/Hint>>
</label>
</$vars>
<$vars currentTiddler="Inbox">
<$macrocall
class="py-inbox-input"


+ 12
- 3
plugins/nico/projectify/tiddlers/ui/project/Project.tid View File

@ -1,6 +1,6 @@
created: 20201207165347344
list-after: $:/plugins/nico/projectify/ui/todo/TodoHeading
modified: 20210119144230346
modified: 20210205173559098
tags: $:/tags/ViewTemplate
title: $:/plugins/nico/projectify/ui/project/Project
type: text/vnd.tiddlywiki
@ -11,6 +11,9 @@ type: text/vnd.tiddlywiki
<$list filter=<<py-is-not-subproject>>>
<div class="py-category-wrapper">
{{||$:/plugins/nico/projectify/ui/buttons/SelectCategory}}
<$list filter=<<py-is-open>>>
{{||$:/plugins/nico/projectify/ui/buttons/ArchiveProject}}
</$list>
</div>
</$list>
@ -23,7 +26,13 @@ type: text/vnd.tiddlywiki
emptyTemplate="$:/plugins/nico/projectify/ui/welcome/EmptyProject"
/>
{{||$:/plugins/nico/projectify/ui/forms/ProjectActions}}
{{||$:/plugins/nico/projectify/ui/buttons/ToggleCompletedTodos}}
<$vars
stateTiddler=<<qualify "$:/temp/projectify/todo-form">>
todo-tags="[{!!title}] todo"
placeholder={{$:/language/projectify/AddTodoToProject/Placeholder}}
>
{{||$:/plugins/nico/projectify/ui/forms/AddTodo}}
</$vars>
</$list>

+ 7
- 1
plugins/nico/projectify/tiddlers/ui/widgets/date-picker.js View File

@ -66,7 +66,13 @@ AbstractDatePickerWidget.prototype.refresh = function(changedTiddlers) {
};
AbstractDatePickerWidget.prototype.getTiddler = function() {
return this.wiki.getTiddler(this.title);
var tiddler = this.wiki.getTiddler(this.title);
if(!tiddler) {
this.wiki.addTiddler({title: this.title});
tiddler = this.wiki.getTiddler(this.title);
}
return tiddler;
};
AbstractDatePickerWidget.prototype.getValue = function() {


+ 1
- 4
tiddlers/$__StoryList.tid View File

@ -1,5 +1,2 @@
created: 20210111171639195
list: GettingStarted Demo
modified: 20210111172656178
title: $:/StoryList
type: text/vnd.tiddlywiki
title: $:/StoryList

Loading…
Cancel
Save