In https://www.figma.com/file/a1nkbWgbgjRlrOY9LVurTz/Comm-%2F-Desktop-app?node-id=1272%3A88750 we're introducing a new navigation menu which will be rendered conditionally instead of AppSwitcher. Setting document title should always happen and that requires moving this functionality back (D2881) to the App.
Details
Mark a thread as unread and check if the number in title was increased. Mark as unread and check if it decreased.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
web/app.react.js | ||
---|---|---|
220 ↗ | (On Diff #10079) | Might be for a different diff, but do you think this would be good as a hook? I can imagine there are going to be more use cases other than unread that we would want to update the title for in the future. |
web/app.react.js | ||
---|---|---|
220 ↗ | (On Diff #10079) | We would want to make sure that we only have one effect that sets document.title, so I can't imagine this is something that would be reusable. Exporting it to a separate file as a named hook could be good for encapsulation, but right now it's so simple that I don't think it matters. Extra indirection generally come with a readability cost |
web/app.react.js | ||
---|---|---|
220 ↗ | (On Diff #10079) | It might be a good idea to extract it somewhere in the future, when the title becomes more complicated and would require more data, but currently keeping it here is good enough. |