-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
93 lines (77 loc) · 3.28 KB
/
notes.txt
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
Main things
-- consolidate all http requests into DataFetcher
-- document the reducers/app state
-- new map
-- eliminate usage of ReactApp.getCallbackProps
-- remove usage of inline function definition
-- make containers use actual actions to dispatch, where possible
-- eliminate usage of Active module, Active.Topic, Active.Mapper, Active.Map
-- Backbone hooks!! eliminate usage of .get and .models in react components
-- fork map (createmap)
-- collab cursors
-- user settings
-- leaving a map leaves junto state on map
-- explore maps needs resizing
-- actioncable stuff
-- Map
-- Realtime
-- Filter
-- remove usage of 'apply'
-- define a pattern for async calls affecting app state
-- remove async calls and replace with promises
-- rest of containers
-- history .push
-- realtime state
General Pattern:
-- make the network request
-- update the state
-- update the data (in DataModel)
-- update the user (with a ui notification)
// backbone models and collections
currentUser: Active.Mapper,
map: Active.Map,
maps: ExploreMaps.collection,
openSynapse: SynapseCard.openSynapse,
openTopic: TopicCard.openTopic,
topic: Active.Topic
// non backbone
metacodes: DataModel.Metacodes.toJSON()
selectedMetacodes: Active.Mapper.get("metacodes")
user: ExploreMaps.collection && ExploreMaps.collection.id === 'mapper' ? ExploreMaps.mapper : null,
moreToLoad: ExploreMaps.collection && ExploreMaps.collection.page !== 'loadedAll',
participants: ChatView.participants ? ChatView.participants.models.map(p => p.attributes) : [],
messages: ChatView.messages ? ChatView.messages.models.map(m => m.attributes) : [],
allForFiltering: Filter.filters,
filterData: Filter.dataForPresentation,
visibleForFiltering: Filter.visible
relevantPeopleForMap: Active.Map ? (Active.Map.get('permission') === 'commons' ? DataModel.Mappers : DataModel.Collaborators) : [],
juntoState: Realtime.juntoState,
mapIsStarred: Map.mapIsStarred,
requestAnswered: Map.requestAnswered,
requestApproved: Map.requestApproved,
userRequested: Map.userRequested,
// DONE
section: ExploreMaps.collection && ExploreMaps.collection.id,
pending: ExploreMaps.pending,
contextMenu: !!(ContextMenu.clickedNode || ContextMenu.clickedEdge),
contextNode: ContextMenu.clickedNode,
contextEdge: ContextMenu.clickedEdge,
contextPos: ContextMenu.pos,
contextFetchingSiblingsData: ContextMenu.fetchingSiblingsData,
contextSiblingsData: ContextMenu.siblingsData,
unreadMessages: ChatView.unreadMessages,
conversationLive: ChatView.conversationLive,
isParticipating: ChatView.isParticipating,
metacodeSets: ReactApp.metacodeSets,
toast: ReactApp.toast,
mobileTitle: ReactApp.mobileTitle,
serverData: ReactApp.serverData,
notifications: Notifications.notifications,
notificationsLoading: Notifications.notificationsLoading,
unreadNotificationsCount: Notifications.unreadNotificationsCount,
isNewMap: InfoBox.isNewMap,
mapsWidth: ReactApp.mapsWidth,
mobile: ReactApp.mobile,
mobileTitleWidth: ReactApp.mobileTitleWidth,
synapseCardPosition: SynapseCard.mouse,
synapseCardSynapses: SynapseCard.synapseCardSynapses,