-
-
Notifications
You must be signed in to change notification settings - Fork 828
Bring back custom tags, also badges on communities #2575
Conversation
so we can shove the custom tag buttons between them in the next commit
does it roll up the badges from the rooms? i don’t think we should put low priority there otherwise everyone will be wanting to add custom tags |
You mean if it aggregates the badges from the rooms it contains? No, but that would probably be a good idea ... |
/me resists the urge to hit approve without checking the diff |
I think this is a prerequisite i'm afraid, otherwise people are just going to miss msgs from the rooms. (We'll need it for communities too) |
I guess we wait for the badge stuff before reviewing this (and also whatever has angered the unit test gods today). |
src/stores/CustomRoomTagStore.js
Outdated
this._state = Object.assign({}, {tags: this._getUpdatedTags()}); | ||
|
||
this._roomListStoreToken = RoomListStore.addListener(() => { | ||
// UGLY: FluxStore doens't emit changes that |
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 wonder if there is a better way to create a store that derives it updates from another store like this?
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.
When I wanted to do this before I made a thing called an 'Observer' which is entirely a thing I made up, but served as a thing that doesn't store data itself but aggregates updates from other stores (ActiveRoomObserver.js).
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 went for an "ad-hoc" store in the end, based off GroupStore
, as a store seems to be closer to what I'm doing than an observer. 👍👎?
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.
yep, wfm 👍
ready for another look |
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 lgtm
src/stores/CustomRoomTagStore.js
Outdated
this._state = Object.assign({}, {tags: this._getUpdatedTags()}); | ||
|
||
this._roomListStoreToken = RoomListStore.addListener(() => { | ||
// UGLY: FluxStore doens't emit changes that |
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.
When I wanted to do this before I made a thing called an 'Observer' which is entirely a thing I made up, but served as a thing that doesn't store data itself but aggregates updates from other stores (ActiveRoomObserver.js).
element-hq/element-web#8060
Adds a toggle button in the LLP for every custom tag, which makes them appear in the the RoomList.
Questions?
Also, it has a max-height of 40vh so it won't take up more than 40% of the viewport. I couldn't make scrollbars only appear when the combination of the 3 components doesn't fit on the screen because gemini scrollbars uses position: absolute and thus can't be sized by it's content. Didn't want to port it for now...