This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
TODO
105 lines (77 loc) · 3.47 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
Search and Replace
==================
- Fix the issue with scopes. There's a bug in rangy that happens if the start
position, for instance, is at the very end of the scope. In this case, Rangy
findText will return a hit outside the scope!
- Support JavaScript regular expressions.
- Ideally, scope:
- If nothing selected, whole document.
- If label clicked, only element.
- If text selection, only text.
- Introduce a new undo object which has a "breakable" field. A search/replace
will turn "breakable" on. If the user undoes an undo object with "breakable"
turned on, then ask whether it should be done atomically or broken into
individual search/replace.
Misc
====
- util.stackTrace should be updated to take advantage of
console.trace.
Wed Itself
==========
Eliminate Contenteditable
-------------------------
Some tests were made in March 2016 to eliminate
``contenteditable``. Turning off ``contenteditable`` on IE11 causes
issues with maintaining the DOM selection in elements of the GUI
tree. (When using the keyboard to perform a selection, the focus moves
from ``.wed-comp-field`` to ``body``, which means that subsequent
keystrokes are lost.) There does not seem to be a way forward here,
short of having wed take over selection functions.
Store the Caret as a (Path, Offset) Pair
----------------------------------------
Up to now, wed has maintained its carets as a (Node, offset)
pair. This has worked fairly well but the changes that have been made
to support attribute editing have complicated things. In particular
the decorator must save the caret before decorating an element and
refresh it afterwards. This refreshing could be avoided by storing the
caret's node as a path. This could potentially also simplify other
cases.
Caret Paths
-----------
Caret paths currently cannot be used to note a caret position which is
inside a label (but outside an attribute value). This means that when
a transformation is initiated from a label and then undone, the
caret will **NOT** be back in the label.
[This is a problem which has been present in wed since the start but
has been thrown into focus with the addition of attribute support.]
Input Triggers
--------------
At the moment input triggers are applied whenever the keys that
trigger them are used in any of the child of the selector passed to
the InputTrigger. This may not always be desirable.
Listeners
---------
There should be a listener on the gui_tree and a listener on the data
tree. This way event handlers that care only about changes to the data
tree can listen only to that and not have to filter out the gui
stuff. This would require a change to what is given to modes because
right now they only get a gui listener.
TreeUpdater
-----------
* Currently, TreeUpdater is designed so that the number of primitives
is minimal. This has for effect that setTextNodeValue is used for
inserting and deleting text. setTextNodeValue uses ``node.data =``
to set the text, which is slower than using ``deleteData`` or
``insertData``. We should explore expanding the primitives so that
these better performing methods can be used instead of doing
``node.data =``.
Saving Protocol
---------------
* The procotol could be redesigned to use HTTP error codes for error
conditions.
Other
-----
* Investigate web workers to replace timeouts as the main parallelism
mechanism for running validation in the background.
* Dump XSLT altogether in favor of something faster? Loading saxon to
process XSLT 2.0 has a non-negligible cost.