mattermost-plugin-github
mattermost-plugin-github copied to clipboard
Improved refresh of RHS
The GitHub plugin RHS lists notifications, pull requests, assigned issues and review requests. It currently refreshes on demand, or whenever the GitHub plugin happens to receive an update that forces the client to fetch the latest results.
At this time, not every update is proxied to the GitHub plugin and thus some items that might be expected to disappear instantly – e.g. read notifications, or finishes reviews – stay in the interface longer than might be expected.
Let's introduce improved refresh semantics:
- keep track of when the browser gains/loses focus, perhaps by extending the plugin API to do this, or if we already track this in Redux, surfacing a selector to expose this to the plugin
- if the RHS is open, and the browser regains focus, trigger an automatic update on the assumption the user came back to the Mattermost application and wants new results.
- ~~some items may disappear when the update occurs, but this might be jarring in the user interface: instead, keep these in memory within the component, and render any item not found in the canonical dataset in a dimmed/greyed out fashion~~ (This is getting worked on in https://github.com/mattermost/mattermost-plugin-github/pull/138)
For notifications specifically let's also automatically dim/grey out items when clicked, since it's expected that these items will be marked as unread when the link is clicked, and the user might just be opening in new tabs without leaving Mattermost.
The net results of this might look like:

and it will now be easier for the enduser to click through their TODO list and know exactly where to pick up when they come back.
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide.
JIRA: https://mattermost.atlassian.net/browse/MM-18888
I have added point 3 (keep deleted item) in my code for #131 :sweat_smile:
@hanzei Do you want I move code inside other PR and affect me this issue, or I don't touch the code and you move point 3 of this issue to #131?
@manland I not sure what you mean. Surely you can just work one item 3 if this is what you are asking.
@hanzei I'm asking if I need to open an other PR with point 3, or if I can just let the code in the PR #138 ;)
You can just leave the code in #138 :+1: