- 
  Notifications
 You must be signed in to change notification settings 
- Fork 0
Commit 74c054a
authored
Note details page - Creation & Editing improvement (#9)
* Apply common background to the note details page
* Improve note creation page layout
The improvements are focused on simplifying the layout and UX:
* removed labels for both title and note content forms
* improved the visibility of both forms
* removed separator between title and note content
* added default placeholder to ensure the understanding of each form
 purpose
* fixed the bug when default layout (sizes) of forms is different than
 at window's resize event
* Add cancelation confirmation alert
To prevent unintentional Cancel button pressed the Alert will be
displayed asking the user for a cancel confirmation.
* Modify the note regarding the index instead of ID
* Provide the database handler with the Update() method
* Return the ID of currently open note
* Implement the full editing page
The editing page (in the code is NoteWidgetDetailsPanel) is the page
responsible for viewing and optionaly editing the selected note.
The whole code has been reused from the Note creation page, but has been
additionaly provided with:
* Save & Edit button
 Each changes the isEditing state which manipulates the forms editable
 property.
* Title and full message pulled from the database on the component
 mounted event
* ID of the component is taken from the NoteWidgetClickHandler
 This ensures that once each note is clicked, the proper text will be
 displayed in the forms.
* Fix: Cancel alert reacts no matter the editing state
When not editing, but pressing the Cancel button, the alert should not
pop out.
To fix that, the isEditing state is checked when pressing Cancel
instead of the title and message forms.
* Fix: Short message is displayed in the form
To display the full message Databse handler had to be provided with the
Promise-based REACT_METHOD which should return the full message.
Also the copy-paste error has been fixed, where getNoteShortPost was
used just like for the NoteWidget in the main panel.
* Provide the details page with the delete function
The delete procedure is based on the Database handler which performs the
whole deleting operation on the C++ backend side.
* Fix: Height is not calculated on entry
* Correct minor formatiing issues1 parent 32c11f1 commit 74c054a
File tree
6 files changed
+260
-90
lines changed- src
- windows/ReactNativeNotes- NativeModules- Repository
 
 
6 files changed
+260
-90
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
|  | |||
| 9 | 9 |  | |
| 10 | 10 |  | |
| 11 | 11 |  | |
| 12 | - | ||
| 13 | 12 |  | |
| 14 | 13 |  | |
| 15 | 14 |  | |
| 16 | 15 |  | |
| 17 | - | ||
| 18 | 16 |  | |
| 19 | 17 |  | |
| 20 | 18 |  | |
|  | |||
| 25 | 23 |  | |
| 26 | 24 |  | |
| 27 | 25 |  | |
| 28 | - | ||
| 29 | 26 |  | |
| 30 | 27 |  | |
| 31 | - | ||
| 32 | - | ||
| 28 | + | ||
| 33 | 29 |  | |
| 34 | 30 |  | |
| 35 | 31 |  | |
| 36 | - | ||
| 37 | - | ||
| 38 | - | ||
| 39 | - | ||
| 40 | - | ||
| 41 | - | ||
| 42 | - | ||
| 43 | - | ||
| 44 | - | ||
| 45 | 32 |  | |
| 46 | 33 |  | |
| 47 | 34 |  | |
|  | |||
| 54 | 41 |  | |
| 55 | 42 |  | |
| 56 | 43 |  | |
| 44 | + | ||
| 45 | + | ||
| 46 | + | ||
| 47 | + | ||
| 48 | + | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + | ||
| 57 | 52 |  | |
| 58 | 53 |  | |
| 59 | 54 |  | |
|  | |||
| 63 | 58 |  | |
| 64 | 59 |  | |
| 65 | 60 |  | |
| 66 | - | ||
| 61 | + | ||
| 67 | 62 |  | |
| 68 | 63 |  | |
| 69 | 64 |  | |
| 70 | - | ||
| 65 | + | ||
| 66 | + | ||
| 67 | + | ||
| 68 | + | ||
| 69 | + | ||
| 70 | + | ||
| 71 | + | ||
| 72 | + | ||
| 73 | + | ||
| 74 | + | ||
| 75 | + | ||
| 76 | + | ||
| 77 | + | ||
| 78 | + | ||
| 79 | + | ||
| 80 | + | ||
| 71 | 81 |  | |
| 72 | 82 |  | |
| 73 | 83 |  | |
|  | |||
| 78 | 88 |  | |
| 79 | 89 |  | |
| 80 | 90 |  | |
| 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 | - | ||
| 91 | + | ||
| 92 | + | ||
| 93 | + | ||
| 94 | + | ||
| 95 | + | ||
| 96 | + | ||
| 97 | + | ||
| 98 | + | ||
| 99 | + | ||
| 100 | + | ||
| 101 | + | ||
| 102 | + | ||
| 103 | + | ||
| 104 | + | ||
| 105 | + | ||
| 106 | + | ||
| 107 | + | ||
| 108 | + | ||
| 109 | + | ||
| 110 | + | ||
| 106 | 111 |  | |
| 107 | - | ||
| 112 | + | ||
| 113 | + | ||
| 108 | 114 |  | |
| 109 | 115 |  | |
| 110 | 116 |  | |
|  | |||
| 114 | 120 |  | |
| 115 | 121 |  | |
| 116 | 122 |  | |
| 117 | - | ||
| 123 | + | ||
| 124 | + | ||
| 118 | 125 |  | |
| 119 | 126 |  | |
| 120 | - | ||
| 121 | - | ||
| 122 | - | ||
| 123 | 127 |  | |
| 124 | 128 |  | |
| 125 | 129 |  | |
|  | |||
| 128 | 132 |  | |
| 129 | 133 |  | |
| 130 | 134 |  | |
| 131 | - | ||
| 132 | - | ||
| 133 | - | ||
| 134 | - | ||
| 135 | - | ||
| 136 | - | ||
| 137 | - | ||
| 138 | - | ||
| 139 | - | ||
| 140 | - | ||
| 141 | - | ||
| 142 | - | ||
| 135 | + | ||
| 136 | + | ||
| 143 | 137 |  | |
| 144 | 138 |  | |
| 145 | 139 |  | |
| 140 | + | ||
| 146 | 141 |  | |
| 147 | 142 |  | |
| 148 | 143 |  | |
| 149 | 144 |  | |
| 150 | 145 |  | |
| 151 | 146 |  | |
| 152 | 147 |  | |
| 153 | - | ||
| 148 | + | ||
| 149 | + | ||
| 150 | + | ||
| 154 | 151 |  | |
| 155 | 152 |  | |
| 156 | 153 |  | |
|  | |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
|  | |||
| 5 | 5 |  | |
| 6 | 6 |  | |
| 7 | 7 |  | |
| 8 | + | ||
| 8 | 9 |  | |
| 9 | - | ||
| 10 | + | ||
| 10 | 11 |  | |
| 11 | - | ||
| 12 | + | ||
| 12 | 13 |  | |
| 13 | - | ||
| 14 | + | ||
| 15 | + | ||
| 14 | 16 |  | |
| 15 | 17 |  | |
| 16 | 18 |  | |
| 19 | + | ||
| 20 | + | ||
| 17 | 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 | + | ||
| 18 | 72 |  | |
| 19 | - | ||
| 20 | - | ||
| 73 | + | ||
| 74 | + | ||
| 75 | + | ||
| 76 | + | ||
| 21 | 77 |  | |
| 22 | 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 | + | ||
| 23 | 128 |  | |
| 24 | - | ||
| 25 | - | ||
| 26 | - | ||
| 27 | - | ||
| 28 | - | ||
| 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 | + | ||
| 29 | 154 |  | |
| 155 | + | ||
| 30 | 156 |  | |
| 31 | 157 |  | |
| 32 | 158 |  | |
| 33 | 159 |  | |
| 34 | 160 |  | |
| 35 | 161 |  | |
| 162 | + | ||
| 36 | 163 |  | |
| 37 | - | ||
| 38 | - | ||
| 39 | - | ||
| 40 | - | ||
| 41 | - | ||
| 42 | - | ||
| 164 | + | ||
| 43 | 165 |  | |
| 44 | 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 | + | ||
| 45 | 195 |  | |
| 46 | 196 |  | |
| 47 | 197 |  | |
|  | |||
0 commit comments