-
-
Notifications
You must be signed in to change notification settings - Fork 832
New feature: marking rooms as unread [MSC2867] #6314
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.
Thank you for working on this! Generally, looks great! Just some minor details
Could you please include a sign-off as described here?
Also, I think this should probably be hidden under a labs flag since it is using an unstable prefix
should this react to the stable prefix m.marked_unread already as well? or is the usual approach to add it as soon as the MSC is in a further state?
As far as I know, this usually isn't done.
the current code feels like too much is duplicated but can't really say where to rather put the setting & retrieval of the unread state. maybe even put part of in into matrix-org/matrix-js-sdk? would be happy about any hint :)
I probably wouldn't put it into the js-sdk
but you could either create a new file for this or put it into an existing one (e.g. Unread.ts
)
d555a9d
to
8c5a8fe
Compare
thanks a lot for the feedback! :)
|
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.
Two more tiny things 😀
@SimonBrandner regarding an icon: can I just add any license compatible one or would a design team potentially become unhappy? :D |
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
Regarding the icon: I think you can use any icon that fits the license. Though it's quite probable the design team will suggest their own in the end
@alangecker what's the status of this? It's flagged as WIP and has a bit of a confusing history to it. Is it ready for review by our teams? |
@turt2live I still didn't manage to find and integrate an icon, that's why it is still flagged as WIP. From the functionality I wouldn't do any more changes and would be happy about a review :) also if the design team can imagine deciding for an icon, I would be pleased! :) |
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.
I'm concerned more generally about the MSC itself as this doesn't give a reliable count for the user to rely upon, so they end up trying to discern the difference between manually marked unread, unread, and mentioned.
I'll copy these comments to the MSC, but overall I don't feel this is a problem that account data should be solving.
@@ -76,6 +87,12 @@ export class RoomNotificationState extends NotificationState implements IDestroy | |||
} | |||
}; | |||
|
|||
private handleRoomAccountDataUpdate = (ev: MatrixEvent) => { |
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.
this doesn't feel like the right type for account data: there's a ton of missing fields on account data events.
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.
With every occurrence in matrix-react-sdk
there is .on("Room.accountData")
used along with MatrixEvent
as the type for its first argument.
What could be the alternative type? :)
seems like there is support for going a different path for that feature (matrix-org/matrix-spec-proposals#2867 (review)), so I won't continue here for now. I'm still motivated working on an implementation for this feature, but would need others to lead the spec discussions! :) |
@alangecker thank you for this PR! We have included it in SchildiChat-web/desktop: SchildiChat#2 |
@SpiritCroc I was a bit sad to stop the development, wanted to wait for the spec discussions first, but it's very nice that it's being used now nevertheless! :) 🎉 I would be pleased about credits in changelogs, but I'm also totally fine without! ;) |
Signed-off-by: chandi <git@chandi.it>
Signed-off-by: chandi <git@chandi.it>
Signed-off-by: chandi <git@chandi.it>
Signed-off-by: chandi <git@chandi.it>
Signed-off-by: chandi <git@chandi.it>
From Google's material design icons: https://fonts.google.com/icons?selected=Material+Icons&icon.query=eye License: https://google.github.io/material-design-icons/ "We have made these icons available for you to incorporate them into your products under the Apache License Version 2.0. Feel free to remix and re-share these icons and documentation in your products. We'd love attribution in your app's about screen, but it's not required. The only thing we ask is that you not re-sell the icons themselves."
TypeError: Cannot read property 'getAccountData' of null at d (Rooms.ts:160) at e.removeUnreadMarker (TimelinePanel.tsx:884) at e.<anonymous> (TimelinePanel.tsx:1140) at ui (react-dom.production.min.js:131) at ps (react-dom.production.min.js:220) at wc (react-dom.production.min.js:259) at t.unstable_runWithPriority (scheduler.production.min.js:18) at jo (react-dom.production.min.js:122) at xc (react-dom.production.min.js:252) at pc (react-dom.production.min.js:243) when you have the panel for mentions open.
ToDo: Do this also if marked as unread on other device
578fec3
to
63f5ccb
Compare
63f5ccb
to
d0a33ad
Compare
since there is currently no development on the MSC, I thought about pushing this further :) things done
open questions
|
|
Signed-off-by: Tobias Büttner dev@spiritcroc.de What I know about the license of material design icons I've also written in the commit message of e5810fb. |
Signed-off-by: Quirin Götz codeworks@supercable.onl |
So the story on this is that it's in a bit of a questionable bit spec-wise. I think before we commit to maintenance of this feature we'd want to see a slightly more stable spec discussion first. For the time being, I'm going to close this because it's bitrotting beyond reasonable repair, but it would still count as an implementation against the MSC if needed (though there are plenty of other implementations on the MSC as well). The code would still be here for someone to pick up if needed down the line. Thanks for taking the time to look at it, and apologies for the long turnaround. |
implements matrix-org/matrix-spec-proposals#2867
strongly related, but not exactly the same element-hq/element-meta#347
already released within SchildiChat
Description
This PR...
com.famedly.marked_unread
com.famedly.marked_unread
when the room gets openedQuestions
since I'm still quite unfamiliar with the codebase, I got some questions about this PR:
should this react to the stable prefixm.marked_unread
already as well? or is the usual approach to add it as soon as the MSC is in a further state?Any suggestions for an fitting icon?This PR currently has no changelog labels, so will not be included in changelogs.
A reviewer can add one of:
T-Deprecation
,T-Enhancement
,T-Defect
,T-Task
to indicate what type of change this is, or addType: [enhancement/defect/task]
to the description and I'll add them for you.