Skip to content
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 111 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
10495ec
Refactor content panel to iframe
codemist May 13, 2022
6e2ba45
remove console log
codemist May 13, 2022
7a473f4
test i18n string
codemist May 18, 2022
84f9999
localize strings
codemist May 18, 2022
6b66748
localise strings
codemist May 18, 2022
a2e1a59
click outside of popup
codemist May 20, 2022
70fba62
add postmessage method for cross origin comms
codemist May 20, 2022
52d5ad1
add positioning
codemist May 20, 2022
81b5f21
restore positionPrompt func
codemist May 20, 2022
e96e59c
edit paramters for openloginprompt
codemist May 20, 2022
3043993
debug screenupdate method
codemist May 20, 2022
9947f47
add click event to allow btn
codemist May 24, 2022
53012b3
styling popup panel
codemist May 24, 2022
f40d075
add allow link to panel
codemist May 24, 2022
5e9bcfc
use postmessage to grab object id
codemist May 24, 2022
a79901d
remove overflow hide
codemist May 26, 2022
4db8505
rebug email
codemist May 26, 2022
478e613
fix email login bug
codemist May 26, 2022
d5ca6b2
localize emails trings
codemist May 26, 2022
ad4eb4a
dismiss popup
codemist May 26, 2022
c07e173
reposition iframe on resize
codemist May 27, 2022
de2a237
resize iframe height according to content
codemist May 27, 2022
c125976
resize and scroll reposition iframe
codemist May 27, 2022
e14401f
flip iframe on small device width
codemist May 27, 2022
c39642f
add relay href
codemist May 27, 2022
3cc76d3
add right/left chevron
codemist May 31, 2022
3cdab59
add mobile panel orientation
codemist May 31, 2022
8beb37c
ui tweak
codemist May 31, 2022
9da6a46
add reload on allow prompt
codemist Jun 6, 2022
e1cf345
remove commented out code
codemist Jun 23, 2022
201b1fc
redesign buttons to new desktop component design
codemist Jun 23, 2022
3877556
redesign checkbox
codemist Jun 23, 2022
78d7ee5
redesign checkbox label
codemist Jun 23, 2022
f8c4802
adjust iframe heights
codemist Jun 23, 2022
6208ebd
add innerhtml to textcontent
codemist Jun 24, 2022
fc0f748
Add origin specifity
codemist Jun 24, 2022
752240e
remove console
codemist Jun 24, 2022
18ff4cc
Add origin specifity
codemist Jun 24, 2022
123432b
make variable names make more sense
codemist Jun 24, 2022
e50d9ee
checkbox add localstorage listener
codemist Jun 28, 2022
5043efb
checkbox add localstorage listener
codemist Jun 28, 2022
bcbb8f3
add helpful comments
codemist Jun 28, 2022
75ce8b8
add isTrusted on all eventlisteners
codemist Jun 28, 2022
1ddf56a
remmove commented out code
codemist Jun 28, 2022
36a5fcc
nit
codemist Jun 28, 2022
f25957b
z index smaller val
codemist Jun 28, 2022
59e1fbd
remove todo comment
codemist Jun 28, 2022
2617414
nit
codemist Jun 28, 2022
44a0564
nit
codemist Jun 28, 2022
a8394ed
nit
codemist Jun 28, 2022
00ded76
Refactor content panel to iframe
codemist May 13, 2022
d167b91
remove console log
codemist May 13, 2022
0e80d3b
test i18n string
codemist May 18, 2022
cd3a362
localize strings
codemist May 18, 2022
0f3d997
localise strings
codemist May 18, 2022
43fbe67
click outside of popup
codemist May 20, 2022
d00f570
add postmessage method for cross origin comms
codemist May 20, 2022
3ea4a3d
add positioning
codemist May 20, 2022
71c6a4c
restore positionPrompt func
codemist May 20, 2022
a84bda9
edit paramters for openloginprompt
codemist May 20, 2022
df76c4c
debug screenupdate method
codemist May 20, 2022
bdf9ede
add click event to allow btn
codemist May 24, 2022
8cfe164
styling popup panel
codemist May 24, 2022
75dbf5d
add allow link to panel
codemist May 24, 2022
c1fae24
use postmessage to grab object id
codemist May 24, 2022
9503ba9
remove overflow hide
codemist May 26, 2022
4b365b6
rebug email
codemist May 26, 2022
0a16393
fix email login bug
codemist May 26, 2022
c4bb69e
localize emails trings
codemist May 26, 2022
f378fe0
dismiss popup
codemist May 26, 2022
7380fcc
reposition iframe on resize
codemist May 27, 2022
db97336
resize iframe height according to content
codemist May 27, 2022
fc57e91
resize and scroll reposition iframe
codemist May 27, 2022
06bca44
flip iframe on small device width
codemist May 27, 2022
c0b0312
add relay href
codemist May 27, 2022
662c829
add right/left chevron
codemist May 31, 2022
5b69470
add mobile panel orientation
codemist May 31, 2022
964d6d9
ui tweak
codemist May 31, 2022
9d0526d
add reload on allow prompt
codemist Jun 6, 2022
c1eadd1
remove commented out code
codemist Jun 23, 2022
6cab065
redesign buttons to new desktop component design
codemist Jun 23, 2022
2b141da
redesign checkbox
codemist Jun 23, 2022
b1824bd
redesign checkbox label
codemist Jun 23, 2022
20c6d70
adjust iframe heights
codemist Jun 23, 2022
e3f0d46
add innerhtml to textcontent
codemist Jun 24, 2022
2c8a5ae
Add origin specifity
codemist Jun 24, 2022
c6fc27d
remove console
codemist Jun 24, 2022
c5e0355
Add origin specifity
codemist Jun 24, 2022
218c23d
make variable names make more sense
codemist Jun 24, 2022
d73fd97
checkbox add localstorage listener
codemist Jun 28, 2022
44a944f
checkbox add localstorage listener
codemist Jun 28, 2022
811547e
add helpful comments
codemist Jun 28, 2022
9405235
add isTrusted on all eventlisteners
codemist Jun 28, 2022
279c575
remmove commented out code
codemist Jun 28, 2022
3da9492
nit
codemist Jun 28, 2022
84419e0
z index smaller val
codemist Jun 28, 2022
a039288
remove todo comment
codemist Jun 28, 2022
d809e84
nit
codemist Jun 28, 2022
2d9a990
nit
codemist Jun 28, 2022
49eedf9
nit
codemist Jun 28, 2022
c1ad9dc
fix merge conflict
codemist Aug 3, 2022
6a79742
add mutationobserver change
codemist Aug 31, 2022
40ed81e
nit - commeted out code
codemist Aug 31, 2022
ce7db08
remove unused target
codemist Sep 1, 2022
a94c1de
change FBC_IFRAME_HEIGHT to camelcase
codemist Sep 1, 2022
97fad57
breakdown positioniframe into functions
codemist Sep 2, 2022
80720a1
use switch case for socialaction
codemist Sep 2, 2022
7d2e7d9
remove commented out code
codemist Sep 2, 2022
0515b65
use searchparams
codemist Sep 2, 2022
7a91563
refactor position iframe
codemist Sep 2, 2022
39030d7
remove code smell desktoporientation
codemist Sep 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 47 additions & 13 deletions src/content_script.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@


