Skip to content

Change notification dot on Changes tab to a badge #4772

Closed

Description

@iAmWillShepherd

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>
)

Activity

  1. added this to the milestone on May 23, 2018
  2. j-f1 commented on May 23, 2018

    @j-f1
    Contributor

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

  3. iAmWillShepherd commented on May 23, 2018

    @iAmWillShepherd
    ContributorAuthor

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

  4. iAmWillShepherd commented on May 23, 2018

    @iAmWillShepherd
    ContributorAuthor

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

  5. added
    help wanted
    good first issue
    on May 27, 2018
  6. yongdamsh commented on May 29, 2018

    @yongdamsh
    Contributor

    @iAmWillShepherd Can I work on this?

  7. iAmWillShepherd commented on May 29, 2018

    @iAmWillShepherd
    ContributorAuthor

    @yongdamsh sure thing 👍

  8. added a commit that references this issue on Jun 12, 2018
  9. locked as resolved and limited conversation to collaborators on Aug 11, 2018
  10. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions