♻️ Refactor: Reorganize someday hooks#265
Merged
tyler-dane merged 39 commits intomainfrom Feb 26, 2025
Merged
Conversation
Going to do this in the sidebar for now for simplicity
currently opening the correct form when clicking an existing draft need to update for new drafts (and shortcuts)
need to update for new drafts (and shortcuts)
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
66d7cd1 to
9a55cc0
Compare
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
Closed
2 tasks
the sidebar isn't being used as a container now, so this makes the code easier to understand
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This closes #275. It is a follow-up PR for #264 and a companion for #255
Once this is merged, it'll also make fixing #252 a lot easier
Summary of changes
useSidebarUtilhook and into context:SidebarDraftContextanduseSidebarContext.dnd, which is called when a user starts dragging a someday event.DraftProvider), we're doing this within eachSomedayEventContainer. This was necessary to make sure each sidebar form was rendering in the correct place.floating-ui'sonOpenChangecallback handle how to close event forms when clicking outside or pressingESC. This let us remove onClick handlers in the Header, Grid, and Sidebar.SomedayEventsimple reduce the number of props needed.Other
This introduces a known bug, where someday drafts aren't started when initiated from the command palette: #274. Decided to move forward with this PR regardless and tackle that as a separate PR (this one has already gotten big enough).