Fix: hide repeated avatar and username for grouped messages#82
Draft
beezly wants to merge 3 commits intoviktorstrate:mainfrom
Draft
Fix: hide repeated avatar and username for grouped messages#82beezly wants to merge 3 commits intoviktorstrate:mainfrom
beezly wants to merge 3 commits intoviktorstrate:mainfrom
Conversation
Owner
Contributor
Author
|
Nice find! I think the only good fix for this is going to be to float a popover. I'll work on it. Marking this as a draft for now. |
NSHostingView inside NSTableView with usesAutomaticRowHeights enters an infinite layout loop: layout() flushes SwiftUI transactions, which invalidate constraints, which re-enter layout. AppKit detects this and crashes with NSGenericException. Replace the entire auto-sizing mechanism with SelfSizingHostingView: - sizingOptions = [] prevents the hosting view from participating in Auto Layout constraint solving. - invalidateIntrinsicContentSize() is overridden to NOT call super (which would re-enter the constraint system) but instead schedule a coalesced async height update via DispatchQueue.main.async. - measureHeight() uses a temporary NSHostingController.sizeThatFits() to properly measure content at the cell width, including text wrapping. - heightOfRow returns cached heights (default 60px). noteHeightOfRows is called with animation duration 0 to avoid visible row resizing. Also removes the old measurementHostingView and handleTableResize.
…same sender Only show the profile header (avatar + username) on the first message in a consecutive group from the same sender. Timestamps remain visible on every message.
51b7298 to
0a392fa
Compare
Floating panel with quick reactions (👍🎉❤️), reply, reply in thread, and pin actions. Panel is dismissed when scrolling or resizing, and hidden when the row top is outside the visible timeline area.
0a392fa to
d239d3d
Compare
Contributor
Author
|
Rebased onto #85. Hover actions are now a floating NSPanel (HoverActionsPanel) instead of the inline ZStack |
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.


Summary
When multiple consecutive messages are from the same sender, the avatar and username are now only shown on the first message in the group. Timestamps remain visible on every message.
Before
After
Changes
shouldIncludeProfileHeader(at:)helper toTimelineViewControllerthat checks whether the previous visible item is a message from the same senderTimelineItemRowViewnow accepts anincludeProfileHeaderparameter (defaults totrue)