Skip to content
Snippets Groups Projects

Adds global CTA banner

Merged Administrator requested to merge ar/global-cta-context-wip into main

Created by: artemruts

Description

We need to show two CTA banners to the users that have a GitHub code host connection but it's missing the repo scope. This prevents users to access their private repositories.

These changes add a global dismissible banner for user that is:

  • on .com
  • enrolled in private code
  • is missing "private" scope for GitHub

React context was used here since I had "communicate" with two banners that are in a very different places in the render tree. I felt that passing props would create more problems and make the code less maintainable.


Note: this is a temporarily solution. CTA banners will be removed once the Core app team confirms that all of the users with GitHub code host connection have the repo scope.


Demo

Remove

https://user-images.githubusercontent.com/1319181/121422845-9e3e4080-c93d-11eb-8835-4eeddf21ebff.mov

Update

https://user-images.githubusercontent.com/1319181/121422874-a6967b80-c93d-11eb-861a-a83c3ccb3dd8.mov

Dissmiss

https://user-images.githubusercontent.com/1319181/121422916-b44c0100-c93d-11eb-8ac6-4dacc76de098.mov

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading