~dricottone/noticable

b490a2d600cc5a6db7ea15de720b8fbed715e0a7 — Dominic Ricottone 2 years ago bbd4a25
Starting on documentation for UI flow
4 files changed, 73 insertions(+), 0 deletions(-)

A flow/new_file.txt
A flow/open_file.txt
A flow/save_as_file.txt
A flow/save_file.txt
A flow/new_file.txt => flow/new_file.txt +73 -0
@@ 0,0 1,73 @@
(Ctrl+N caught in main)
 |
 v
+-------------------------------------------------+
| main::preloadRendererSendContentForCheckThenNew |
+-------------------------------------------------+
 |
 v
+---------------------------------------------+
| preload::rendererSendContentForCheckThenNew |
+---------------------------------------------+
 |
 v
+-----------------------------------------+
| renderer::preloadContentForCheckThenNew |
+-----------------------------------------+
 |                                |
 | (if content has not changed)   | (if content has changed)
 |                                |
 |                                v
 |                               +-------------------------------------------+
 |                               | preload::mainPromptSaveDiscardableThenNew | <--------------------------------------------------------------------------+
 |                               +-------------------------------------------+                                                                            |
 |                                |                                                                                                                       |
 |                                v                                                                                                                       |
 |                               +--------------------------------------------------------------------------------+                                       |
 |                               | main::promptSaveDiscardableThenNew                                             |                                       |
 |                               +--------------------------------------------------------------------------------+                                       |
 |                                |                                         |                                    |                                        |
 |                                | (if select discard or cancel prompt)    | (if select save as)                | (if select save)                       |
 |                                |                                         |                                    |                                        |
 |                                v                                         v                                    v                                        |
 |                               +---------------------------------------+ +----------------------------------+ +-------------------------------------+   |
 |                               | main::announceFileDiscardedForNewFile | | main::preloadSaveFileThenNewFile | | main::preloadTrySaveFileThenNewFile |---+ (if no file name cached)
 |                               +---------------------------------------+ +----------------------------------+ +-------------------------------------+
 |                                |                                         |                                    |
 |                                |                                         |                                    | (if have a file name cached)
 |                                |                                         |                                    |
 |                                |                                         v                                    v
 |                                |                                        +--------------------------------------------+
 |                                |                                        | preload::rendererSendContentForSaveThenNew |
 |                                |                                        +--------------------------------------------+
 |                                |                                         |
 |                                |                                         v
 |                                |                                        +---------------------------+
 |                                |                                        | preload::writeFileThenNew |
 |                                |                                        +---------------------------+
 |                                |                                         |                         |
 |                                |                                         | (if successful write)   | (if failed write)
 |                                |                                         |                         |
 |                                |                                         |                         v
 |                                |                                         |                        +---------------------------------------------+
 |                                |                                         |                        | preload::mainRePromptSaveDiscardableThenNew |<-----------------+
 |                                |                                         |                        +---------------------------------------------+                  |
 |                                |                                         |                         |                                                               |
 |                                |                                         |                         v                                                               |
 |                                |                                         |                        +--------------------------------------+                         |
 |                                |                                         |                        | main::rePromptSaveDiscardableThenNew |                         |
 |                                |                                         |                        +--------------------------------------+                         |
 |                                |                                         |                         |                       |                                       |
 |                                |                                         |                         | (if select discard)   | (if select save as)                   |
 |                                |                                         |                         |                       |                                       |
 |                                |                                         |                         |                       v                                       |
 |                                |                                         |                         |                      +------------------------------------+   |
 |                                |                                         |                         |                      | main::preloadReSaveFileThenNewFile |---+ (if failed write)
 |                                |                                         |                         |                      +------------------------------------+
 |                                |                                         |                         |                       |
 |                                |                                         |                         |                       | (if successful write)
 |                                |                                         |                         |                       |
 v                                v                                         v                         v                       v
+------------------------------------------------------------------------------------------------------------------------------+
| preload::newNote                                                                                                             |
+------------------------------------------------------------------------------------------------------------------------------+

A flow/open_file.txt => flow/open_file.txt +0 -0
A flow/save_as_file.txt => flow/save_as_file.txt +0 -0
A flow/save_file.txt => flow/save_file.txt +0 -0