/
TODO
396 lines (346 loc) · 16.6 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
****
**** This file is now AUTHORITATIVE.
****
**** The older, live file is here:
**** http://ietherpad.com/hMrw0URncq
**** There is a now a version in the git wiki, but I'm still working here:
**** http://github.com/mtnviewmark/barley/wiki/To-do-list
****
[] codes:
j = Johan, m = Mark
[x] = x plans on doing this
[*x] = x is in the middle of doing this (used when it make take awhile
[+] = it's done, x did it
[?] = unclear if we should do this
[-] = won't do or decided not to do
How to use this list:
- add items as you think of them
- edit, resort, split, combine, categorize items as you think of it
- when you planning on doing something, add your initial
(someone else might still sneak in a do it!)
- when you've started something, and it will take a while, put a *
(don't do things with a * without talking to the owner!)
- when you're done with an item mark with a +, but leave it there
(feel free to resort)
- when we make a release, we'll collect all the + items, generate
release notes, then remove them.
=== BARLEY TODO ===
--- Required Tasks to get to Workshop ---
[] Next/Prev on slides needs to either be dimmed at end...
or take you to next/prev step of the tutorial
--- Required Tasks to get to 0.2 ---
Content
[m] replace template.hs with new Chapter 1 step pages
[m] Better Index page that actually points at the chapters & steps
[m] Documentation page with links to sources
[?] embedded iframe of user's local doc set
[] Help page with pointers on what to do, where to go
[] since jQuery, and images are copied into project tree, there should
be a copy of the license & attributions copied in there as well
[m] slide page formatting
Source Editor
[-] better editing indicator: adding padding resizes and looks bad
[+m] run/edit rocker switch logic
[+m] basic logic
[+m] rocker image
[+m] run when edited logic (alert w/Save/Go Back)
[-] push top save/cancel buttons to top right of title
- removed them
[+m] keep rendering preview closed first time (revive preview arg)
[m] line number alignment on Chrome and FF
- line height of body text is sometimes different
[+m] handling multiple error messages on a given line
[+m] add tutorial next,prev links
[+] force recompilation action
[+] viewing lib files doesn't show editor
[+] either sprout a scroll bar, or grow when adding lines to the source text
[+] 80 column bar (hokey, but sort of works)
[] add tutorial index (expandy) to sidebar
[] add some other more prominent tutorial next link
[?] expand/close icon on preview header
[] expand/close icon on error header
[] pop-out preview into own window (and leave there)
CodeMirror2
[] gutter color doesn't extend to left edge when not-edited
[] flaky initial display of rest of paragraph (call refresh?)
[x] re-organize haskell mode files (.js and .css)
[?] enable other modes
[] bug w/onChange being called on creation
[] bug: doesn't matchBracket when typing the closer
[] bug: double-clicking
[] modes should be compressed into one .js and one .css file
Compilation
[+m] better module loading...
[-m] model code used by Happstack plugins
[+m] remove nu hack
[+m] compilation system tracks mod and compilation times to avoid reloading
[-m] clear compilation state user control per file and/or whole
[-m] be certain that we can unload w/o breaking
(thinking about dangling thunks)
[] editing an included, but not viewed module should trigger recompile
for modules that use
[] be certain that loading is safe in light of type mismatches
[] catch error and exceptions during template running
[] replace source on error rendering with link to source editor
[] enable -Wall, or at least -W things that most users want, like
non-exhaustive patterns (just lost HOURS to this one!)
[] index.hs doesn't seem to compile as other pages do...
-- edit Index.hs and save: doesn't update, and doesn't compile dependencies.
Project View
[] add file/dir button on dirs
[] list of templates (from a templates dir)
[] add form to page
[] on click, move form, fill in dir field, hide dir field
Misc
[] review and fix dependency versions in barley.cabal
[+] efficiently handling static content
[+] add Last-Modified headers to static content
[+] add Expires: <data> & Cache-Control: max-age=<secs> headers
[+] process If-Modified-Since, If-Unmodified-Since
[] add Cache-Control: no-cache for dynamic content
[] lib/DevPage.hs shoudn't have to include all the .css files in all pages
- find a way to have the page spec extra css
--- Tasks ----
[] make common error and warn functions for command line processing
[] error page give instructions for what to do
[] Text.Html is forcing us to use prettyHtml instead of renderHtml
[] either wrap the body contents in a div, and make page return an [Html]
-- which is icky 'cause then the top html element isn't clear to users
[] switch to some other HTML library
[] handle errors during copyTree
[] --force flags:
[] run --force = run w/o marker file so we can develop directly out of seed.
[] init --force = copy even if the dest is not empty.
** Do not add these flags to start, which should always be safe.
[] reevaluate our file case handling decisions
-- we have Haskell code named with initial uppers to match module names
-- but then things like .css files w/o... and URLs to said files have lower
-- case? i.e.: /source?file=Source.hs !!!
[] track down double script execution bug
-- somehow adding an Last-Modified header on scripts causes Webkit to load
-- scripts multiple times. see processModificationTime in Utils.hs...
-- try commenting out parts of that function to inhibit the bug
[] remove run-source-js-once hack in Source.js when we do
Source Editor
[] On source editing cancel, if the text was changed, show a button
(or link): "Undo Cancel" save and restore the text as needed.
[] Not clear if Edit in this state should restore or not.
[] fix Haskell parser
[] still doesn't handle strings with gaps correctly....
[] style pragmas
[] smarter indenting
[] choose parser (for hilighter) based on file extension
-- support js, css, html, xml
[] combine research text entry fields into one
[] optional setting to get side-by-side for the preview and edit panels
[] more accurate 80 column line would sure be nice
[?] switch icon set to Fugue icons
[] click on error message -> line selection
[] preview/error message on top? like wiki pages?
AJAX Compile
[+m] compile only via __compile_only flag on template request
- returns either OK or error messages
[+m] source editor on load, fetches __compile_only results, and
displays either preview or errors based on result
[+m] source editor can display compile results
[+m] put error messages in-line with editor
[] on edit save, submit in background to a new endpoint
[] then refresh preview iframe or show errors on result
[] source view, on ERROR stays on edit mode
[] source view, on OK returns to view mode, and opens page in new window
[] preview pages have a AJAX call back to see if they need to auto-refresh
? how do we inject this JS without putting the preview in an iframe?
? have users write something like: page = head << ... +++ autoupdate
Content
[] move source.hs & project.hs into a dev directory
-- after compilation can handle hierarchical modules
[] FAQ system with sections, questions, jQuery expanding answers
generated from a text file or dir of text files
Compilation
[-j] unload modules after evaluating 'page'
-- handled now in new compilation system
[] remove AltLoad.hs once plugins package includes our patch
[] remove ghc and ghc-prim dependencies in barley.cabal
[] handle hierarchically named modules
-- currently referenced modules are build correctly
-- but the top level module is placed/looked for in wrong .build dir
-- if the top level module is in a sub dir: say, Tools/Source.hs
[] how to handle when the user wants to use some other package?
[?] Source.hs includes stuff from Barley/Utils.hs as it has no way to import
that - should it? can it?
Project View
[] collapse/expand of directories & all
[] rename of files in project view
[] delete of files in project view
[] move/copy files in project view
Pristine system
[] when init'ing a project put a duplicate copy in pristine, r/o
[] add a siHasPristine filed to SourceInfo
[] add show pristine & restore button that copies from pristine
[] diff view that diffs from .pristine
Server
[?] add ETag
[?] process If-Match, If-None-Match
--- User Stories ---
User downloads, unpacks, installs (ick)
barley start
opens browser
sees nice intro page
User runs barley w/o a command
some helpful text is printed out, suggesting commands that could be run
such as
barley start playground
User goes intro page
clicks on Sample page
sees result
told to go to file
opens file
file contains text on a suggested edit
user returns to browser
reloads
"WOW"
User goes to intro page
clicks add
fills out form w/name and description
system generates file
goes to file to edit
reloads
"WOW"
User reloads a new page
there is a compilation error
error page directs them what to do next
the edits in the file
there is a reload button
User types url
do the casing, load the right stuff
--- future User Stories ----
There is file of allowed URL to file mappings so that not ALL of the project dir is mapped
When running "barley init", if the current dir is not-empty, it won't overwrite
there is a "--force" flag to overwrite that
The user can edit .hs source in the web browser
(probably using http://codemirror.net/ )
=== USER STORIES DONE ===
Running barley at the command line:
barley has three commands: "start", "init", and "run"
"start" is just "init" if needed followed by "run"
all three commands take an optional directory to be the project directory
if none is given, then the project directory defaults to the current directory
"init" copies the "seed" skeleton project into the project directory
it creates the project directory if needed
it fails if the project directory isn't empty
if the current directory contains a "seed" directory, that is used as the seed
otherwise, the "seed" directory in the data dir (via cabal install) is used
if even that is missing, "init" fails and complains
"run" checks that the project directory is okay - that is, was once "init"'d
if fails if it wasn't
=== TODO DONE FOR 0.2 RELEASE ===
[+m] create a playground dir and exclude it's contents (but not it) from the repo
[+m] notice that the directory started in is empty and call init-project
[+m] if init is called from start, then it shouldn't complain about the non-empty dir
[+m] init and start take an optional directory to cd into first
[+m] init-project should copy a set of files from data dir
[+m] move Init.hs to Project.hs
[+m] provide init, check, and enter functions
[+m] rename skeleton to seed
[+m] use a .barley-project file to check if project dir is really a project dir
[+m] look for seed in current dir first, before looking at path's from GHC
[+m] remove playground from repo
[+m] when providing a project directory on the command line with init, create if it doesn't exist
[+m] move template.hs, etc... to data-dir
[+m] create scaffold.css in data dir
[+m] make index page look like a tutorial with task steps
[+m] output encoding should be correct: UTF-8
[+m] static files are served with incorrect MIME type
[+m] add a README file
[+m] side bars
[+m] broke reloading somehow...
[+m] make barely start work outside of ghci
[+m] make sure file path is rational before serving:
- no ".." elements, no ".*" elements
[+m] need a better term than "run" for the act of invoking code to return a page
equivalent of "run" in IDEs, but what is it here?
opens the page in a new browser window
I choose "View Page" and "View the generated page"
[+m] add jQuery to system
[+m] ensure serving as correct type
Source Editor
[+m] request handler option for templates
[+m] read file and display contents
[+m] link to open user page in new window
[-] user page windows are named with the path so they reuse by page
[-] pop window to the top (in Chrome it opens in a tab and 2nd time
stays behind
[+m] open up in _blank target
[+m] open file via file: link
[+m] editable form
[+m] save file from form
[+m] js to convert text to edit field
- turn edit area yellow and editable on edit
[+m] rendering preview (via iframe)
[+m] add hoogle and hayoo search fields to a new search side bar module
[+m] use jQuery to fill search fields with the source view selection
[+m] make text area be the right size
- perhaps use the elasitc jQuery plugin
[+m] validate that file is rational for both reading and writing
- doesn't contain .. path elements, for example
[-m] protect against Source.hs viewing itself (infinite iframes...)
-- no need, it works...
[+m] need a way to make the preview optional, and know for which
pages it should be on or not
-- previews if ext is .html or (.hs and not in ./Library)
[+m] preview disabled for things under lib/
[+m] line numbers
[+m] integrate CodeMirror as the source editor
[+m] eliminate annoying "shift" when CodeMirror loads the text
[+m] "better" size the code editing box
[+m] editing field should make it bigger
[+m] syntax parser for Haskell
[+m] add class for words from the Prelude
[+m] change look on edit/readonly
[+m] matching brace coloring is hideous in CodeMirror
[+m] selection to research field is broken
[+m] icons for the action links
[+m] research fill-from-selection should work even when source is read-only
[+m] or perhaps, if keystroke after select -> auto edit?
[-m] perhaps not have expensive r/o version thing, but use the parser
to generate a static version - as in the example on CodeMirror site
[-m] get into edit without losing selection
see error -> scroll around -> select -> type -> oops -> edit button
[+m] remove ZWSP hack in Source.hs when CodeMirror fixes the bug that
inserts them
[+m] sanitize line endings coming out of editor
Content
[+m] Make ribbon.jpg longer
-- or figure out a way to put the Barley logotype in a separate image.
[-m] Add the circle navigation buttons for: Home, Project List, Help
[+m] add Home, Project, Docs, Help links to top bar
[+m] move community links to a sub-menu of Haskell
[+m] write index.hs that gives the user a hello and what to do next
[+m] factor common code between Index.hs and Source.hs into lib/DevUtils.hs
[+m] scaffold.css should probably be named something better like barley.css
Compilation
[+m] put .hi and .o files in some .build tree
[+m] ensure loading modules that import user modules works
[+m] make dependent modules as needed
[+m] look for dependent modules rooted in both "." and "lib"
for both compilation and loading
Project View
[+m] shows all files in project w/access to view/edit/run links
=== FUTURE TODO ===
History
[] keep a linear view of file versions in a .history dir:
name the files something like <isodate>-<filepath>.hs
[] diff through history
[] integrate with hg or git if available
=== NOTES FOR SNAP ===
writeText writes out in UTF-8 but doesn't make that guaruntee in the docs
finishWith is awkward
even I'm confused about when to use finishWith vs. pass
-- seems like two different ways of doing `mplus`
parseHttpTime has no option for failure - should return a Maybe
formatHttpTime & parseHttpTime use CTime? and need IO?
should there be utilities for handling expires times?
when returning errors w/o content, no way to have not Content-Length
=== NOTES FOR HTML ===
renderHtml is BROKEN - it puts things inside an extra HTML element!?!?!?
unordList etc. would be nice if they'd take HTML a => [a] rather than [Html]