jspaint/TODO.md

202 lines
8.7 KiB
Markdown
Raw Normal View History

2014-05-18 08:47:46 +00:00
# ![](images/icons/32x32.png) JS Paint Todo
2014-05-18 08:47:46 +00:00
2017-10-26 04:02:46 +00:00
### Help
* Resizable panes
* Resizable window
* Link-esque things
* Popups (I'd probably make the text within the popups selectable)
* Related topics (I'd probably make this a heading with links instead of the weird context menu thing)
* Add topics
* In "Tips and Tricks" (which is just a lame section)
* Transparency
* Multi-user / collaboration / "To share the document On-Line" or whatever
2017-10-26 04:02:46 +00:00
* Index
* Search
* Keyboard support
2019-12-16 06:49:57 +00:00
* Interactive tutorials?
* Possibly hosted by Clippy, with [ClippyJS](https://www.smore.com/clippy-js)
* Highlight elements on the page
* Be sure to cover undo/redo, and file saving
2017-10-26 04:02:46 +00:00
### Visual
* Warning sign for "Save changes to X?" dialog
* Error symbol for error message dialogs
* 3D inset border for inputs - SVG `image-border`?
2017-10-26 04:02:46 +00:00
* The window close button uses text; font rendering is not consistent
* The progress bar (Rendering GIF) is left native
* Menu separator spacing
2019-10-27 05:11:41 +00:00
* Minor color differences (0x808080 != 0x7b7b7b) - use a palette for consistency?
2017-10-26 04:02:46 +00:00
* I want to give most things a revisit later on for Pixel Perfection
2019-10-27 05:11:41 +00:00
* Fill bucket and airbrush cursors are supposed to have inverty parts
2017-10-30 05:23:01 +00:00
* Custom cursors in Edge; apparently they require `.cur` files? ugh
2018-01-10 03:42:38 +00:00
* The canvas-area's border is different in Firefox and Edge from Chrome
2017-10-26 04:02:46 +00:00
2014-09-29 01:19:39 +00:00
### Menus
2019-12-16 06:49:57 +00:00
* Bug on mobile: If you click on a menu item (up/down) and then move over to a menu item and click (up/down) it does nothing (and you can repeat this)
2015-06-29 04:33:22 +00:00
* Keyboard navigation of submenus
* <kbd>Alt</kbd> (by itself)?
2014-10-27 01:16:43 +00:00
2014-09-29 01:19:39 +00:00
### Components / Windows
2017-06-02 04:59:44 +00:00
* Use the ghost when dragging on a component window's title bar
* Make the component ghost account for the window's title bar
2014-05-22 08:20:59 +00:00
### Extended editing
2014-05-18 08:47:46 +00:00
2019-12-16 06:49:57 +00:00
* Optional fill tolerance (slider that you enable from a settings menu?)
* Transparency
2017-10-26 04:02:46 +00:00
* Color opacity slider
2018-08-24 06:22:46 +00:00
* Toggle between blend and copy (overwrite) modes
2018-11-15 07:44:46 +00:00
* Maybe equivalize any rgba(X, X, X, 0) in fill algorithm?
2017-10-26 04:02:46 +00:00
There'd still be the possibility of 1/255th opacity pixels,
2017-10-30 05:23:01 +00:00
but if you're creating colors from the combination of a color picker and an opacity slider,
you might naturally introduce differing zero-opacity color values a lot.
2014-09-29 21:12:32 +00:00
2019-12-15 03:24:52 +00:00
* Documents with multiple sub-images
2014-09-29 21:12:32 +00:00
* Component to switch between sub-images
* Deal with undo/redo for sub-images
* Animated GIFs
* Transparency ([jnordberg/gif.js issue #5](https://github.com/jnordberg/gif.js/issues/5))
* Animated Transparent APNGs
2019-10-27 20:45:56 +00:00
* APNG Library: [UPNG.js](https://github.com/photopea/UPNG.js/)
2014-09-29 21:12:32 +00:00
* Multi-size Icons
* Windows ICO ([jBinary can read](https://jdataview.github.io/jBinary.Repo/demo/#ico) and presumably write ICO files)
2014-09-29 21:12:32 +00:00
* Mac ICNS
* Layered images?
* Photoshop PSD ([via psd.js](https://github.com/trevorlinton/psd.js))
* OpenRaster ORA ([via ora.js](https://github.com/zsgalusz/ora.js/tree/master))
* Online (multi-user) and local (single-user) sessions
2016-03-24 16:38:37 +00:00
* See [sessions.js](src/sessions.js)
2017-10-26 04:02:46 +00:00
* Issues
2019-12-16 06:49:57 +00:00
* There's no conflict resolution; user edits revert other user edits
* It's not eventually consistent
2017-10-26 04:02:46 +00:00
* Cursors from other users that go outside the parent can cause the page to be scrollable
2014-10-24 00:54:05 +00:00
2019-12-16 06:49:57 +00:00
* Painting textures on 3D models
* And onto tesselating patterns which I imagine can be a special case of 3D models
2014-09-22 10:13:18 +00:00
2019-12-16 06:49:57 +00:00
* Save text and record transformations so the image can be saved as
SVG (or HTML?) with invisible selectable transformed text elements?
* Every time you move a selection, duplicate the text and create a clip-path for both parts?
* This wouldn't really be nice for screen-readers, only selection
* Well, maybe make only one of them audible for screen-readers
2015-06-16 01:29:30 +00:00
2019-12-16 06:49:57 +00:00
### Device support
2014-09-29 01:19:39 +00:00
2019-12-16 06:49:57 +00:00
* Prevent text selection in buttons and history entries
* Enlarge menus on touch devices
* Enlarge window titlebar close buttons on touch devices
* Magnifier: on touchscreens, wait until pointerup to zoom
* To detect touchscreen usage, could keep track of whether the last pointermove had any buttons pressed
* Alternative way to access "Color Eraser" feature without a secondary mouse button?
* Alternative access to functionality that would normally require a keyboard (with a numpad!)
2019-10-27 20:45:56 +00:00
* Numpad +/-: Increase/Decrease brush size, Double/Halve selection size, ...
2019-12-16 06:49:57 +00:00
* Shift (toggle):
* Proportional, Smear / Trail Selection
* "Snap to 8 directions" / "Octosnap"?
* An isometric mode would also be good
2017-10-26 04:02:46 +00:00
* Ctrl+Select: Crop tool or "Crop to selection" option
2019-10-27 05:11:41 +00:00
* Don't drag toolbars out into windows with touch
* Unless with two fingers perhaps
* I might want to use multitouch on the tool buttons for MultiTools tho...
2019-10-27 05:11:41 +00:00
2014-09-29 01:19:39 +00:00
### Tools
2014-09-22 10:13:18 +00:00
2019-12-16 06:49:57 +00:00
* Select and Free-Form Select
* Passive: create no undoables until you do something like move or invert the selection
2016-09-24 06:03:50 +00:00
* You should be able to make a selection, then change the secondary color, then drag the selection cutting it out with the color you selected
2019-12-16 06:49:57 +00:00
* Select and deselect with no actions in between should create no undoables
* Proportionally resize selection while holding Shift
* (or maybe by default? I feel like it should be the default, tbh.)
2014-10-02 19:29:25 +00:00
2014-09-20 17:36:56 +00:00
* Text
2016-11-05 19:52:44 +00:00
* Expand box to make room for new lines
* If it would go over the edge of the canvas, reject the input (at least, that's what mspaint does)
2014-10-02 19:29:25 +00:00
* Minimum size of 3em x 1em
* Initially and while resizing
2019-12-16 06:49:57 +00:00
* Add padding left to text area when font has glyphs that extend left, like italic 'f' in Times New Roman
* mspaint has access to font metrics
* jspaint could render text to see when it would overflow
* To do it efficiently,
* Take all glyphs in the text
* (And maybe a set of common letters like the alphabet)
* Split with a library to handle Unicode (emojis etc.)
* Uniquify
* Place them *all on top of each other*, positioned absolutely, leaving room to the left of them to detect pixels
* Scan the pixels at the left to find the maximum extent left
* Could store, per font, what glyphs have been tested and what's the maximum extent detected, in order to not have to rerender these
* "What glyphs have been tested" should be specific to font size and attributes, since an italic 'f' may extend more than a normal 'f' for instance
2014-09-20 17:36:56 +00:00
* Store position of FontBox
2019-12-16 06:49:57 +00:00
* Shape Styles
2014-09-29 01:19:39 +00:00
* Shapes: respond to Ctrl (It's complicated)
* Handle patterns (black and white mode)
2019-12-16 06:49:57 +00:00
* Still needed for fill tool
* Check to make sure patterns are aligned properly for all the tools
* There's supposed to be a mapping between color values and pattern fills, used by the text tool and for the palette when switching between modes (colors should be kept between going to black and white mode and back)
2018-08-25 02:20:45 +00:00
### Desktop App (Electron)
2016-03-24 16:00:40 +00:00
Electron boilerplate stuff:
2019-02-16 18:42:34 +00:00
2018-08-24 01:45:25 +00:00
* [Set up Content-Security-Policy](https://electronjs.org/docs/tutorial/security)
* Remember window position/state
2018-08-24 02:50:10 +00:00
* Add icon to built executable
2018-08-24 01:45:25 +00:00
* Set up autoupdating
* Keep window hidden until loaded (`show: false`, [`ready-to-show`](https://electronjs.org/docs/api/browser-window#event-ready-to-show))
* Ideally name the executable `jspaint.exe` instead of `JS Paint.exe`
2019-02-16 18:42:34 +00:00
Functionality:
2018-08-25 02:20:45 +00:00
* A dialog when closing
* Subwindows as separate windows
* Document recovery without having to know about File > Manage Storage - pop up contextually with a dialog when you need it
2019-02-16 18:42:34 +00:00
* Show link URLs when you hover over them, in the status bar (because we have a status bar! haha) (there's this API: [event: update-target-url](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#event-update-target-url), which gave me the idea, or it could be implemented with mouse events)
2018-08-25 02:20:45 +00:00
* Recent files (could also be implemented for 98.js.org in the future)
2018-11-15 07:44:46 +00:00
* Create a landing page / home page for the desktop app (similar to https://desktop.webamp.org/ or https://desktop.github.com/) - (perhaps https://desktop.jspaint.app/) - and/or for JS Paint in general (perhaps https://jspaint.app/about/)
2018-08-25 02:20:45 +00:00
* Remove usage of `prompt` (and ideally `alert`/`confirm` too! shouldn't be using these anyways!)
2019-02-16 18:42:34 +00:00
* macOS: `open-file` event, `setRepresentedFilename`, `setDocumentEdited` etc.
2018-11-15 07:44:46 +00:00
* Windows: maybe handle `session-end` event and ask to save?
* Detect if file changes on disk, ask if you want to reload it?
2016-03-24 16:00:40 +00:00
2014-08-16 01:57:01 +00:00
### Also
2014-10-18 06:34:44 +00:00
* Anything marked `@TODO` or `@FIXME` in the source code
2014-09-29 01:19:39 +00:00
* See [Issues on GitHub](https://github.com/1j01/jspaint/issues)
2014-09-29 01:19:39 +00:00
* CSS
* DRY, especially button styles - SVG `border-image`?
* Use a CSS preprocessor
* DRY
* Clearer `z-index` handling?
* Color-swap themes (maybe even load Windows theme files)
2019-12-16 06:49:57 +00:00
* Stuff should go in an [OS GUI library](https://github.com/1j01/os-gui) with themes for Windows 98 and other OSes
2014-09-29 01:19:39 +00:00
* JS
2019-12-16 06:49:57 +00:00
* Organize things into files better; "functions.js" is like ONE step above saying "code.js"
2016-03-24 16:00:40 +00:00
* `$Window` has a `$Button` facility; `$FormWindow` overrides it with essentially a better one
2019-12-16 06:49:57 +00:00
* Make code clearer / improve code quality
* https://codeclimate.com/github/1j01/jspaint
2014-10-01 18:45:19 +00:00
2014-10-18 06:34:44 +00:00
* Images
2017-10-26 04:02:46 +00:00
* Use a shared sprite sheet per theme (and optimize it I guess)