-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestfrontendFrontend functionalityFrontend functionalityimplementationPossible implementation idea to keep in mindPossible implementation idea to keep in mind
Milestone
Description
Work on the separate-chat branch. (However I need to merge in some changes and push it first.)
TODO (we can talk about what order to do these in):
- Implement
SeparateMessageEditor.- It will look similar to
SituatedMessageEditorin terms of taking anonSubmitandonCancel. - Remove the
createSubmitHandlercall; the URL, HTTP method, and JSON body used there will eventually be moved to theonSubmitinSeparateChat. - I don't think it will need a
SongActionConfirmlikeSituatedMessageEditorhas.
- It will look similar to
- Create a
SeparateChatMessagecomponent similar toSituatedChatMessage. This can probably go in the same file.- Check
dbTypes.tsfor theSeparateChatEventtype. - Need to decide how to render the two variants of
SeparateChatEvent; two different components? Or just render each optional property conditionally? - There might be a name clash on
SeparateChatMessageif you need to import the type; talk to me if this happens, but you might not need to import the type at all.
- Check
- Implement
SeparateChat.- It will have similar UI (JSX output) to
SituatedChat, but it will createonSubmitandonCancelcallbacks forSeparateMessageEditorsimilar toSavedSongRoworDraftAdditionSongRow. - The chat property ("prop") is currently
any[]type and needs to be changed to the type of thePlaylistDocument's chat. CheckdbTypes.ts. - Look at the old
createSubmitHandlercall inSeparateMessageEditorfor some guidance on what API request to make. - Remove the
reloadPlaylistprop and instead get theloadPlaylistfunction fromuseContextlike inSavedSongRow.
- It will have similar UI (JSX output) to
- Figure out some CSS styles for
SeparateChatandSeparateMessageEditor's button.- The CSS in this project is written as Javascript objects in the
.tsxfiles (this may not have been the best decision in hindsight, see Migrate to CSS modules #53, but it is what it is). - Need to decide on how the
SeparateChatwill look, like the padding, background color, and most importantly vertical positioning of elements:- The
SeparateMessageEditorwill likely be at the very bottom. - When the chat is half empty, do messages float to the top or bottom?
- The
- The CSS in this project is written as Javascript objects in the
- Eventually, if needed, add some code to make the scroll position automatically scroll to show the newest chat message (similar to
DraftAdditionSongRow)
The API is minimally documented/typed in apiTypes.ts, however I don't think you will need to worry about that for the API request you make to post a message. The existing code in SituatedMessageEditor and SavedSongRow/DraftAdditionSongRow are enough for that. The types in dbTypes.ts like SeparateChatEvent and its variants will be useful.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfrontendFrontend functionalityFrontend functionalityimplementationPossible implementation idea to keep in mindPossible implementation idea to keep in mind