-
Notifications
You must be signed in to change notification settings - Fork 176
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
Refactor content panels into an iframe #840
Merged
Merged
Changes from 101 commits
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
10495ec
Refactor content panel to iframe
codemist 6e2ba45
remove console log
codemist 7a473f4
test i18n string
codemist 84f9999
localize strings
codemist 6b66748
localise strings
codemist a2e1a59
click outside of popup
codemist 70fba62
add postmessage method for cross origin comms
codemist 52d5ad1
add positioning
codemist 81b5f21
restore positionPrompt func
codemist e96e59c
edit paramters for openloginprompt
codemist 3043993
debug screenupdate method
codemist 9947f47
add click event to allow btn
codemist 53012b3
styling popup panel
codemist f40d075
add allow link to panel
codemist 5e9bcfc
use postmessage to grab object id
codemist a79901d
remove overflow hide
codemist 4db8505
rebug email
codemist 478e613
fix email login bug
codemist d5ca6b2
localize emails trings
codemist ad4eb4a
dismiss popup
codemist c07e173
reposition iframe on resize
codemist de2a237
resize iframe height according to content
codemist c125976
resize and scroll reposition iframe
codemist e14401f
flip iframe on small device width
codemist c39642f
add relay href
codemist 3cc76d3
add right/left chevron
codemist 3cdab59
add mobile panel orientation
codemist 8beb37c
ui tweak
codemist 9da6a46
add reload on allow prompt
codemist e1cf345
remove commented out code
codemist 201b1fc
redesign buttons to new desktop component design
codemist 3877556
redesign checkbox
codemist 78d7ee5
redesign checkbox label
codemist f8c4802
adjust iframe heights
codemist 6208ebd
add innerhtml to textcontent
codemist fc0f748
Add origin specifity
codemist 752240e
remove console
codemist 18ff4cc
Add origin specifity
codemist 123432b
make variable names make more sense
codemist e50d9ee
checkbox add localstorage listener
codemist 5043efb
checkbox add localstorage listener
codemist bcbb8f3
add helpful comments
codemist 75ce8b8
add isTrusted on all eventlisteners
codemist 1ddf56a
remmove commented out code
codemist 36a5fcc
nit
codemist f25957b
z index smaller val
codemist 59e1fbd
remove todo comment
codemist 2617414
nit
codemist 44a0564
nit
codemist a8394ed
nit
codemist 00ded76
Refactor content panel to iframe
codemist d167b91
remove console log
codemist 0e80d3b
test i18n string
codemist cd3a362
localize strings
codemist 0f3d997
localise strings
codemist 43fbe67
click outside of popup
codemist d00f570
add postmessage method for cross origin comms
codemist 3ea4a3d
add positioning
codemist 71c6a4c
restore positionPrompt func
codemist a84bda9
edit paramters for openloginprompt
codemist df76c4c
debug screenupdate method
codemist bdf9ede
add click event to allow btn
codemist 8cfe164
styling popup panel
codemist 75dbf5d
add allow link to panel
codemist c1fae24
use postmessage to grab object id
codemist 9503ba9
remove overflow hide
codemist 4b365b6
rebug email
codemist 0a16393
fix email login bug
codemist c4bb69e
localize emails trings
codemist f378fe0
dismiss popup
codemist 7380fcc
reposition iframe on resize
codemist db97336
resize iframe height according to content
codemist fc57e91
resize and scroll reposition iframe
codemist 06bca44
flip iframe on small device width
codemist c0b0312
add relay href
codemist 662c829
add right/left chevron
codemist 5b69470
add mobile panel orientation
codemist 964d6d9
ui tweak
codemist 9d0526d
add reload on allow prompt
codemist c1eadd1
remove commented out code
codemist 6cab065
redesign buttons to new desktop component design
codemist 2b141da
redesign checkbox
codemist b1824bd
redesign checkbox label
codemist 20c6d70
adjust iframe heights
codemist e3f0d46
add innerhtml to textcontent
codemist 2c8a5ae
Add origin specifity
codemist c6fc27d
remove console
codemist c5e0355
Add origin specifity
codemist 218c23d
make variable names make more sense
codemist d73fd97
checkbox add localstorage listener
codemist 44a944f
checkbox add localstorage listener
codemist 811547e
add helpful comments
codemist 9405235
add isTrusted on all eventlisteners
codemist 279c575
remmove commented out code
codemist 3da9492
nit
codemist 84419e0
z index smaller val
codemist a039288
remove todo comment
codemist d809e84
nit
codemist 2d9a990
nit
codemist 49eedf9
nit
codemist c1ad9dc
fix merge conflict
codemist 6a79742
add mutationobserver change
codemist 40ed81e
nit - commeted out code
codemist ce7db08
remove unused target
codemist a94c1de
change FBC_IFRAME_HEIGHT to camelcase
codemist 97fad57
breakdown positioniframe into functions
codemist 80720a1
use switch case for socialaction
codemist 7d2e7d9
remove commented out code
codemist 0515b65
use searchparams
codemist 7a91563
refactor position iframe
codemist 39030d7
remove code smell desktoporientation
codemist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
|
||
body { | ||
--blue60: #0060df; | ||
--blue70: #003eaa; | ||
--primaryText: #15141A; | ||
--secondaryText: #5B5B66; | ||
--grey20: #ededf0; | ||
--light-gray: #F0F0F4; | ||
--white: #ffffff; | ||
--transition: all .15s cubic-bezier(.07,.95,0,1); | ||
--borders: 1px solid #ededf0; | ||
font-size: 13px; | ||
font-weight: 400; | ||
color: #15141A; | ||
font-family: "SF Pro Text", 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | ||
} | ||
|
||
/* Button Replacement */ | ||
.fbc-loginButton { | ||
background-size: contain; | ||
|
@@ -49,13 +66,7 @@ | |
position: absolute; | ||
z-index: 100; | ||
transition: opacity 0.2s ease-out; | ||
font-family: "SF Pro Text", 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important; | ||
--transition: all .15s cubic-bezier(.07,.95,0,1); | ||
--blue60: #0060df; | ||
--blue70: #003eaa; | ||
--blue80: #073072; | ||
--black: #000000; | ||
--white: #ffffff; | ||
--transition: all .15s cubic-bezier(.07,.95,0,1) | ||
} | ||
|
||
.fbc-badge.fbc-badge-disabled { | ||
|
@@ -125,99 +136,112 @@ | |
opacity: 1; | ||
} | ||
|
||
.fbc-badge-prompt { | ||
display: none; | ||
width: 345px; | ||
position: absolute; | ||
left: calc( 100% + 20px); | ||
top: 50%; | ||
transform: translateY(-50%); | ||
.fbc-container { | ||
overflow: hidden; | ||
} | ||
|
||
.fbc-wrapper{ | ||
position: fixed; | ||
height: 100%; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
width: 100%; | ||
z-index: 999999999999; | ||
background-color: rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
.fbc-wrapper iframe { | ||
color: var(--black); | ||
box-shadow: 0 5px 12px 0 rgba(0,0,0,0.2); | ||
border: 1px solid rgba(0,0,0,0.2); | ||
padding: 0 0 40px; | ||
background: var(--white); | ||
border-radius: 8px; | ||
line-height: 120%; | ||
} | ||
|
||
.fbc-badge-prompt:after { | ||
content: " "; | ||
.fbc-iframe-chevron { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: On Relay, I migrated away from the CSS triangle, and instead, used an inline SVG shape. |
||
width: 0; | ||
height: 0; | ||
border-top: 10px solid transparent; | ||
border-bottom: 10px solid transparent; | ||
border-right:10px solid rgb(255, 255, 255); | ||
position: absolute; | ||
left: -10px; | ||
top: 50%; | ||
margin-top: -10px; | ||
width: 0; | ||
height: 0; | ||
border-style: solid; | ||
border-width: 10px 10px 10px 0; | ||
border-color: transparent var(--white) transparent; | ||
left: 1px; | ||
z-index: 9999999; | ||
} | ||
|
||
.fbc-chevron-arrow-right { | ||
transform: rotate(180deg); | ||
left: -1px; | ||
} | ||
|
||
.fbc-badge-prompt-align-right .fbc-badge-prompt { | ||
.fbc-chevron-arrow-top { | ||
transform: rotate(90deg); | ||
top: -4px; | ||
} | ||
|
||
.fbc-badge-prompt-align-right iframe { | ||
left: auto; | ||
right: calc( 100% + 20px); | ||
} | ||
|
||
.fbc-badge-prompt-align-right .fbc-badge-prompt:after { | ||
.fbc-badge-prompt-align-right iframe { | ||
left: auto; | ||
right: -10px; | ||
border-width: 10px 0 10px 10px; | ||
} | ||
|
||
.fbc-badge-prompt-align-top .fbc-badge-prompt { | ||
.fbc-badge-prompt-align-top iframe { | ||
top: -7px; | ||
transform: none; | ||
} | ||
|
||
.fbc-badge-prompt-align-top .fbc-badge-prompt:after { | ||
.fbc-badge-prompt-align-top iframe:after { | ||
top: 16px; | ||
} | ||
|
||
.fbc-badge-prompt-align-bottom .fbc-badge-prompt { | ||
.fbc-badge-prompt-align-bottom iframe { | ||
top: auto; | ||
bottom: -20px; | ||
transform: none; | ||
} | ||
|
||
.fbc-badge-prompt-align-bottom .fbc-badge-prompt:after { | ||
.fbc-badge-prompt-align-bottom iframe:after { | ||
display: none; | ||
} | ||
|
||
.fbc-badge-prompt h1 { | ||
.fbc-badge-prompt h1, .fbc-title { | ||
all: unset; | ||
letter-spacing: -0.1px; | ||
font-family: "SF Pro Text", 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important; | ||
font-size: 13px; | ||
font-weight: 700; | ||
height: 40px; | ||
display: flex; | ||
width: 100%; | ||
margin: 0; | ||
padding: 0; | ||
line-height: 0; | ||
padding: 15px 0 20px 0; | ||
border-bottom: 1px solid var(--light-gray); | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
border-bottom: 1px solid #E9E9E9; | ||
background: white; | ||
color: var(--black); | ||
color: var(--primaryText); | ||
} | ||
|
||
.fbc-badge-prompt-contents { | ||
padding: 20px; | ||
background: var(--white); | ||
.fbc-badge-prompt p { | ||
line-height: 140%; | ||
} | ||
|
||
.fbc-badge-prompt p { | ||
all: unset; | ||
font-family: "SF Pro Text", 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important; | ||
display: block; | ||
padding: 0 0 20px; | ||
margin: 0; | ||
font-size: 13px; | ||
line-height: 17px; | ||
color: var(--black); | ||
.fbc-subtitle-login, .fbc-subtitle-email { | ||
color: var(--primaryText); | ||
font-weight: 500; | ||
} | ||
|
||
.fbc-badge-prompt p:first-of-type { | ||
font-weight: 600; | ||
.fbc-badge-prompt-contents { | ||
padding: 4px 8px; | ||
background: var(--white); | ||
} | ||
|
||
.fbc-badge-prompt form { | ||
|
@@ -227,58 +251,63 @@ | |
align-items: center; | ||
} | ||
|
||
.fbc-badge-prompt input { | ||
all: unset; | ||
margin: 0 5px 0 0; | ||
appearance: checkbox; | ||
-moz-appearance: checkbox; | ||
cursor: pointer; | ||
width: 13px; | ||
.fbc-badge-prompt-dontShowAgain-checkbox { | ||
gap: 8px; | ||
margin-bottom: 16px; | ||
} | ||
|
||
.fbc-badge-prompt input[type=checkbox] { | ||
-webkit-appearance: none; | ||
-moz-appearance: none; | ||
-o-appearance: none; | ||
appearance: none; | ||
margin: 0; | ||
background-color: var(--light-gray); | ||
border: 1px solid #8F8F9D; | ||
border-radius: 2px; | ||
height: 13px; | ||
width: 13px; | ||
line-height: 14px; | ||
display: inline-block; | ||
cursor: pointer; | ||
} | ||
|
||
.fbc-badge-prompt input[type=checkbox]:checked { | ||
appearance: checkbox; | ||
} | ||
|
||
.fbc-badge-prompt label { | ||
all: unset; | ||
font-family: "SF Pro Text", 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important; | ||
font-size: 12px; | ||
line-height: 16px; | ||
color: #0C0C0D; | ||
color: var(--secondaryText); | ||
margin: 0; | ||
font-weight: normal; | ||
cursor: pointer; | ||
line-height: 20px; | ||
} | ||
|
||
.fbc-badge-prompt-dontShowAgain-checkbox { | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
} | ||
|
||
.fbc-badge-prompt-buttons { | ||
position: absolute; | ||
bottom: 0.15px; | ||
height: 40px; | ||
width: 100%; | ||
z-index: 0; | ||
display: flex; | ||
gap: 8px; | ||
justify-content: end; | ||
} | ||
|
||
.fbc-badge-prompt-buttons button { | ||
font-family: "SF Pro Text", 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important; | ||
all: unset; | ||
display: inline-block; | ||
height: 40px; | ||
width: 50%; | ||
width: auto; | ||
padding: 8px 16px; | ||
border-radius: 4px; | ||
appearance: none; | ||
border: 0; | ||
letter-spacing: -0.1px; | ||
font-size: 13px; | ||
line-height: 17px; | ||
background-color: #F2F2F2; | ||
border-top: 1px solid #E9E9E9; | ||
font-weight: 500; | ||
color: var(--primaryText); | ||
background: var(--light-gray); | ||
transition: var(--transition); | ||
color: var(--black); | ||
cursor: pointer; | ||
text-align: center; | ||
} | ||
|
@@ -289,25 +318,8 @@ | |
|
||
.fbc-badge-prompt-buttons button:hover { | ||
background: #E9E9E9; | ||
color: var(--black); | ||
} | ||
|
||
.fbc-badge-prompt-buttons button:last-child { | ||
border-top: 1px solid var(--blue70); | ||
background: var(--blue60); | ||
color: var(--white); | ||
} | ||
|
||
.fbc-badge-prompt-buttons button:last-child:focus { | ||
border-top: 1px solid var(--blue80); | ||
} | ||
|
||
.fbc-badge-prompt-buttons button:last-child:hover { | ||
background: var(--blue70); | ||
color: var(--white); | ||
} | ||
|
||
|
||
/* Tooltip */ | ||
.fbc-badge-tooltip { | ||
display: none; | ||
|
@@ -337,13 +349,6 @@ | |
bottom: 25%; | ||
} | ||
|
||
/* .fbc-badge-prompt-align-right .fbc-badge-prompt { | ||
left: auto; | ||
right: calc( 100% + 20px); | ||
.is-hidden { | ||
display: none; | ||
} | ||
|
||
.fbc-badge-prompt-align-right .fbc-badge-prompt:after { | ||
left: auto; | ||
right: -10px; | ||
border-width: 10px 0 10px 10px; | ||
} */ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
polish (non-blocking): Can we make
rgba(0,0,0,0.2);
also a variable?