Commit 3dac5da
authored
feature: Add event handlers for saved search and bookmark actions (#1408)
This adds event listeners for the following events:
- saved-search-saved
- saved-search-edited
- saved-search-deleted
- saved-search-bookmarked
- saved-search-unbookmarked
Future PR(s) will emit those events. We create the event listeners so that anywhere in the app can emit an event and the appBookmarkInfo will update. And as a result, all the subscribers to appBookmarkInfo will get the new state automatically.
saved-search-bookmarked can use the same event listener method as saved-search-saved because:
1. The saved search owner can't toggle its bookmark status (like in issue tracker).
2. As a result of point number 1, non owners can be the only users toggling. Which means it can use `handleSavedSearchSaved` since it just adds the saved search to the user's array locally.
The above also applies for saved-search-unbookmarked and saved-search-deleted
Other changes:
- On the overview page component, since we recently change the load task to disable autoRun and control when it runs, add a new check that verifies that we have not loaded this current saved search before.1 parent 2021acc commit 3dac5da
File tree
3 files changed
+479
-7
lines changed- frontend/src/static/js
- components
- services
- test
3 files changed
+479
-7
lines changedLines changed: 34 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
122 | 138 | | |
123 | 139 | | |
124 | 140 | | |
125 | 141 | | |
126 | 142 | | |
127 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
128 | 156 | | |
129 | | - | |
130 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
131 | 162 | | |
132 | 163 | | |
133 | 164 | | |
134 | 165 | | |
135 | 166 | | |
| 167 | + | |
136 | 168 | | |
137 | 169 | | |
138 | 170 | | |
| |||
0 commit comments