Roadmap
	[_] 50% Pre-Alpha - limited preview
		[_] 50% UI
			[_] 0% Tablet-specific
				[_] screen buttons
			[_] 80% modes
				[_] cropped mode
				| show only selected images
				[X] single image
				[X] slideshow (single image)
				[X] ribbon
				[X] single ribbon
			[_] 71% other
				[X] load/open
				[X] browse for location (open)
				[X] select saved set
				[X] keyboard help
				[_] general help
				[_] settings
				[X] image info
		[_] 75% navigation
			[X] image next/prev
			[X] ribbon next/prev
			[X] screen next/prev
			[_] marks next/prev
		[_] 54% editing
			[_] 66% ribbon
				[X] merge up/down
				| via. marking... 
				|
				| still thinking if this is the right way...
				[_] flatten
				[X] sort
			[_] 75% image
				[X] shift up/down
				[X] shift left/right
				[X] mark/unmark (selection)
				[X] rotate left/right
				[X] flip H/V
				[_] crop
				[_] 0% metadata
					[_] tag
					[_] note
				[X] open with external software
			[_] 42% marked (selected) set
				[X] crop (marked only mode)
				[_] tag
				[X] shift up/down
				[_] shift left/right
				[_] group
				[_] note
				[X] save as set
			[_] 33% crop selection via
				[X] marked
				[_] tag
				[_] date
		[_] 60% storage and loading
			[_] 75% ImageGrid cache
				[X] generate
				[X] load
				[X] save
				[_] update
				| needs revision...
			[_] 75% fav tree
				[X] generate
				[X] load
				[X] save
				[_] update
				| at this time images are added to the tree but not removed...
			[_] 25% xmp files
				[X] generate
				[_] load
				[_] save
				[_] update
			[_] 66% raw directory tree
				[X] load
				[X] save
				[_] update
		[_] 14% build targets
			[X] 100% Windows
				[X] CEF (Python/...)
				[X] node-webkit
			[_] MacOS X (node-webkit)
			[_] Android (PhoneGap)
			[_] iOS (PhoneGap)
			[_] Windows 8 (Native?)
			[_] Linux (node-webkit)
			[_] Windows Phone 8 (PhoneGap/Native)
	[_] 0% Alpha - limited preview
	[_] 0% Beta - public?
	[_] 0% 1.0 - public
	


