Commit e3210c7
authored
♻️ Refactor: Reorganize someday hooks (#265)
* 🔧 Fix: Update import path for DateCalcs hook
* 🔧 Fix: Allow null draft event in sidebar utility hook
* 🧹 Chore: alphabetize useSidebarUtil
* 🔧 Fix: Update import paths for sidebar hooks in SomedayEvents
* 🐛 Fix: update how onPlaceholderClick creates a new draft
* 🧹 Chore: Remove unused imports and clean up web event types
* 🧹 Chore: Remove TODO comments
* ♻️ Refactor: Restore closeForm() in draft actions
* ♻️ Refator: use isSomedayFormOpen instead of draft.isOpen
* 🔧 Fix: Add optional chaining to draft status selectors
* ✨ Feat: Add drag and drop (DnD) state management for sidebar events
* ♻️ Refactor: Update GridEventPreview and SomedayEvents imports and types
* ♻️ Refactor: Update DraggableSomedayEvents types
* chore: remove onClick handlers in Header and Sidebar
* ✨ Feat: Improve draft category selection in Draft component
* ✨ Feat: Add sidebar ID constant and update draft container selection
* refactor(checkpoint): move sidebar state into Context
* fix: simplify state in DraggableSomedayEvent
* 🔧 Fix: imports from merge
* 🧹 Chore: improve type-safety by adding category to resizing and drag
* 🧹 Chore: remove Someday conditional from Draft.tsx
Going to do this in the sidebar for now for simplicity
* ♻️ refactor(checkpoint): use isSomedayFormOpen state for sidebar
currently opening the correct form when clicking an existing draft
need to update for new drafts (and shortcuts)
* ♻️ refactor(checkpoint): close someday form on ESC
need to update for new drafts (and shortcuts)
* 🔧 fix: prompt for confirmation before deleting someday event from shortcut
* 🔧 fix(checkpoint): update form props based on draft category
the placement value is currently correct, but the form is still visually appearing in the wrong location. this is likely due to how the refs are handled
* 🧹 Chore: enable DND by fixing id check in DraggableSomedayEvent
* 🧹 chore(checkpoint): recompute form position within each SomedayEventContainer
* 🧹 Chore: fix type issues in sidebar hooks
* 🧹 Chore: cleanup sidebar draft effects and actions
* 🧹 Chore: delete old effects in useSidebarEffects
* 🐛: Fix ESLint configuration for Prettier plugin
Replaced direct plugin usage in eslint config with plugin object.
The flat config system expects each item in the array to be a valid configuration object
Plugins need to be explicitly registered in the plugins field
* ✨ Feat: Create sidebar drafts upon 'W' and 'M' shortcuts
* 🧹 Chore: Remove unused imports and commented-out code in Draft component
* 🔧Chore: remove ID_SIDEBAR as a valid response for draft container
the sidebar isn't being used as a container now, so this makes the code easier to understand
* 🧹Chore: rearrange someday files1 parent 882b9c2 commit e3210c7
File tree
54 files changed
+727
-662
lines changed- packages/web/src
- common
- constants
- types
- utils
- draft
- ducks/events
- selectors
- slices
- views
- Calendar
- components
- Draft
- context
- grid
- hooks
- hooks
- actions
- grid
- sidebar
- state
- sidebar
- context
- hooks
- Event/Grid/GridEventPreview
- Grid
- AllDayRow
- MainGrid
- Header
- Sidebar
- SomedayTab
- MonthSection
- SomedayEvents
- DraggableSomedayEvent
- SomedayEventContainer
- SomedayEventsContainer
- SomedayEvent
- WeekSection
- Forms
- EventForm
- SomedayEventForm
- hooks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
54 files changed
+727
-662
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
7 | 3 | | |
8 | | - | |
9 | 4 | | |
10 | 5 | | |
11 | 6 | | |
| |||
22 | 17 | | |
23 | 18 | | |
24 | 19 | | |
25 | | - | |
| 20 | + | |
26 | 21 | | |
27 | 22 | | |
28 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
71 | | - | |
72 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
74 | | - | |
75 | | - | |
76 | 78 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| |||
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
6 | 15 | | |
7 | 16 | | |
8 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
9 | 21 | | |
10 | | - | |
| 22 | + | |
11 | 23 | | |
12 | 24 | | |
13 | 25 | | |
14 | 26 | | |
15 | 27 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
49 | 58 | | |
50 | | - | |
| 59 | + | |
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
| 64 | + | |
55 | 65 | | |
56 | 66 | | |
57 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
Lines changed: 13 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | 9 | | |
12 | | - | |
13 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 20 | | |
28 | 21 | | |
29 | 22 | | |
| 23 | + | |
30 | 24 | | |
31 | 25 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 26 | | |
36 | 27 | | |
37 | | - | |
38 | 28 | | |
39 | 29 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
43 | 36 | | |
44 | 37 | | |
45 | 38 | | |
46 | 39 | | |
47 | | - | |
| 40 | + | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
| |||
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | | - | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | | - | |
33 | 35 | | |
34 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
| |||
0 commit comments