body {
--blue60: #0060df;
--blue70: #003eaa;
--primaryText: #0c0c0d;
--secondaryText: #737373;
--grey20: #ededf0;
--transition: all .15s cubic-bezier(.07,.95,0,1);
--borders: 1px solid #ededf0;
font-family: "SF Pro Text", 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
overflow: hidden;
}

/* Button Replacement */
.fbc-loginButton {
background-size: contain;
Expand Down Expand Up @@ -47,7 +61,7 @@
.fbc-badge {
all: initial;
position: absolute;
z-index: 100;
z-index: 999999999999999;
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: Is this z-index necessary, or just an artifact from Relay's CSS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just reverted it back to its previous value and I didn't see a difference, it might've been just an artifact like you said.

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);
Expand Down Expand Up @@ -125,20 +139,35 @@
opacity: 1;
}

.fbc-badge-prompt {
display: none;
width: 345px;
.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);
/* animation: 0.2s ease forwards; */
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Remove commented code

Suggested change
/* animation: 0.2s ease forwards; */

}

.fbc-wrapper iframe {
/* position: absolute; */

/* width: 345px;
position: absolute;
left: calc( 100% + 20px);
top: 50%;
transform: translateY(-50%);
transform: translateY(-50%); */
color: var(--black);
box-shadow: 0 5px 12px 0 rgba(0,0,0,0.2);
Copy link
Collaborator

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?

border: 1px solid rgba(0,0,0,0.2);
padding: 0 0 40px;
background: rgb(235, 235, 235);
}

.fbc-badge-prompt:after {
iframe::after {
content: " ";
position: absolute;
left: -10px;
Expand All @@ -151,33 +180,33 @@
border-color: transparent var(--white) transparent;
}

.fbc-badge-prompt-align-right .fbc-badge-prompt {
.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;
}

Expand Down Expand Up @@ -257,11 +286,12 @@
}

.fbc-badge-prompt-buttons {
position: absolute;
bottom: 0.15px;
height: 40px;
width: 100%;
z-index: 0;
display: flex;
gap: 16px;
}

.fbc-badge-prompt-buttons button {
Expand Down Expand Up @@ -347,3 +377,7 @@
right: -10px;
border-width: 10px 0 10px 10px;
} */

.is-hidden {
display: none;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

praise: Nice utility class usage!

Loading