feat(chat): fix spacing around messages #159
Reference in New Issue
Block a user
Delete Branch "theAnuragMishra/flotilla:158-message-blocks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pr makes the following changes to implement a better structure for chat messages.
Before and After screenshots attached in that order.
fixes #158
This PR is sort of a mess:
as anystuffThe problem you've identified is relevant, and the solution is sound, could you do another pass and tidy things up?
I gave everythign a thorough look again and cleared most of the mess. Everything looks perfect but there's one problem still remaining. On the first message of the block, you would expect the action buttons to appear on hovering anywhere including the profile picture, name or pubkey, or the message content.
But since this redesign separates messages from pfp and pubkey, it currently only shows these buttons when hovering the message content.
Now I'm split and rethinking whether I should have just fixed the paddings/margins without redesigning the whole layout.
Yeah, I like the refactor, but the UI is slightly worse. There's the issue you pointed out, but the context menu is in a different spot and interrupts hovering on adjacent messages. So I think it's probably best to just fix the original bug.
@@ -0,0 +28,4 @@const openProfile = () => pushModal(ProfileDetail, {pubkey: firstEvent.pubkey, url})</script><div class="relative flex w-full flex-col p-2 pb-3 text-left gap-3">We should remove this gap-3, it leaves dead space between messages and reduces information density
@@ -253,0 +261,4 @@elements.push({type: "message-block",id: currentBlock[0].id,events: [...currentBlock],currentBlock.splice(0)would be a tad better, the next line's reassignment wouldn't be necessary.Yes.. grouping into blocks was very appealing at first but after workign on the refactor for quite some time, I have come to a conclusion that leaving roomitems as individual entities is more suitable than creating blocks.
I will start from scratch and only adjust spacings and layouts keeping the same dom flow as is currently in the dev branch.
feat(chat): group consecutive messages into message blocks for more consistent dom flow and fixing weird spacingto feat(chat): fix spacing around messagesI have updated the pr with a simpler fix of the layout.
The current look of the UI is attached
76f20fffceto5db66cc25d