-
Notifications
You must be signed in to change notification settings - Fork 4
/
TODO
262 lines (142 loc) · 11.5 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
TODO
====
- EtoileUI
- Standardizing on -setValue:forProperty: and -valueForProperty: for COObject/NSObject. Existing methods in ETLayoutItem and ETViewpoint will become -setValue:forRepresentedProperty: and -valueForRepresentedProperty:.
Open Issues
-----------
- Write tests for -[ETController didChangeContent:toContent:]
- Retain delegates for all ETUIObject subclasses
- Make persistency easier and safer
- Means the delegate is owned as any other aspect
- Fix popup-button serialization
- We must extend view serialization to replace NSMenuItem.representedObject by the COObject.UUID or nil, and vice-versa (as we just do for NSControl.target)
- Add -testTableLayout to TestPersistency
- Factor out shared instance support duplicated in:
- +[ETStyle/ETActionHandler sharedInstanceForObjectGraphContext:]
- +[ETLayoutItemFactory itemFactoryWithObjectGraphContext:]
- Test +itemFactoryWithObjectGraphContext: and +sharedInstanceForObjectGraphContext:
- Fix disabled assertion about initialFocusedItem in ETWindowItem
- Add -referenceURL to COPersistentRoot, COBranch and COObject as an equivalent to COPath but including the store URL
- Possible Format: coreobject://storeURL/?<persistentRootUUID>[/branchUUID[/objectUUID]] (the optional parts are encloded in [])
- This referenceURL could be passed to -[ETDocumentController openItemWithURL:options:] and -[ETDocumentCreation initWithURL:options:]
- Improve UnitKit to support making the test suite the frontmost application (and then enable -testActiveItemChanged)
- Test that activating an application in background, results in the window group posting a ETItemGroupSelectionDidChangeNotification
- Determine whether we want the main or key window as representing the selected item in the window group
- The active item could represent the main window and the selected item the key window...
- Could need to add -didChangeActiveItem to ETDocumentController when the main window changes. We could possibly live without and just react to the key window change, and testing whether the main window is the same or not... e.g. the controller subclass would a lastActiveItem property or use some similar approach (ETDocumentController subclass could cache the inspector item of the active item as we do Worktable)
- The object graph context in -provideWindowItem might have to change depending on how we implement ETWindowItem persistency
- Test that giving up key window status doesn't result in the initial focused item to be set next time the window becomes key
- Add -[TestWindowItem testWindowInitialFocusedItemAndToolActivationOnBecomeKey]
- Test synthesized enter and exit events
- Finish to rewrite the Object Inspector and do something about ETInspecting.h... discard or document
- Support dispatching actions on ETWindowItem or ETScrollableAreaItem.
- To do so, add -[ETDecoratorItem (backend)Responder] that returns either the window or scroll view and in -[ETApp targetForAction:from:to:] checks each decorator present in the responder chain for this backend responder
- Or just reimplement the actions supported by NSWindow and NSScrollView in each decorator item class (and forward the messages to their Appkit representations)
- Finish cleaning NSView+EtoileUI
- Test -[ETTool targetItem] is reset in -[ETLayoutItem didChangeLayout:]
- Hide NSApplication as an AppKit widget backend implementation detail (ETApplication superclass should be NSObject)
- Decide whether to implement ETMoveToolTranslateNotification
- Formalize a bit more the action consumer protocols
- May be add -[ETool producedActionProtocols] or -[ETTool actionConsumerProtocols]
- Finish cleaning ETSelectTool
- Finish cleaning ETTool
- Enable commented out assertions in +activeTool (see TestTool)
- Rewrite -performKeyEquivalent: methods (should use -[ETLayoutItem responder] and the recursive propagation in the item tree looks dubious)
- Implement TestPersistentFreeLayout (TestFreeLayout suclass whose item tree is reloaded from a persistent context) and TestFreeLayoutPersistency (e.g. -[ETTestPersistency testFreeLayout])
- Implement textArea using NSTextContainer as its represented object and drawing glyphs using NSLayoutManager
- Pass the controller object graph context to -newItemWithRepresentedObject:options:
- Decide whether -parentItem or -enclosingItem should return -hostItem
- in the current implementation, -parentItem returns -hostItem to prevent rewriting geometry conversion methods to support both -parentItem and -hostItem
- returning -hostItem with -enclosingItem rather than -parentItem is probably cleaner... but this will impact geometry conversion, action propagation in the responder chain, and redisplay.
- The type of ETPositionalLayout.contextLayout should be ETLayout <ETLayoutingContext>
- if we support, multiple inheritance in the metamodel, this would be easy
- or we need to introduce another ETLayout subclass such as ETMainLayout that conforms to ETLayoutingContext, and declares a 'positionalLayout' property
- for now, we use ETTemplateItemLayout to match the metamodel
- Move the Nib support out of EtoileUI core
- For ETNibOwner, don't compile it if the AppKit is not the widget backend (or turn it into an optional trait)
- For ETController, move the Nib support into a category
- Persistency support missing for:
- ETTintStyle, ETShadowStyle, ETSpeechBubbleStyle
- Don't set the icon directly in ETShape, but turn it into a derived property and add -shapeKind.
- ETShape.icon would then be computed based on an internal dictionary that maps kind string constants to images.
- Fix -numberOfUntitledDocuments to be computed on demand rather than storing in an ivar (the count is wrong once documents get renamed and this doesn't play well with persistence)
- Declare our own pick and drop operation mask rather than using NSDragOperation
- Decide how we synchronize the selection for opaque layouts needing an update in -setSelectionIndexPaths:
- Post a selection notification based on whether an item group have an observer or delegate, rather than whether -setSelectionIndexPaths: was called on it, this way we could observe selection changes at various levels in the item tree
- Synchronize selection in opaque layouts on reload/expand (otherwise selected items won't appear selected when expanding a row or switching to an opaque layout)
- Implement 'operator' or 'function' property in ETCollectionViewpoint', which can be set to a block or a selector that takes a property/value pair in input and return a result. Not really sure... this seems to be duplicating ETLayoutItem.valueTransformers for simple operators such as avg, sum etc. For more complex collection operators, this seems to be the role of ETCollectionViewpoint and its subclasses.
Testing
-------
- Add ETResponder related tests exercising message forwarding to -actionHandler and -sharedFallbackResponder
- e.g. [tool responderToSelector: @selector(insertRectangle:)] and [tool insertRectangle:]
- e.g. [tool responderToSelector: @selector(scrollWheel:)] and [tool scrollWheel:]
- test the various ETUIObject subclasses
- provide a -respondsToSelector: and -forwardingSelectorForTarget: implementations in ETResponderTrait
- Could test explicitly -didChangeAttachedTool:toTool: is called on -setLayout:
- For now, we just rely on _areHandlesHidden update in -testNestedEditing (changing _areHandlesHidden to NO allows the handles to be shown for the selected nested item)
- Clean TestHitTest
- Don't expose NSWindow in TestCommon
- Check -indexPathForItem: documentation and tests
- UKNil([item10 indexPathForItem: [itemFactory item]]);
- UKNil([[itemFactory item] indexPathForItem: item10]);
- Write ETLayoutItem.source persistency tests (including its interaction with layout update, sorting and filtering)
- Write ETLayoutItem.valueTransformer persistency tests
- Write ETTableLayout tests that ensures the selection is set on -[ETController insertItem:atIndex:] (this would exercize -setSelectionIndexPaths: with opaque layouts)
- Write a test that ensures item value transformer removal works when passing a nil value to -setItemValueTransformer:forProperty:
- Write some exhaustive selection tests
Persistency
-----------
- Support viewpoint persistency
- Finish tool class hierarchy persistency
Documentation
-------------
- Update -itemWithObject:isValue: doc
Old Potential Issues
--------------------
- Verify NSView hidden property doesn't cause a KVC error when read or written, it caused a crash in the object browser layout in the past.
GNUstep Things
--------------
- Implement NSBrowser keyed archiving on GNUstep (see NSView+EtoileUI)
- Add -preparedCellAtColumn:row: to GNUstep (see TestCell)
# Basic Stuff
## Properties
* Expose more properties for EtoileFoundation and EtoileUI classes.
* Handle read-only properties in a sane way, usually when no setter is available. A method like -isReadOnlyProperty: (NSString *)propertyName should be added to NSObject+Model in EtoileFoundation; not really sure this is the best method name though. We also need to update CoreObject related classes to use this same mechanism.
* See Refactoring for more properties related stuff.
# Refactoring
* Patch NSBitmapImageRep to avoid method collision with -valueForProperty:, probably rely on posing a subclass or a category and method swizzling
# New Features
## Drawing
* Implement rotation support for layout items without view, the code should be put in -[ETLayoutItemGroup display:dirtyRect:inView]
## Layout
* Implement shape-driven and pattern-driven layouts (a typical case is a grid layout)
ETShapeLayout
-initWithShape:
ETShape
ETPatternShape
# New Applications & Examples
## Generalize AZSwitch into a versatile Expose-like application that allows to navigate the windows with any EtoileUI layouts. AZSwitch can be seen as a subcase of such an application that only comes with an hardcoded ETTableLayout.
## Write a System-wide Shelf (also often referenced as Overlay Shelf) that runs in a standalone process. Involves to subclass ETPickboard in the Shelf code and modify +[ETPickboard systemPickboard] to return a DO proxy of the pickboard instance in the Shelf process. If we put aside collaboration features, a first implementation Shelf application should probably be around one hundred lines of code. Most of the code involves to override -insertItem:atIndex: and -removeItem: in the following spirit:
// layout items are received by ref through DO and -pushObject: should pass objects by ref too.
- (void) insertItem: (id)item atIndex: (int)index
{
BOOL putProxyOnTheShelf = [item isMetaLayoutItem]; // a meta layout item is a UI proxy
if (putProxyOnTheShelf) // picked a link (encompasses the lazy removal case when -shouldRemoveItemAtPickTime: returns NO)
{
[super insertItem: item atIndex: index]; // nothing to do in this case
}
else // picked an object or an object copy (aka cut and copy)
{
// The CoreObject implementation for this code is underway but far
// from usable... the following is a very rough approach that will need
// to be carefully refined.
id modelObject = [item representedObject];
if ([modelObject isManagedCoreObject] == NO)
[CoreObject snapshot: [object representedObject] inLibrary: ShelfLibrary];
[super insertItem: item atIndex: index];
}
}
Then an ETOverlayShelfLayout could be created as an ETFreeLayout subclass to encapsulate the default UI of the Shelf in a pluggable layout.
# Long-term Experiments
## AppKit
### Modularize NSView to fully separate all the concerns (event handling, hierarchy/composite, drawing surface, responders)