[_] 29% Gen 3 current todo
	[_] 59% High priority
		[_] 0% Priority tasks
			[_] full archive index
				[_] segmented loading of images and data
				[_] ribbon separation
				| split ribbon into manageable chunks
				|
				| this can be done naturally by:
				| 	- date
				| 	- event
				|	- tag
				[_] index and group ALL files in an archive
				[_] import metadata
				[_] real GIDs
		[_] % Thumbnail generation strategies
			[_] extract existing raw thumbnails
			[_] make a preview just bigger than the screen first
			| ...to prevent loading the high-res
			|
			| this should be done BEFORE loading the image -- pre-load phase...
			[_] prioritize making thumbs for the ribbon (~350px) 
		[_] BUG: shifting last image out of a ribbon misaligns the current ribbon
		| i.e. the prev ribbon was deleted and the new focused ribbon
		| is aligned as if it was not current...
		[_] BUG: sometimes loading a raw directory stops at "error loading data.json"
		| and some times it does not err..
		[_] BUG: jumping in ribbon sometimes does not load the ribbon correctly...
		| Example 1:
		| 	first ribbon in (loaded at first image):
		|	 "file:///L:/mnt/hdd13 (photo)/NTFS1/media/img/my/work/- 20130616Y.001/DCIM/preview (RAW)/"
		|	 "F:\work\ImageGrid\cur\ImageGrid\src\ui\BUGS\ribbon loading error\"
		|	jumping to the end will result in an inconsistent view:
		|		- ribbon not loaded at the correct spot
		|		- wrong image is .current
		|
		| Example 2:
		| 	load same data at same position as in #1
		| 		- shift-F2 to marked-only view
		| 		- go to end of ribbon (any means work)
		| 		- shift-F2 or Esc out of marked-only mode
		| 	this will result in a state very similar (if not identical) to
		| 	example #1...
		|
		|
		| NOTE: jumping back and forth several times will make this problem
		| 		go away...
		| 		Q: could this be initial load/state error?
		[_] BUG: align problems are back...
		| default data set (browser/images.js) same images #4 (going 
		| from right) & #5 (going from left) of 18 in the first ribbon 
		| get aligned wrong...
		|
		| this is at a zoom level with screen proportions...
		|
		| zooming to a different level affects which images are 
		| misaligned, at "max" #2 and #5 are affected...
		|
		| centerView() fixes this, but only for the current image...
		[_] 50% BUG: sometimes the previews are not updated...
			[_] wrong resolution preview is loaded
			| when coming out of single-image-mode after moving to a 
			| different position (so as ribbons go reloaded)
			[X] previews do not get replaced at all, e.g. everything 
			| behaves correctly (order, etc.) but the previews are 
			| from wrong (ones before re-attaching) images
			| (this I can't repeat at this point)
			|
			| Example:
			|	URL: "file:///L:/mnt/P7000 (photo)/PHOTOS/Last week of September 2011/"
			|	going through the previews in the top row forward and backward
			|	watch the ribbon below -- on the way back everything is aligned
			|	correctly but the images are different.
			|	also, there are times when the ribbon below is partially loaded 
			|	or at it's edge when there are other images...
			|	NOTE: calling updateImages() will load the correct previews.
			|
			| The mechanics of this bug:
			| 	- sometimes the .onload handler gets the right image ref in 
			| 	  the closue but a wrong p_url, how can this happen I do not
			| 	  know.
			| 	- slowing down the browser appears to make this happen 
			| 	  less often, is this a race condition?
			|
			| Might be caused by fast sequential updating/reloading of an image:
			| 	- call the updateImage(...) in order several times
			| 	- cache .onload events get called in order of images loading 
			| 	  not in order of updateImage(...) calls...
			| (this cause is not confirmed)
			|
			| Apparently fixed by storing the preview URL in image.data(), this 
			| is slower but avoids problems with multiple updates and races...
		[_] editable list of external commands...
		| to add things like exportdirs.py etc.
		[_] 60% basic dialogs
			[_] select from list
			[X] alert
			[X] prompt
			[_] confirm
			[X] open directory (native)
		[_] 0% Tablet UI
			[_] screen buttons
		[_] save settings to config.json
		[_] Q: do we need separate theme settings?
		| ...for ribbon and single-image modes?
		[_] workflow editor (external app?)...
		| edit sequence of actions and events...
		|
		| Example:	
		| 	- on mount volume name X
		| 		-> make previews
		| 		-> make cache
		| 		-> import to index
		| 		-> run Viewer
		| 	- on Viewer data change
		| 		-> run exportdirs.py
		| 	- on tweak 
		| 		-> run Irfan view
		| 	- on edit
		| 		-> run Photoshop
		| 	- on PSD created
		| 		-> make preview
		| 		-> add to index
		| 		-> group with preview
		| 	...
		|
		|
		[_] 0% keyboard.js
			[_] multiple key handler...
			| handle multiple key presses...
			|
			| one way to do this:
			| 	- a generic handler with timeout
			| 		- if key N pressed before timeout kandle it's action
			| 		- if timeout handle default action
			|
			| Q: how do we organize the config for this?
			| 	a) <key-spec> syntax, some thing like 'A, B'
			| 	b) complex handler with keys (in addition to modifiers)
			|
			[_] 0% online config editor API...
				[_] onKey(<key-spec>, handler[, mode])
				| <key-spec> should be something simple like a string
				|
				| Examples that should work:
				| 	'Enter'
				| 	'alt-F4'
				|
				| NOTE: with current config structure this is not that 
				| 		trivial
				[_] offKey(<key-spec>[, mode])
				[_] introspection
				| this is partially done already, need a simpler API for 
				| the user...
		[_] BUG: sometimes duplicate images get loaded...
		| this happens when jumping back and forth on the mid ribbon until
		| the last element shows up and then moving left until the frame
		| around the image disappears...
		| at this point, this will return 2:
		|
		| 	$('[order='+$('.current.image').attr('order')+']').length
		|
		| happens when:
		| 	ribbon length: ~42
		| 	screen width: 4
		| 	jumping to end from start of ribbon
		[_] ASAP: test on Android...
		[_] 50% Undo/Redo
			[X] basic one step (revert to last save)
			[_] push/pop state stack
		[_] 30% mark-based operations
			[_] 50% cropping selection
				[X] marked
				[X] ribbon
				[_] by tag/collection
				[_] by group
			[X] shift up/down
			[_] tag
			[_] group
			| a group should behave as a single image but is 
			| viewable/expandable as a ribbon...
			|
			| should be two types of groups:
			| 	- strict - always as a single image
			| 		like a set of versions, processed and processing 
			| 		versions of the same image.
			| 		(auto-group?)
			| 	- loose - similar images, could be named collections
			| 		viewed individually, but can be accessed either from 
			| 		a list or a member image (primary).
			[_] collection
			| make or add to existing collection
		[_] add ability to save/load ranges of images and the structures around them
		| e.g.load image 100 to current ribbon -> will load 100 images
		| for current ribbon and all the in between images from other
		| ribbons above and below...
		[_] single image mode transition (alpha-blend/fade/none)
		[_] 0% grouping / meta-image
			[_] versions w. label image
			| a set of images that is represented by one of the group
			[_] collection
		[_] 0% CSS
			[_] cleanup
			[_] split themes and layout
		[_] tweak image pre-caching size -- keep as many images cached as possible.
		| might be good to always cache the smaller previews so as to make things
		| look faster...
		[_] revise reporting scheme...
		| showStatus(...) should be called uniformly, either at the source 
		| or a specific reporting layer...
		[_] 0% tweak loader
			[_] thresholds and frame size
			[_] remove extra and repetitive actions
			[_] caching config
		[_] side-by side view...
		[X] BUG: context status does not get updated on Ctrl-D
		[X] single ribbon mode
		| should this have up/down navigation?
		|
		| something like showGidsAsRibbon(gids) would be generic and logical...
		[X] build cache in background...
		| this must be done while updating IMAGES live...
		[X] 100% dialog constructor
			[X] widget: text
			[X] widget: bool
			[X] widget: choice
			[X] widget: dir/ndir
			| browser native (dir) and custom (ndir) directory selector...
		[X] 100% image sorting (date/name/...)
			[X] 100% sort by:
				[X] date
				[X] name
				[X] manual shift left/right/position
				| position shift is mark and shift here..
			[X] 100% Sort ui
				[X] reverse
				[X] select sort method
		[X] usable empty view -- w.o. data...
		[X] 100% UI elements
			[X] indicators
			[X] image info
			[X] stub info dialog
			[X] detailed image info
		[X] build for windows (node-webkit)
		[X] BUG: scaling is again broken with rotated images
		| - rotate an image
		| - scale it to 1 (press 1)
		[X] BUG: BASE_URL seems to gain a new trailing '/' on each save...
		| low priority as this does not affect anything...
		[X] 100% gesture support
			[X] up/down - navigate
			[X] left/right - navigate
		[X] make the marks in single image mode show in corner of viewer, not image
		| and think of a uniform indicator position...
		|
		| 	+---------------------------+
		| 	|					   oooo	| <-- global indicators
		| 	|							|		(all modes)
		| 	|							|
		| 	|							|
		| 	|							|
		| 	|							|
		| 	|							|
		| 	|							|
		| 	|							|
		| 	|					   oooo	| <-- context indicators
		| 	+---------------------------+		(single image mode)
		|
		| make global indicators semi-transparent in single-image-mode, so as to 
		| indicate their lesser priority than context/image indicators...
		|
		| keep image indicators within the image square for ribbon mode...
		|
		| possible indicator styles:
		| 	- letter, expand on hover
		| 	- colored circle -- show text of same color under or to the side on hover
		|
		| might bee nice too use both styles, one for images one for global...
		[X] BUG: shifting ribbon left sometimes results in wrong order...
		| i.e. an image with order 12 before image with order 11
		|
		| Example:
		| 	- default image set
		| 	- move first image 2 positions right
		|
		| Resulting state:
		| 	- current image order: 12
		| 	- next image order: 11
		| 	- prev image order: 10
		|
		| This is stably reproducible.
		[X] BUG: changing window size (F11) in single image modes messes things up...
		| some images are of different sizes (newly loaded) and aligned in a wrong way...
		|
		| appears not to affect square-fit view...
		|
		| until we cycle to ribbon mode and back...
		| 
		| Q: does this trigger the on-resize event???
		| A: no, not connected...
		|
		| possible that this is connected with the align/load bug...
		|
		| appears to be a state leak, this affects:
		| 	- correctImageProportionsForRotation(image) -- mis-alignes images
		| 	  while after cycling single image mode, behaves correctly...
		| 	- affects finNImages(...) -- uses old size of viewer...
		[X] BUG: aligning still sometimes gets off...
		| ...after rotating a number of images
		|
		| happens when:
		| 	- getScreenWidthInImages() < 2
		| 	- looking through images in one direction and back, some get misaligned
		| 		...this is stable behaviour by centerRibbon(...), 
		| 		calling it again will not fix this.
		| 		moving next/prev will fix the issue until it comes back again
		| 	- affected by LOAD_SCREENS and number of images in ribbon
		| 		current figures:
		| 			Ribbon: 18
		| 			Position going forward: 4
		| 			Position going back: 1
		| 			LOAD_SCREENS: 6
		| 	NOTE: changing LOAD_SCREENS moves the affected positions.
		| 	NOTE: had a similar bug where some images still kept their 
		| 			prior sizing after recycling...
		| 			...check if centerRibbon(...) and correctImageProportionsForRotation(...)
		| 			are called in right sequence...
		[X] BUG: keyboard.js, some combinations resolve problems...
		| in current help shows E, F4, alt-F4 as "Open image in ..."
		| 	- E and F4 work OK
		| 	- alt-F4 both close the viewer (default) and open an image.
		|
		| Example:
		| 	E: doc('Open image in external software', openImage),
		|	F4: {
		|			default: 'E',
		|			alt: doc('Close viewer'),
		|		},
		|
		[X] reverse ribbons...
		[X] slideshow mode...
		[X] default STUB image...
		| or a loading animation..
		|
		| ...would be good to make something pixilated so as to look nise 
		| on various magnifications.
		|
		| keep always cached.
		[X] import fav dirs (wo. index)...
		[X] ASAP: load/view un-cached directories...
		[X] ASAP: support relative paths in cache...
		[X] ASAP: account for image rotation with screen proportions while positioning
		| getRelativeVisualPosition(...) gives an odd position when:
		| 	- image is rotated
		| 	- image is screen-proportioned
		[X] NOTE: rotating might still produce alignment errors
		| this is due:
		| 	- most outerWidth/outerHeight being used do not account for margins...
		[X] ASAP: rotate images in the viewer...
		| This is a tad complicated by:
		| 	- marks
		| 	- image elem proportions that can change
		[X] 100% themes
			[X] light
			[X] gray
			[X] dark
		[X] make focus up/down chose a closest independently of direction...
		| navigation should be stable and moving up then down should yield 
		| exactly the same result...
		[X] ASAP: rewrite binSearch!! 
		| linSearch obviously is not usable for large sets of data...
		[X] split saving/loading into files and localStorage
		| DATA
		| 	- stored in localStorage
		| 	- stored in file
		| IMAGES
		| 	- stored only in files (does not change)
		|
		[X] 100% modes
			[X] ribbon
			[X] single-image
		[X] Save/load state
		[X] 100% action visual indication
			[X] first/last image
			[X] shift up/down
	[_] Low priority
		[_] Help
		[_] Keyboard config
		[_] general config
		


