mattermost / mattermost/mattermost-plugin-github

Improved refresh of RHS

Open
#132 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Difficulty/3:Hard Hacktoberfest Help Wanted Tech/ReactJS Type/Enhancement Up For Grabs
Dominant language
Go
Stars
179
Forks
180
Avg merge
1d 16h
Merged PRs (30d)
13

Description

The [GitHub plugin](https://github.com/mattermost/mattermost-plugin-github) 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:

![image-20190926-140421](https://user-images.githubusercontent.com/936315/65822757-6ea5de00-e217-11e9-9c55-fb861fd99621.png)

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](https://community.mattermost.com/core/channels/tickets) 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](https://community.mattermost.com/core/channels/developers).

New contributors please see our [Developer's Guide](https://developers.mattermost.com/contribute/getting-started/).

JIRA: https://mattermost.atlassian.net/browse/MM-18888

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the GitHub plugin RHS refresh flow and how browser focus is represented, including the plugin API or Redux selector options described in the issue. Review PR #138 for the dimmed-item work, then verify that regaining focus refreshes an open RHS and clicking notifications dims them.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, go
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.