Skip to content

Adds new component for displaying banner notifications (NDDB) - #4794

Merged
shiftkey merged 20 commits into
masterfrom
b-b-b-banner
Jun 11, 2018
Merged

shiftkey merged 20 commits into
masterfrom
b-b-b-banner

Conversation

@iAmWillShepherd

@iAmWillShepherd iAmWillShepherd commented May 27, 2018 •

Copy link
Copy Markdown
Contributor

Fixes #4768

@donokuda and I paired on this while prepping a prototype for user interviews. Note that the CTA buttons will be wired up in separate PRs as that work may require other components to be refactored.

At the moment, I'm unsure if we should pass a ref or the remote.name and branch.name. Since this component is not actually being used at the moment, I just used ref and passed the string origin/master to produce the screenshot below.
☝️ Just passed the branch instead.

According to the design, the Compare button should be the primary button, but the order of the buttons differ from the design due to how the ButtonGroup component works. @desktop/design does that mean the mockup is incorrect?

This PR now adds a banner notification without the CTA buttons. (see comment for more details).

Before
before

After

Todo:

  • Add a blurb of the form "Your branch is x commits behind ref"
  • Add Compare button (primary)
  • Add Merge button
  • Add an x octicon for dismissing
  • Refine styles

iAmWillShepherd and others added 9 commits May 27, 2018 12:06
I need this for the banner and don't want to duplicate styles over

Co-Authored-By: Don Okuda <[email protected]>
Co-Authored-By: Don Okuda <[email protected]>
Co-Authored-By: Don Okuda <[email protected]>
Co-Authored-By: Don Okuda <[email protected]>
Co-Authored-By: Don Okuda <[email protected]>
@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

I removed the refine styles item from the task list because that work can be tackled in a separate PR.

William Shepherd added 2 commits June 4, 2018 22:12

interface INewCommitsBannerProps {
/**
* The number of commits behind `branch`

This comment was marked as spam.

This comment was marked as spam.

/**
* The base branch that is ahead
*/
readonly branch: Branch

This comment was marked as spam.

This comment was marked as spam.

@iAmWillShepherd iAmWillShepherd added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jun 4, 2018
@shiftkey

shiftkey commented Jun 6, 2018

Copy link
Copy Markdown
Member

@iAmWillShepherd

According to the design, the Compare button should be the primary button, but the order of the buttons differ from the design due to how the ButtonGroup component works.

ButtonGroup was designed for use in dialogs, and that order rule is there so that consumers of it don't need to worry about the platform differences between macOS and Windows. Maybe that's not the right component to use here?

@iAmWillShepherd

iAmWillShepherd commented Jun 7, 2018 •

Copy link
Copy Markdown
Contributor Author

@shiftkey, I've spoken with @desktop/design about removing the buttons from the banner (at least for now) so that we can get this merged into master by next week.

I'm going to remove the button group for now, and will add each button one-by-one in separate PRs (#4808 and #4809 are tracking this work). We will be coming up with a small copy change and updating how this component looks (see comment for context), so I'm going to remove the ready-for-review label until those changes are in.

We intend to keep this behind a feature-flag, so this shouldn't cause any churn for our users, so this is really just a way to get this work into master sooner.

@iAmWillShepherd iAmWillShepherd removed the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jun 7, 2018
@iAmWillShepherd iAmWillShepherd added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jun 7, 2018
}

/**
* Banner used to notify user that there branch is _commitsBehind_

This comment was marked as spam.


interface INewCommitsBannerProps {
/**
* The number of commits behind `baseBranch`

This comment was marked as spam.

@shiftkey shiftkey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of minor things to clean up

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

💯

@shiftkey
shiftkey merged commit 0226f89 into master Jun 11, 2018
@shiftkey
shiftkey deleted the b-b-b-banner branch June 11, 2018 22:16
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 10, 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

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants