mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-27 05:01:57 +00:00
some house keeping...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
edcbd29087
commit
7009052f85
124
pwiki2.js
124
pwiki2.js
@ -1,21 +1,18 @@
|
|||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* XXX BUG CHROME: can't .get(..) a generator...
|
* XXX Q: can we access fs from a pwa???
|
||||||
* affected code:
|
* XXX start writing docs in pwiki
|
||||||
* BaseStore's .get(..)
|
* - WYSIWYG markdown editor/viewer (ASAP)
|
||||||
* bug report:
|
* - fs store/export in browser
|
||||||
* https://bugs.chromium.org/p/chromium/issues/detail?id=1361981
|
|
||||||
* when done test:
|
|
||||||
* .get('/test/list/generator').asPages()
|
|
||||||
* .get('/test/list/generator').raw
|
|
||||||
* .get('/test/list/generator').data
|
|
||||||
* .get('/test/list/generator').text
|
|
||||||
* potential temporaty fix:
|
|
||||||
* wrap all .__get__(..) call in an async function testing if
|
|
||||||
* it's return value is a generator function (return) or anything
|
|
||||||
* else (await)...
|
|
||||||
* XXX CACHE need to explicitly prevent caching of some actions/pages...
|
* XXX CACHE need to explicitly prevent caching of some actions/pages...
|
||||||
|
* XXX the parser should handle all action return values, including:
|
||||||
|
* - lists -- XXX
|
||||||
|
* - iterators -- XXX
|
||||||
|
* - strings -- DONE
|
||||||
|
* - numbers -- DONE
|
||||||
|
* - misc:
|
||||||
|
* dates -- ???
|
||||||
* XXX FEATURE tags and accompanying API...
|
* XXX FEATURE tags and accompanying API...
|
||||||
* - add tags to page -- macro/filter
|
* - add tags to page -- macro/filter
|
||||||
* - <page>.text -> <page>.tags (cached on .update(..))
|
* - <page>.text -> <page>.tags (cached on .update(..))
|
||||||
@ -32,7 +29,25 @@
|
|||||||
* i.e. a way to pass tags through path...
|
* i.e. a way to pass tags through path...
|
||||||
* /some/path:tags=a,b,c
|
* /some/path:tags=a,b,c
|
||||||
* XXX FEATURE images...
|
* XXX FEATURE images...
|
||||||
* XXX might be fun to push the async parts of the render to the dom...
|
* XXX BUG CHROME: can't .get(..) a generator...
|
||||||
|
* affected code:
|
||||||
|
* BaseStore's .get(..)
|
||||||
|
* bug report:
|
||||||
|
* https://bugs.chromium.org/p/chromium/issues/detail?id=1361981
|
||||||
|
* when done test:
|
||||||
|
* .get('/test/list/generator').asPages()
|
||||||
|
* .get('/test/list/generator').raw
|
||||||
|
* .get('/test/list/generator').data
|
||||||
|
* .get('/test/list/generator').text
|
||||||
|
* potential temporaty fix:
|
||||||
|
* wrap all .__get__(..) call in an async function testing if
|
||||||
|
* it's return value is a generator function (return) or anything
|
||||||
|
* else (await)...
|
||||||
|
* XXX rename??
|
||||||
|
* System -> .system
|
||||||
|
* Config -> .pwiki
|
||||||
|
* XXX async/live render...
|
||||||
|
* might be fun to push the async parts of the render to the dom...
|
||||||
* ...i.e. return a partially rendered DOM with handlers to fill
|
* ...i.e. return a partially rendered DOM with handlers to fill
|
||||||
* in the blanks wen they are ready...
|
* in the blanks wen they are ready...
|
||||||
* something like:
|
* something like:
|
||||||
@ -45,15 +60,18 @@
|
|||||||
* @include(./path ..)
|
* @include(./path ..)
|
||||||
* -> <span pwiki="@include(/full/path ..)"/>
|
* -> <span pwiki="@include(/full/path ..)"/>
|
||||||
* XXX prevent paths from using reserved chars like: ":", "#", ...
|
* XXX prevent paths from using reserved chars like: ":", "#", ...
|
||||||
* XXX OPTIMIZE CACHE match pattern paths -- to catch page creation...
|
* XXX OPTIMIZE CACHE catch page creation -- match pattern path...
|
||||||
* 1) explicit subpath matching -- same as .match(..)
|
* 1) explicit subpath matching -- same as .match(..)
|
||||||
* 2) identify recursive patterns -- same as **
|
* 2) identify recursive patterns -- same as **
|
||||||
* XXX Q: empty title???
|
* XXX Q: empty title???
|
||||||
* - special default name
|
* - special default name
|
||||||
* a timestamp or some thing similar
|
* a timestamp or some thing similar
|
||||||
* this can be hidden until changed by user
|
* this can be hidden until changed by user
|
||||||
|
* - do we split .name/.path and .title???
|
||||||
|
* ...since pWiki is a wiki, the system-level answer is NO.
|
||||||
* XXX do we need something like /System/Actions/.. for fast actions called
|
* XXX do we need something like /System/Actions/.. for fast actions called
|
||||||
* in the same way as direct page actions???
|
* in the same way as direct page actions???
|
||||||
|
* ...experiment??
|
||||||
* XXX FEATURE list macro paging...
|
* XXX FEATURE list macro paging...
|
||||||
* ...should this be macro level or handled in .each()
|
* ...should this be macro level or handled in .each()
|
||||||
* what mode?
|
* what mode?
|
||||||
@ -86,9 +104,10 @@
|
|||||||
* XXX OPTIMIZE might be a good idea to make some methods that only access
|
* XXX OPTIMIZE might be a good idea to make some methods that only access
|
||||||
* the index sync -- this will make the store unusable while indexing
|
* the index sync -- this will make the store unusable while indexing
|
||||||
* though...
|
* though...
|
||||||
* XXX OPTIMIZE might be a good idea to move stuff down the stack to Store:
|
* XXX OPTIMIZE load pages in packs...
|
||||||
|
* might be a good idea to move stuff down the stack to Store:
|
||||||
* .each() -> .store.each(<path>)
|
* .each() -> .store.each(<path>)
|
||||||
* ...this will enable ups to optimize page loading on a store
|
* ...this will enable us to optimize page loading on a store
|
||||||
* level...
|
* level...
|
||||||
* ...another approach would be to make .get(..) accept a list of
|
* ...another approach would be to make .get(..) accept a list of
|
||||||
* paths and return an iterator...
|
* paths and return an iterator...
|
||||||
@ -106,7 +125,7 @@
|
|||||||
* e.g. when searching for xxx/tree the only "tree" available is
|
* e.g. when searching for xxx/tree the only "tree" available is
|
||||||
* System/tree, and if it is overloaded it's now a question of
|
* System/tree, and if it is overloaded it's now a question of
|
||||||
* picking one out of two and not out of tens generated by .paths()
|
* picking one out of two and not out of tens generated by .paths()
|
||||||
* XXX OPTIMIZE CACHE track store changes...
|
* XXX OPTIMIZE CACHE track store (external) changes...
|
||||||
* XXX OPTIMIZE CACHE/DEPENDS might be a good idea to add a dependencyUpdated event...
|
* XXX OPTIMIZE CACHE/DEPENDS might be a good idea to add a dependencyUpdated event...
|
||||||
* ...and use it for cache invalidation...
|
* ...and use it for cache invalidation...
|
||||||
* XXX OPTIMIZE NORMCACHE .normalize(..) cache normalized strings...
|
* XXX OPTIMIZE NORMCACHE .normalize(..) cache normalized strings...
|
||||||
@ -143,17 +162,9 @@
|
|||||||
* 2) all the macros that can source pages to produce generators (DONE)
|
* 2) all the macros that can source pages to produce generators (DONE)
|
||||||
* XXX might be a good idea to parse a page into an executable/function
|
* XXX might be a good idea to parse a page into an executable/function
|
||||||
* that would render self in a given context...
|
* that would render self in a given context...
|
||||||
* XXX the parser should handle all action return values, including:
|
|
||||||
* - lists -- DONE
|
|
||||||
* - iterators -- DONE
|
|
||||||
* - strings -- DONE
|
|
||||||
* - numbers -- DONE
|
|
||||||
* - misc:
|
|
||||||
* dates -- ???
|
|
||||||
* XXX BUG: .move(..) behaves in an odd way...
|
* XXX BUG: .move(..) behaves in an odd way...
|
||||||
* see: System/move page action
|
* see: System/move page action
|
||||||
* ...deletes the original and moves an empty page -- sync error???
|
* ...deletes the original and moves an empty page -- sync error???
|
||||||
* XXX DELETE ./delete is triggered twice...
|
|
||||||
* XXX differences in behaviour between _abc and abc, either need to make
|
* XXX differences in behaviour between _abc and abc, either need to make
|
||||||
* them the same or document the differences and the reasons behind
|
* them the same or document the differences and the reasons behind
|
||||||
* them...
|
* them...
|
||||||
@ -164,24 +175,20 @@
|
|||||||
* - make filters run a bit more globaly -- per block...
|
* - make filters run a bit more globaly -- per block...
|
||||||
* - find a local parser...
|
* - find a local parser...
|
||||||
* XXX introspection:
|
* XXX introspection:
|
||||||
* /stores
|
* /stores -- DONE
|
||||||
* list stores...
|
* list stores...
|
||||||
* /info
|
* /info -- DONE?
|
||||||
* list page/store info
|
* list page/store info
|
||||||
* /storage
|
* /storage -- XXX
|
||||||
* list storage usage / limits
|
* list storage usage / limits
|
||||||
* XXX BUG: FF: conflict between object.run and PouchDB...
|
* XXX BUG: FF: conflict between object.run and PouchDB...
|
||||||
* XXX add action to reset overloaded (bootstrap) pages...
|
* XXX add action to reset overloaded (bootstrap/.next) pages...
|
||||||
* - per page
|
* - per page
|
||||||
* - global
|
* - global
|
||||||
* XXX Q: can we access fs from a pwa???
|
|
||||||
* ...looks like no :|
|
|
||||||
* XXX DEPENDS @now() makes the template uncachable, to we actually need it???
|
|
||||||
* XXX CHECK: @macro(..) and @slot(..) must overload in the same way...
|
* XXX CHECK: @macro(..) and @slot(..) must overload in the same way...
|
||||||
* XXX DEPENDS/CACHE @macro(..) introduces a dependency on count (pattern)
|
* XXX DEPENDS/CACHE @macro(..) introduces a dependency on count (pattern)
|
||||||
* ...not sure how we track these...
|
* ...not sure how we track these...
|
||||||
* XXX revise how we handle .strict mode in page's .raw and .text...
|
* XXX revise how we handle .strict mode in page's .raw and .text...
|
||||||
* XXX NEXT might be a good idea to add an API to restore page(s) from .next...
|
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -201,7 +208,7 @@
|
|||||||
* - page actions
|
* - page actions
|
||||||
* - delete -- DONE
|
* - delete -- DONE
|
||||||
* - copy/move -- DONE
|
* - copy/move -- DONE
|
||||||
* - resolved (async) --
|
* - resolved (async) -- DONE
|
||||||
* - migrate/rewrite bootstrap --
|
* - migrate/rewrite bootstrap --
|
||||||
* - store topology -- DONE
|
* - store topology -- DONE
|
||||||
* - sync and sync conf --
|
* - sync and sync conf --
|
||||||
@ -271,26 +278,35 @@
|
|||||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
*
|
*
|
||||||
* Architecture:
|
* Architecture:
|
||||||
* store
|
*
|
||||||
* page
|
* store
|
||||||
* renderer
|
* ^
|
||||||
|
* |
|
||||||
|
* page <--> renderer
|
||||||
|
* ^
|
||||||
|
* |
|
||||||
|
* client
|
||||||
|
*
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* Modules:
|
* Modules:
|
||||||
* page - base pages and page APIs (XXX should this be in lib???)
|
* pwiki/
|
||||||
* parser - pWiki macro parser (XXX should this be in lib???)
|
* page - base pages and page APIs
|
||||||
* store - stores
|
* parser - pWiki macro parser
|
||||||
* base - memory store and store utils
|
* path - base path API
|
||||||
* file - file storage
|
* store/ - stores
|
||||||
* localstorage - localStorage / sessionStorage stores
|
* base - memory store and store API and utils
|
||||||
* pouchdb -
|
* file - file store
|
||||||
* ...
|
* localstorage - localStorage / sessionStorage stores
|
||||||
* filter - page filters
|
* pouchdb - PouchDB store
|
||||||
* base - base filters incl. wikiword
|
* ...
|
||||||
* markdown - markdown renderer
|
* filter/ - page filters
|
||||||
* ...
|
* base - base filters incl. wikiword
|
||||||
* pwiki2 - main cli / node entry point
|
* markdown - markdown renderer
|
||||||
* browser - browser entry point
|
* ...
|
||||||
* pwiki2-test - testing and experimenting (XXX move to test.js)
|
* pwiki2 - main cli / node entry point
|
||||||
|
* browser - browser entry point
|
||||||
|
* pwiki2-test - testing and experimenting (XXX move to test.js)
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Q: can we make this a single module with +/- some plugins??
|
* Q: can we make this a single module with +/- some plugins??
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user