This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web: add popover and alert for browser extension (#14256)
Display an alert on first render of a repo page after the user has seen 3 hovers. Add a popover when the user first clicks on 'View on [code host]'.
- Loading branch information
Showing
59 changed files
with
2,251 additions
and
629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$popover-font-size: $font-size-base; | ||
$popover-arrow-outer-color: var(--border-color); | ||
$popover-arrow-color: var(--body-bg); | ||
$popover-max-width: auto; | ||
|
||
@import 'bootstrap/scss/popover'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import React from 'react' | ||
import renderer from 'react-test-renderer' | ||
import { LinkOrButton } from './LinkOrButton' | ||
import { ButtonLink } from './LinkOrButton' | ||
|
||
describe('LinkOrButton', () => { | ||
test('render a link when "to" is set', () => { | ||
const component = renderer.create(<LinkOrButton to="http://example.com">foo</LinkOrButton>) | ||
const component = renderer.create(<ButtonLink to="http://example.com">foo</ButtonLink>) | ||
expect(component.toJSON()).toMatchSnapshot() | ||
}) | ||
|
||
test('render a button when "to" is undefined', () => { | ||
const component = renderer.create(<LinkOrButton to={undefined}>foo</LinkOrButton>) | ||
const component = renderer.create(<ButtonLink to={undefined}>foo</ButtonLink>) | ||
expect(component.toJSON()).toMatchSnapshot() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@import '~@reach/dialog/styles.css'; | ||
|
||
.modal-body { | ||
background-color: var(--body-bg); | ||
padding: 1rem; | ||
width: 32rem; | ||
max-width: 100vw; | ||
|
||
&--centered { | ||
transform: translate(-50%, -50%); | ||
position: absolute; | ||
top: 50%; | ||
margin: 0; | ||
left: 50%; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.