Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change notification dot on Changes tab to a badge #4772

Closed
iAmWillShepherd opened this issue May 23, 2018 · 5 comments
Closed

Change notification dot on Changes tab to a badge #4772

iAmWillShepherd opened this issue May 23, 2018 · 5 comments
Labels
enhancement good first issue Issues marked as ideal for a brand new contributor to start with help wanted Issues marked as ideal for external contributors
Projects
Milestone

Comments

@iAmWillShepherd
Copy link
Contributor

iAmWillShepherd commented May 23, 2018

Goal

Prevent confusion that could be caused by using the same UI element to notify users of two separate updates: new changes vs. new commits.

Background

This task was pulled from #4646.

Solution

  • Replace notification dot with a badge
  • The badge's content will be the number of files that have changed
  • Remove badge when there are no changes to be committed

Mockup

Before
before

After
screen shot 2018-05-23 at 3 01 37 pm

Help Wanted

If you're interested in taking on this task, please @mention me in a comment and I'll move this issue to taken and serve as your point of contact for getting it delivered.

What are we are looking?

  • Build a component, FilesChangedBadge, that
  • Accepts 1 prop, numFilesChanged, for the number that will be displayed
  • Replace the blue notification dot with FilesChangedBadge

Nice to haves ✨

  • Handle large numbers in the following way, to ensure we don't have to fiddle with formatting too much:
Condition What to render
x === 0 Nothing
x > 0 && x < 300 Badge with x
x >= 300 Badge with 300+
  • Styles to make the component look like the mockup

Where to start

The notification dot is located here (note that it is not a component):

return (
<TabBar selectedIndex={selectedTab} onTabClicked={this.onTabClicked}>
<span className="with-indicator">
<span>Changes</span>
{hasChanges ? (
<Octicon
className="indicator"
symbol={OcticonSymbol.primitiveDot}
/>
) : null}
</span>
<span>History</span>
</TabBar>
)

@j-f1
Copy link
Contributor

j-f1 commented May 23, 2018

How about making it white text on a blue bubble and putting a similar label on the history with “⬆️ X ⬇️ Y”?

@iAmWillShepherd
Copy link
Contributor Author

@j-f1 we already have a design for this. See the mockup ☝️ .

@iAmWillShepherd
Copy link
Contributor Author

Also, checkout the issue I pulled this out of. There you will see what the notification will look like.

@iAmWillShepherd iAmWillShepherd added the help wanted Issues marked as ideal for external contributors label May 27, 2018
@iAmWillShepherd iAmWillShepherd added this to Available in Community via automation May 27, 2018
@iAmWillShepherd iAmWillShepherd added the good first issue Issues marked as ideal for a brand new contributor to start with label May 28, 2018
@yongdamsh
Copy link
Contributor

yongdamsh commented May 29, 2018

@iAmWillShepherd Can I work on this?

@iAmWillShepherd
Copy link
Contributor Author

@yongdamsh sure thing 👍

@iAmWillShepherd iAmWillShepherd moved this from Available to In progress in Community May 29, 2018
yongdamsh added a commit to yongdamsh/desktop that referenced this issue Jun 5, 2018
Community automation moved this from In progress to Done Jun 12, 2018
iAmWillShepherd referenced this issue Jun 12, 2018
Display a badge indicating the number of changed files
@lock lock bot locked as resolved and limited conversation to collaborators Aug 11, 2018
@desktop desktop unlocked this conversation Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Issues marked as ideal for a brand new contributor to start with help wanted Issues marked as ideal for external contributors
Projects
Development

No branches or pull requests

4 participants