-
-
Notifications
You must be signed in to change notification settings - Fork 829
Fix thread summary layout for narrow right panel timeline #7838
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "replies" label is now hidden for narrow (<= 400 px) timelines. |
2e8c01e
to
cc26daa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jryans Thanks, Ryan, for updating it! Just one remark, it seems the min-width used for 400px+ timelines is still being applied for narrow ones. As per the design mockup, we should remove it for timelines below 400px, letting it adjust itself to the available space.
@janogarcia Hmm, are you looking at a normal chat timeline, or the right panel style used with maximised widgets? I don't notice any min-width for the right panel style: At the moment in this PR, I have just forced the right panel timeline used with maximised widgets to present the narrow version, as a responsive room timeline has many other more severe problems than this thread summary, so I thought it was perhaps best approached as it's own future project. (Maybe a bad assumption on my side!) 😅 Anyway, if you do want this to be truly responsive across all types of timelines, I can change to that. At the moment, we effectively don't make any attempt at a responsive timeline, so the thread summary would be one of the few places that tries for now. |
@jryans Yeah, I did test it in the main timeline (which, as you pointed out, has all sorts of problems with responsiveness). I'm all for making this kind of component responsive to whatever context they are dropped in (a la CSS Container Queries) rather than tweaking its responsive behavior on a case-by-case basis. It should be easier to maintain and more future-proof. So, yes, that would be a super welcome enhancement. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this should switch between wide and narrow modes responsively in both the main and right panel timelines. Here's the main timeline:
@jryans Thanks for the update, Ryan. Just one question, does the thread summary expands to 100% of the available space when in narrow container mode? In the GIF, it seems as if the size suddenly jumps to 100% when switching to the non-narrow one.
I forgot about the Netlify test deploy. I'll test it myself. 🙂👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested it, and it works as expected. Thanks!
This version uses a single breakpoint tested from a single place as discussed above and passes the result via the context. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally sane otherwise
There are still some issues in the bubble version of the right panel chat timeline, but it has more layout issues than just threads, so seems better to tackle it separately.
Fixes element-hq/element-web#20941
This PR currently has no changelog labels, so will not be included in changelogs.
Add one of:
T-Deprecation
,T-Enhancement
,T-Defect
,T-Task
to indicate what type of change this is plusX-Breaking-Change
if it's a breaking change.Preview: https://pr7838--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.