[_] 58% Gen 3 UI implementation
	[X] 100% Infinite ribbon (lib)
		[X] cyclic ribbon
		[X] image block generation
		[X] image block update
		[X] ribbon head/tail management
		| must be adaptive to current user scroll speed...
		|
		| at least a couple of screens at current zoom level...
	[_] Partial save/load
	| save only a block or changed data...
	[X] Adaptive preview size (lib)
	[X] Multiple ribbon (reuse)
	[_] 0% User actions
	| see [[controls.otl]] for basic actions...
	|
	| additional actions:
		[X] 100% toggle mark image
			[X] mark between
			| mark all images between closest marks
			[X] mark all/none
			[X] mark invert
		[X] show marked only in ribbon (crop selection)
		[_] crop image
		| shows a red/blue rectangle around image
		|
		| can be:
		| 	turned +/- 90 deg
		| 	turned arbitrarily
		| 	scaled with constrained proportions
			[_] show crop as red rectangle
			[_] show only cropped area
			[_] show crop as black veil
		[_] add note to image
		| a-la flickr notes...
		[_] edit IPCT
		[X] rotate image
	[_] 66% UI modes
		[_] 0% single ribbon
			[_] show images shifted (all / above only / below only) in current ribbon
			[_] show marked only
		[X] 100% multiple ribbons
			[X] show images above/below
			[X] show marked only
		[X] 100% single image


.
| vim:set spell :
