From 1ace723c3e9e7843682f45a5aff415705890348c Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 9 Sep 2020 19:21:27 -0500 Subject: [PATCH 01/14] Hovercard: add react-popper --- package.json | 2 ++ yarn.lock | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/package.json b/package.json index e79c4356c4..1c160f1f3b 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "@babel/preset-react": "^7.0.0", "@babel/runtime": "^7.3.4", "@clusterws/cws": "^0.16.0", + "@popperjs/core": "^2.4.4", "array-includes": "^3.0.3", "autoprefixer": "^9.5.1", "axios": "^0.19.0", @@ -114,6 +115,7 @@ "react-motion": "^0.5.2", "react-notification": "^6.8.4", "react-overlays": "^0.8.3", + "react-popper": "^2.2.3", "react-redux": "^6.0.1", "react-redux-loading-bar": "^4.5.0", "react-router-dom": "^4.1.1", diff --git a/yarn.lock b/yarn.lock index 561257434e..9c95574c04 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1482,6 +1482,11 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@popperjs/core@^2.4.4": + version "2.4.4" + resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.4.4.tgz#11d5db19bd178936ec89cd84519c4de439574398" + integrity sha512-1oO6+dN5kdIA3sKPZhRGJTfGVP4SWV6KqlMOwry4J3HfyD68sl/3KmG7DeYUzvN+RbhXDnv/D8vNNB8168tAMg== + "@sinonjs/commons@^1.7.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.0.tgz#c8d68821a854c555bba172f3b06959a0039b236d" @@ -9488,6 +9493,11 @@ react-fast-compare@^2.0.4: resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9" integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw== +react-fast-compare@^3.0.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb" + integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== + react-helmet@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.0.0.tgz#fcb93ebaca3ba562a686eb2f1f9d46093d83b5f8" @@ -9615,6 +9625,14 @@ react-overlays@^0.8.3: react-transition-group "^2.2.0" warning "^3.0.0" +react-popper@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-2.2.3.tgz#33d425fa6975d4bd54d9acd64897a89d904b9d97" + integrity sha512-mOEiMNT1249js0jJvkrOjyHsGvqcJd3aGW/agkiMoZk3bZ1fXN1wQszIQSjHIai48fE67+zwF8Cs+C4fWqlfjw== + dependencies: + react-fast-compare "^3.0.1" + warning "^4.0.2" + react-redux-loading-bar@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/react-redux-loading-bar/-/react-redux-loading-bar-4.5.0.tgz#96538d0ba041463d810e213fb54eadbce9628266" @@ -11874,6 +11892,13 @@ warning@^4.0.1: dependencies: loose-envify "^1.0.0" +warning@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" + integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== + dependencies: + loose-envify "^1.0.0" + watchpack@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" From 0c4eae5f10656738dd448f8947b44df6d70e0ca6 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 10 Sep 2020 19:09:27 -0500 Subject: [PATCH 02/14] Hovercard: basic Redux+Popper prototype --- app/soapbox/actions/profile_hover_card.js | Bin 0 -> 199 bytes app/soapbox/components/profile_hover_card.js | Bin 0 -> 3105 bytes app/soapbox/components/status.js | Bin 18430 -> 18292 bytes app/soapbox/containers/status_container.js | Bin 6306 -> 6477 bytes app/soapbox/features/ui/index.js | Bin 22169 -> 22270 bytes app/soapbox/reducers/index.js | Bin 2576 -> 2653 bytes app/soapbox/reducers/profile_hover_card.js | Bin 0 -> 422 bytes app/styles/components/profile_hover_card.scss | 9 +++------ 8 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 app/soapbox/actions/profile_hover_card.js create mode 100644 app/soapbox/components/profile_hover_card.js create mode 100644 app/soapbox/reducers/profile_hover_card.js diff --git a/app/soapbox/actions/profile_hover_card.js b/app/soapbox/actions/profile_hover_card.js new file mode 100644 index 0000000000000000000000000000000000000000..7014858aee46f4eec60d6323a470090efccb6a3d GIT binary patch literal 199 zcmYeTD9A4=QAp0uD=tw82=aIH^l^>%@DFnhig$Jla*6j3aP?ELRZzzvrEbl|l?pK; ztu!yWBr`uxA-^CsFQ6ztEi)(8Bfl)Q$T_hnMWZM+O-CUyIXS;Huf#J&Q=ytmL7^zM kq_ijx%v4Y)sVqpf!sP-TplXo%GzbH34v1T8%~i_<02skNqW}N^ literal 0 HcmV?d00001 diff --git a/app/soapbox/components/profile_hover_card.js b/app/soapbox/components/profile_hover_card.js new file mode 100644 index 0000000000000000000000000000000000000000..c6319d38b9ee10fb31a5550251d4fb2dc12e5500 GIT binary patch literal 3105 zcmbtWO>g5i5WVMDOfQiPSaQ!v>>}Cjb`3N|knEm8AO zz}_TsIP>Psn;}`<3aR0dlC_>f51pc)tBRT*{Cv_xQ`kc#MGc8GM#=RBb7vl;Xus`R zs{D3~|Cu%mgN=3gL^(PX(z^VUsg~&V_Rwo4Y1zGv&(-87{fp|`^;&d|j@C+$b|v0s z%KJQs#hM=&XxV5!g)c(ZL~B~!Q>Dn}D2t4t(GYG~*PSLSPLFf4DQ7HfXC}v^6u&Df zA4o&Fry(G$DAApyYSyvYS|DW&Z8ZL&dC?mCA^h!HGtu02T8rjmUa$~&qFC7@gQFgp zx-DzgO!4DhlvEPr{e-+uGp=UDQ9EMrj+980D|Sd@1bt<;hhS??l=_F%Q2=(KF$;rH z4;95~KT=K%Vzp(hI>F%!I4VytLb2t=FIvHEpBo)jd z^#n{{zJUG$fKv@NN3;92977Lwy2@cboX5ndWq! z*s3HjTOgL;HWuguuIo_D;C{5=LqvB6VSJJ~^0REx=LDNiiYA#t!W8Pz{=7`y&&iwk zq{5#M`QXlnv?N8vH=dsBi#^g#-|T#GHNx(y7^h#wE0v#!EKL!5cx8%V>%l%2!daJL zQq0XL3Uk926Tq1~I~9E9w8rL|f}+}q#jm_zgfPa^rsLcwAsqJ1EDa1}2tL6eC?<391e^!e;HS* z$5QM#Rk*LUWH|M3=Ik90uHI>6X9@?JaBfT+|K=l4z{}L=;iO`BOrYN$iejs4eice# zRFEc((6pen_`xbh%VYwm@KEtea4!C%<=qa@fsYl%BS-Vk$R=19s~y(EiqfM>(Idc3 z$zCB2*m)m6Rhr-(WV$G`Ld?7ndpNV6WxltPt5KKjk$`I6ANR`Mk&GLb>)g?}hd$5q zf%dSxurN=6o&ix5*by|zI3AEx-&t3HmTn_o3Bjkh zB6 Ub;taj?2R#4cr~ZTStA+$1BlolB>(^b literal 0 HcmV?d00001 diff --git a/app/soapbox/components/status.js b/app/soapbox/components/status.js index 8acb4e7f5770654e19021caa66595bb9a0b654b0..d0d182b7d2fb4ad8998ef8b413670691b1880c93 100644 GIT binary patch delta 211 zcmey@&-kT}al=FA&2B789D@0I!5R7G0Y&*~nK`M>iA5=sFK~-(&ftj_j!e$aD=tx} zR=`lAqflIuSW;T7P^)08P?C{ZtXEK!Ur=n#r2qsNsx@FLKsNa0r=;pkUZ^ZR+25IU z^IQ4fj2y+OC1C3(?^l%I02%~Vw)uu)vgGD0YZ+FFqSQ3oYOonFl{u+FscE&FTOHz< KHZO3FV*vo4!cM;c delta 330 zcmey;$M~vN0^PI5Q~+s6fG1p(G=-Sg*Jwu_SeKg|!Cj=A90)OhF0?Sk2A!{Q`)>_zaNB_++5c&D)tLiYO^4><1;`?>0008pA=>}| delta 16 XcmcaBGC^d66Z_^$_61Cn^||x_G<5}D diff --git a/app/soapbox/reducers/profile_hover_card.js b/app/soapbox/reducers/profile_hover_card.js new file mode 100644 index 0000000000000000000000000000000000000000..9071426569cb759089677c47e6d2973e2f7b349a GIT binary patch literal 422 zcmZ{g!D_=W5Jd0(ioL~wkla&xD5*;fZ5>?bRcvI52yDqnt2QP0-z!^ks1H4Ac4zjD zRM#6zaD!7_y_By7J64}X%??lXGpkO;I}9ML>0spy_Gfe5Atz8BS_=jg Date: Thu, 10 Sep 2020 20:18:04 -0500 Subject: [PATCH 03/14] Hovercard: mouseout clears the card --- app/soapbox/actions/profile_hover_card.js | Bin 199 -> 364 bytes app/soapbox/components/status.js | Bin 18292 -> 18364 bytes app/soapbox/containers/status_container.js | Bin 6477 -> 6585 bytes .../status/components/detailed_status.js | Bin 7883 -> 7898 bytes app/soapbox/reducers/profile_hover_card.js | Bin 422 -> 513 bytes app/styles/components/profile_hover_card.scss | 1 - 6 files changed, 1 deletion(-) diff --git a/app/soapbox/actions/profile_hover_card.js b/app/soapbox/actions/profile_hover_card.js index 7014858aee46f4eec60d6323a470090efccb6a3d..83b81d984267790279b916f72daea01588501a73 100644 GIT binary patch delta 103 zcmX@k_=ahM(*y-YXCGI`AO%|m^?)FMH%}kecn|+D*PwW3#~_z@u-ruZ4t1{7ih}&2 z5{0zVyyTM1{5*x^oYcgkfTH}g%$!t@{Ib*{=ft8EjfrJCd|*8~TnY-c)?Bq*0MsZU AP5=M^ delta 9 QcmaFEbewU5)5Nw`02KHHB>(^b diff --git a/app/soapbox/components/status.js b/app/soapbox/components/status.js index d0d182b7d2fb4ad8998ef8b413670691b1880c93..e81ed9ccbec3cdf6c3a056af4116ab3aa516b44b 100644 GIT binary patch delta 105 zcmey;$GE4TaRVn0t4DrWYSCs+o&;eCb8@DZ?gvKA^x$QBgk h7ZmH|=Q-!3CKd%0<)>xlq=F4}PAp2>A)VzSA{ItxRRFC|!)FS7^q7)sVcydl^ViBgq<{QkXL?&O9 ukevKhTwwAs30+5^5qZwo6l-WIR09oCP)NxvE=Vj%&d|VWrpDx#5-9*Gyfq#G delta 60 zcmdmKeAZ~gA!ad!{DRcHfTH}g%$!t@{Ib*{=ft8Eh0R}>Pl<4Vm>NZ?X_Nno%S>J% O#4`D{gy!UU$tVEZE*Dn- diff --git a/app/soapbox/features/status/components/detailed_status.js b/app/soapbox/features/status/components/detailed_status.js index d58bd7e72a886d8eaffb05d5d63b345d92ef1c3d..ca3a90b88baa0de6a783597953815df1ff15af25 100644 GIT binary patch delta 38 kcmX?Yd&_piDlS%!{Ib-d$*Z_lL0KW(_7K+Q$=nvg04~}NT>t<8 delta 20 ccmca*d)juxDz3@vxmHb%-aVkzVRzUp<3Pq_UrA2uPp1HZDC5cHnslJH?8j~9s)c`6bAy5DS delta 27 icmZo Date: Thu, 10 Sep 2020 22:08:17 -0500 Subject: [PATCH 04/14] Hovercard: clear when card is unhovered --- app/soapbox/components/profile_hover_card.js | Bin 3105 -> 3438 bytes app/soapbox/components/status.js | Bin 18364 -> 18283 bytes app/styles/components/profile_hover_card.scss | 6 ++++++ 3 files changed, 6 insertions(+) diff --git a/app/soapbox/components/profile_hover_card.js b/app/soapbox/components/profile_hover_card.js index c6319d38b9ee10fb31a5550251d4fb2dc12e5500..c62a364227a820a8a232a220120c485af971c103 100644 GIT binary patch delta 366 zcmZvX%}T>S6opB(qJ08!bzCKpNaHq=Zrms+xD-XpIGK=vBsa`Vix6hxEBFL`10ib> zd=j6)XD~l41@W%#&vy>@tPX#U-oHjyvZzQI)Zn>b>Q+%Ib8$&ap)Qz8V38^+;A&#k zGrde1Hy74X!AK*Ih?mggN&6)E^cU{#kF8dff!yQb;S(Ne8e-<6F>>G zP$k;qFasOJ`}Y^m_s?6IZSHr+j)UfD{OaUEZv_;T$W#iYBRq8GU6rg55nM`BEsPti zw^a2BqP4IC2clJ;o`qq6@NvW1p|SnKHs5=9P5>&m!Q%RF)NM{Xo4g$#oHWV)$IdTE C3w5Oc delta 38 ucmaDSwNPTiA*RiI%<~v0i?aUTEXLNzxS5$Ff|1FNYjPmB*5-|zdzk?P@(euy diff --git a/app/soapbox/components/status.js b/app/soapbox/components/status.js index e81ed9ccbec3cdf6c3a056af4116ab3aa516b44b..275603bcc445c1ac56299d4f41a14cae5d167295 100644 GIT binary patch delta 19 bcmdnf&-l8Jaf1r~W@rBGf}3>|C#V4cPm2dF delta 79 zcmaFe$GE4Taf1rKw1PrGQGQxxPO5WaQA${5ab{9Zs+B@oVoq`DW(EG;f|Iw13Q6Ns MqENf}n!;2y0FJ61c>n+a diff --git a/app/styles/components/profile_hover_card.scss b/app/styles/components/profile_hover_card.scss index ded79b5f52..47a5242a21 100644 --- a/app/styles/components/profile_hover_card.scss +++ b/app/styles/components/profile_hover_card.scss @@ -125,3 +125,9 @@ display: block; } } + +/* Hide the popper when the reference is hidden */ +#popper[data-popper-reference-hidden] { + visibility: hidden; + pointer-events: none; +} From 9692c7539a9492538544a552612b35549c01a137 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 10:05:52 -0500 Subject: [PATCH 05/14] Hovercard: appear and disappear properly --- app/soapbox/actions/profile_hover_card.js | Bin 364 -> 557 bytes app/soapbox/components/profile_hover_card.js | Bin 3438 -> 3619 bytes app/soapbox/containers/status_container.js | Bin 6585 -> 6608 bytes app/soapbox/reducers/profile_hover_card.js | Bin 513 -> 702 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/actions/profile_hover_card.js b/app/soapbox/actions/profile_hover_card.js index 83b81d984267790279b916f72daea01588501a73..90543148d9d60f00f9703ce07cc43842b079bf16 100644 GIT binary patch delta 171 zcmaFEw3cN;l5%K(i(`nZf~|sjK#;$ir;lsAhkuxBP`tBakV`y7a-zK|yMHiP%|w4u zW*~E7^GvqVf|SIP)X9pBw$2b`I$R10wbop@`hf}t;3C{NmJrqWrYXoK%neveY8y#G(`(phRgwN@58XnavNG?l7{t z=9Q!tO+Lh8zy?t_`8$i;YHC$oC+4v TNXaZNNGwUt(A*rwDZ&B(UfDV_ delta 71 zcmZ21^G<5RDJF4+u6c40La!6K`%c`|D> K%Vr5KZWaLG%o*hX diff --git a/app/soapbox/containers/status_container.js b/app/soapbox/containers/status_container.js index 015256169d472fe7c058fcb5839690378474c898..fb976a82d040ec79caecdcfa8dd7b94bc79b8a43 100644 GIT binary patch delta 76 zcmdmKe8G6beP-tT;?&KLm_tO(i&INNGILY&OG`8~G!<;^6jCya3ld9`Gc=NOfQkZ& f^3yVNQa$p^Qj44ui&8W+HFXq>4GboSNhSjTR$?0l delta 53 zcmca$ywiBYeP-s=#G=iQm_tMrQZkDR5=)XZG?H_GVgW_@X_+~x9{FXdMb3#uDH@uS Hb0w1jL2nd! diff --git a/app/soapbox/reducers/profile_hover_card.js b/app/soapbox/reducers/profile_hover_card.js index 09e3a92fc5c5d2c6b9a62a0a9d10c9da2c93f5c5..5776a3e87a0d998b72de9d0cfbef849f27c3df8a 100644 GIT binary patch delta 189 zcmZo<*~dD;TERcqRfkJKAt1=#&C|y<-oro4H7MTMF~}u8G{D6%#C4-x9it9}X$4fL zpiq=rQd*R!P+XE&lB!pnTB4zzkzbZtl$xThqfk;*nmTztqkIg|REX-#GzATa(sX2{ vnhLhIwqWH7YHA9KiOD6I`FVP2`9;a8nqXT{?Xd=nrREf;0vVGJGui4&n%UJcXk&C8BdfCykTp4xQEKuGCN%(j+z3bj From 1d90950e59c51ffc06067daca18c81ca1848e6f0 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 11:37:05 -0500 Subject: [PATCH 06/14] Hovercard: refactor with HoverRefWrapper --- app/soapbox/components/hover_ref_wrapper.js | Bin 0 -> 1244 bytes app/soapbox/components/profile_hover_card.js | Bin 3619 -> 3630 bytes app/soapbox/components/status.js | Bin 18283 -> 17813 bytes app/soapbox/containers/status_container.js | Bin 6608 -> 6306 bytes app/styles/components/profile_hover_card.scss | 1 - 5 files changed, 1 deletion(-) create mode 100644 app/soapbox/components/hover_ref_wrapper.js diff --git a/app/soapbox/components/hover_ref_wrapper.js b/app/soapbox/components/hover_ref_wrapper.js new file mode 100644 index 0000000000000000000000000000000000000000..64d62ba5c754a96cc030abb87cc60227971f1d42 GIT binary patch literal 1244 zcmah}O>f&U487-9aHq(ClXTl{se9Q5Y`{7UMS&gzMWSZ`j$}x3(!t1oAN64;O;a?7 zz$PF09>1)1ov|JskPBbJ0KLNptl?y{&}DZ=?+YIcC(JMd zFdb^b)~dxHW{>tOx3VO=XpO_yj*-n7-fhkEia3?gZbj)sicJ%8Yy>4aqX|;KDc5l? znwNSP7G?i@4wbkyy%sp(S|hn@&LPU(n=O$|kWq|sn_ct}dL~Gg2iKUxWff4t$ikS+ zx=OHEm%xP}djC@vP~Aaj&j!6iuLSR!pBcHH}sSxG+fIT?+rEKyY^^_{(V-9 zzPB21Q~{uBU?0ZP*+FS(4ojsq+9xG_Qxv2%{H|5}Hs6|}jwJe;+F!``B;cfW>d9+$ z*I1W=(;!<$t%$_5!8pC|wT literal 0 HcmV?d00001 diff --git a/app/soapbox/components/profile_hover_card.js b/app/soapbox/components/profile_hover_card.js index ae3f8bc3a285ce41f039b8717b4cb2d891dbf128..b545b87bcde1c71a463155bb40bdec8354f52d7e 100644 GIT binary patch delta 23 ecmZ21vrcA%DLa>rf_idkQBi7M$z~Jw_iO-L6$jY> delta 12 TcmZ1{vsh+>Df?yz_IGRm9#sTn diff --git a/app/soapbox/components/status.js b/app/soapbox/components/status.js index 275603bcc445c1ac56299d4f41a14cae5d167295..e52dfdc5cb0c21bc5a582c55c90f2c741063ac7b 100644 GIT binary patch delta 199 zcmaFe$2hf{al>Qg$&M`ABAK}b`9&oP9{FXdMM0@);YEoB1(O?@g(t@|a|&jFMB|H6 z)8flP;;BWOGg)p+ZGNC2z_?jM$zM(iMO$i-LSk}qeraBbXNv7)Lu+aF%oO!l&04$3 z_v|$%_c?G(=64XCEZ}G~*}-wraZ%FL7r0Q-x^OAeWw}5?8u+DTsSFPLrwuGt6RU?m73Id*)yvq)x*q1(b&IEe8{SmgQ z*eAjT`)`9%h+2r?p3OKO)kL_U*NC@_@en3_#7qUjNCsDFws zEvnoB^vxluSA?zY%}ssQ7oTu9plPF8g#KA$9vCY>IT;HLopO-$g4FmH^8J7kk+wd}cu*)T#&b@ke3d-J_Rb?ksw`+OTudb-a>ZSUsF2wKl-o)U1_h9@RZRP61 diff --git a/app/soapbox/containers/status_container.js b/app/soapbox/containers/status_container.js index fb976a82d040ec79caecdcfa8dd7b94bc79b8a43..02dc76c21e6badea6002ff3f314af8cf78a67a31 100644 GIT binary patch delta 16 Xcmca$yvT6FF6PaOEPW!A%Os-!J0k`< delta 272 zcmZ2vc)@tXF6NZX+=Bd~5`}6m1%>>A)VzSA{ItxRRFC|!)FS7^q7)sVcydmDaVn-n ztwLH+ey)OgaeiV!QhtSgVsc4leqOPD0mO*-43HV|$v{IkZ)ct;q7JkmFE}H=9Ni?1 zqSQ1Ug~a6K{L;J<&y>maLZTwr)J#4nE*a{albTqBA*%^?zk)(>YDq|DZfbsMiH3%z gf~}oGN@j6EVo7p_239|4Xlm*x7#kQ&wwFi-0E+-&m;e9( diff --git a/app/styles/components/profile_hover_card.scss b/app/styles/components/profile_hover_card.scss index 47a5242a21..e899989012 100644 --- a/app/styles/components/profile_hover_card.scss +++ b/app/styles/components/profile_hover_card.scss @@ -17,7 +17,6 @@ z-index: 200; top: 0; left: 0; - margin-bottom: 10px; &--visible { opacity: 1; From 24bf880e0b5d952dda5613dc70fd22bf050539c2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 11:42:02 -0500 Subject: [PATCH 07/14] Hovercard: refactor detailed status --- .../status/components/detailed_status.js | Bin 7898 -> 7218 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/status/components/detailed_status.js b/app/soapbox/features/status/components/detailed_status.js index ca3a90b88baa0de6a783597953815df1ff15af25..e323873a313e30bbf5537b95aa0c339cb7b29667 100644 GIT binary patch delta 190 zcmca*yUAihCG%tx7G1H-+=Bd~5(SU^vecrW)U@!T#Dap=c2a~o;KG6+=+5%m+>i%pUU~1eRYK?= znB86ZA7&wT@5X=O!nNohaO1~I($?w(@vZXSxjE_QkBhW0TJd?(48#U&@#Gbql!*GEb0AF_&4Z6fOMb=&ncD z7&4P&RB-)YuX&7+($6d3ZkDBChUhI_XNfJoTCPQJc7alRy9XlfiHX9~Sflik+}OpC z(p6dBOIcYCP|t4BLuZ@b+cxc2@6uK08XY)~2%S?pcWnCL?9wNvW3V$iukM+*>zz`| zwOT&vY}~~;*_>InMcra=3GBv8m=-JLCI1>7)M_QWl0vidhgQ0AJ8AlSy7*DObLki3 C4=-^5 From 72659f27c14b422e1351bc326055dd169bab8fcb Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 12:17:32 -0500 Subject: [PATCH 08/14] Hovercard: attach to each element for better positioning --- app/soapbox/components/display_name.js | Bin 1575 -> 1735 bytes app/soapbox/components/hover_ref_wrapper.js | Bin 1244 -> 1374 bytes app/soapbox/components/profile_hover_card.js | Bin 3630 -> 3522 bytes app/soapbox/components/status.js | Bin 17813 -> 17812 bytes .../status/components/detailed_status.js | Bin 7218 -> 7301 bytes app/styles/components/profile_hover_card.scss | 12 ------------ 6 files changed, 12 deletions(-) diff --git a/app/soapbox/components/display_name.js b/app/soapbox/components/display_name.js index 7ab8b9e6072f12a1d7325bc66186128269b1a336..7d848a90284bb00b73c53ac1b0956f5e84b3685f 100644 GIT binary patch delta 163 zcmZ3^bDVdB5Tj#eZb5!giGoLdS!z*GYFc?fVSG_)T6{S~>1KY$Q!JJ?=msPvC+C;um3XGuRzsP3>8T|e>X|9(nzag< cc{!PRsdiin3X?Cg$_d%%qiMIB{EXER0EC-73;+NC delta 20 ccmX@kyPRi(5aZ@B#^WrL#@1v7_^LS|l0W?t%K3ub3q1%>4Nyy6lC*PPT`1zV_$g1v%zaY169x`LI0 zdP-)Qx-}PiFu9-k5DSu?TCA6p zpP!?{RSVSbkzbZt6qK44UX)l+kXoddlA4xSno|N&S`4(f8fYrSSyl>Zi8;lSx3Z`M E09PbAJOBUy delta 48 zcmcb|b%%3<1@mMFW@iyD1%;y2lG36)1q~omLBS>^vuyGK=0nUNx{W1evK6Ze0Bv** A_5c6? diff --git a/app/soapbox/components/profile_hover_card.js b/app/soapbox/components/profile_hover_card.js index b545b87bcde1c71a463155bb40bdec8354f52d7e..8d234aa4ba6cd9e02f443dde45761dda1c989646 100644 GIT binary patch delta 12 TcmZ1{b4YrFF30AX98*~VAOr+^ delta 140 zcmX>ky-sF>E=RqNLN%8H5ai~kWTs`N78P45L_tQ>_%#^V8CbQ%lr!!0Hqf z@(W5b^Yeh}V9J0(U==`}x`qY@Itm7{FtxQ1MlD#NR@0gbXhvq5f`(#Za&mrYUWw*r I2aYCI0A)8M8vpCUe;vPwueun`~{LGWm#|(B#wh>XSd%vrPW$APJ^* u9c3ry+Hp;mapa$DYo9l{N10=Cy@TT9MGoPUe*@LnItc?Y`{qDL7Zw1j>msNC delta 99 zcmV-p0G$7nivg930kDZalkPrElaE0dlb}8tlm9&$lhQsLlP^GS5N2#|VRUJ3XDw`L zZfhqXFOwlY6qB_-Ba=Kr6O%7K2a`ZQUz3qQHIu|ZS(6(<83j6r>hS-Y6zAd7YT>xu1*N8i7bO-Hq!w)slrUid0Di(O?EnA( diff --git a/app/styles/components/profile_hover_card.scss b/app/styles/components/profile_hover_card.scss index e899989012..b3fb4fc312 100644 --- a/app/styles/components/profile_hover_card.scss +++ b/app/styles/components/profile_hover_card.scss @@ -113,18 +113,6 @@ } } -/* Prevent floating avatars from intercepting with current card */ -.status, -.detailed-status { - .floating-link { - display: none; - } - - &:hover .floating-link { - display: block; - } -} - /* Hide the popper when the reference is hidden */ #popper[data-popper-reference-hidden] { visibility: hidden; From 9ac6f3aaabe05df9654c51e12553a5d18d65675d Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 12:24:43 -0500 Subject: [PATCH 09/14] Restore old border-radius behavior, fixes #266 --- app/styles/application.scss | 1 - app/styles/chats.scss | 1 - app/styles/components/columns.scss | 1 - app/styles/components/detailed-status.scss | 1 - app/styles/components/drawer.scss | 2 +- app/styles/loading.scss | 1 - app/styles/overflow_hacks.scss | 37 ---------------------- 7 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 app/styles/overflow_hacks.scss diff --git a/app/styles/application.scss b/app/styles/application.scss index 96eb4dcf4a..fdce329ad3 100644 --- a/app/styles/application.scss +++ b/app/styles/application.scss @@ -27,7 +27,6 @@ @import 'dyslexic'; @import 'demetricator'; @import 'pro'; -@import 'overflow_hacks'; @import 'chats'; // COMPONENTS diff --git a/app/styles/chats.scss b/app/styles/chats.scss index 29c2f0c4fb..3e2fc2e244 100644 --- a/app/styles/chats.scss +++ b/app/styles/chats.scss @@ -322,7 +322,6 @@ display: flex; align-items: center; background: var(--accent-color--faint); - border-radius: 10px 10px 0 0; .column-back-button { background: transparent; diff --git a/app/styles/components/columns.scss b/app/styles/components/columns.scss index d8034e4974..10e46e441d 100644 --- a/app/styles/components/columns.scss +++ b/app/styles/components/columns.scss @@ -212,7 +212,6 @@ font-size: 16px; line-height: inherit; border: 0; - border-radius: 10px 10px 0 0; text-align: unset; padding: 15px; margin: 0; diff --git a/app/styles/components/detailed-status.scss b/app/styles/components/detailed-status.scss index d53b426ee3..ceab5899c1 100644 --- a/app/styles/components/detailed-status.scss +++ b/app/styles/components/detailed-status.scss @@ -62,7 +62,6 @@ border-bottom: 1px solid var(--brand-color--faint); display: flex; flex-direction: row; - border-radius: 0 0 10px 10px; } .detailed-status__link { diff --git a/app/styles/components/drawer.scss b/app/styles/components/drawer.scss index 39e936158b..7dc5a1a10c 100644 --- a/app/styles/components/drawer.scss +++ b/app/styles/components/drawer.scss @@ -20,7 +20,7 @@ .column, .drawer { flex: 1 1 100%; - overflow: visible; + overflow: hidden; } .drawer__pager { diff --git a/app/styles/loading.scss b/app/styles/loading.scss index 88705782ee..42a3a0c1f4 100644 --- a/app/styles/loading.scss +++ b/app/styles/loading.scss @@ -188,7 +188,6 @@ align-items: center; justify-content: center; padding: 20px; - border-radius: 0 0 10px 10px; & > div { width: 100%; diff --git a/app/styles/overflow_hacks.scss b/app/styles/overflow_hacks.scss deleted file mode 100644 index ef72b6863a..0000000000 --- a/app/styles/overflow_hacks.scss +++ /dev/null @@ -1,37 +0,0 @@ -// This is a file dedicated to fixing the css we broke by introducing the hover -// card and `overflow:visible` on drawer.scss line 23. If we ever figure out how -// to pop the hover card out while keeping `overflow:hidden`, feel free to delete -// this entire file. - -button.column-header__button.active { - border-radius: 0 10px 0 0; -} - -.column-back-button.column-back-button--slim-button { - border-radius: 0 10px 0 0; -} - -.detailed-status__wrapper .detailed-status__action-bar { - border-radius: 0 0 10px 10px; -} - -.slist .item-list .column-link { - background-color: transparent; - border-top: 1px solid var(--brand-color--med); -} - -.focusable { - &:focus { - border-radius: 0 0 10px 10px; - } -} - -.load-more:hover { - border-radius: 0 0 10px 10px; -} - -// this still looks like shit but at least it's better than it overflowing - -.empty-column-indicator { - border-radius: 0 0 10px 10px; -} From 7494a0fd00b66062dc78e21bf5185e0e5f2046bb Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 12:30:16 -0500 Subject: [PATCH 10/14] Hovercard: delete legacy code --- .../profile_hover_card_container.js | Bin 2854 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/soapbox/features/profile_hover_card/profile_hover_card_container.js diff --git a/app/soapbox/features/profile_hover_card/profile_hover_card_container.js b/app/soapbox/features/profile_hover_card/profile_hover_card_container.js deleted file mode 100644 index d4f706212af75534914315ef93cd190b334f98b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2854 zcmbtWOK;;g5Wf3YOfM@Lu zC{RELKIZ*>GZbs~QW^L{No8Q8WCNM9>+E*K{MD0^`{%=+>TtcsePQguAk#r5g`jBS zm>MY*t=sohtRdg&@6_B?m2AZzJ)O?*)0CqLsZITO}6yR z8$+SN*|KR`L)M(0C*blcSbtsEgwFCAbX!FqBo;zY3^%Dys*f^7)e8*){H3XSB7*Xu zhZ(kP76tXJMS<1cN(@SOm0?ocx5h~EGd+X{Wman^G^lpK^j+OBF~P;7tf?Yc%vd8W z$$l;0XRTpe&xl7LDfK<6v7$c3UN#AKZLbGs6(?H%Nt#FtcOdM+Ak@Kznrioja$+Oa zJGR#s@%U^`A{rr^w1MqFloC#vlaFslL8>A9uZ9@b0Zpc!FBT+Yx>v`tI7LrW?|710MtJ^RpnvqmKh`N3Jx0(QO!~ zpXD1>4@A`uQW(MnRY2bj6}5(+u&x`Sf147kz;e|$V;M4dW11n!Z>)WPHC;=|ZOk#f zWu0DYqnOy92;3yTqZ!P}3)#L(4al`^$tlxc=-(~F9`|B3(|dw&r=puyRA++6B%M&l z9ykjRK+MRfmRi$J1IgeR>Hv;lf*m|al?XM`s|2%SdTL9hZ=FR>4LJT<<(F4~$TpCN zhRFlg<8ct1?pwXf=e{Mr(?gjN+gKTB-frW@FvDq?xt_~lwm?qW_`TuSfd9dG(>H7H zAUOz5qPa6iA@V7fXDRZR3=vRLWE04k#@XUFum6%)5DAI(yWsT6>kp}g-to1x**a+A zl=zL+k9Mx-<3P>Zj$a_*t?hJ(aClSr2iR;!(9umO@%=b4a(u4p5_u??ejHns!8g6}PCB`AsV!)%yD># zBzXJ{8D5RTknM>fr*ZK+z-sJG|FBKHC%rnzHiIx{!f!*FeRB9{aF??*LJVYPBUv1i z=+5eTHDUjZ72#1{%ugQj5LDTP#SwHvILF4C&k(aTfcfy-5aBDYdbGa}Sx>HI9gQ#R zBN|S^?>vpBoQkd4!2*80DE=vNuDbI^E>H-@({kAw+N{#EKJz%Jv}{#HE&XjPWv{r% t#{V}&CJ}2Qwp7Vh^TSs=6!C@q{QUSwEDyG|t Date: Fri, 11 Sep 2020 12:38:42 -0500 Subject: [PATCH 11/14] Hovercard: update DisplayName snapshot --- .../__snapshots__/display_name-test.js.snap | 24 +++++++++++------- .../components/__tests__/display_name-test.js | Bin 525 -> 537 bytes 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/app/soapbox/components/__tests__/__snapshots__/display_name-test.js.snap b/app/soapbox/components/__tests__/__snapshots__/display_name-test.js.snap index 59789099f1..d26a406a20 100644 --- a/app/soapbox/components/__tests__/__snapshots__/display_name-test.js.snap +++ b/app/soapbox/components/__tests__/__snapshots__/display_name-test.js.snap @@ -4,16 +4,22 @@ exports[` renders display name + account name 1`] = ` - - Foo

", + + + Foo

", + } } - } - /> -
+ /> +
+
diff --git a/app/soapbox/components/__tests__/display_name-test.js b/app/soapbox/components/__tests__/display_name-test.js index 0d040c4cd8cc04661fd4ebcb02b04d1c746647b9..f626f94cabfd12063d41f5a083c005febd25dc33 100644 GIT binary patch delta 86 zcmeBWnaMIiX`-K}X=ZLgeo=`+wL)@HYGO&Mb3Txtmzr0iP^*wul%K1hUYws;kd$Ac bUy@o}5}%QpQ;=FzJaNh!el+!y`x)y1eTE^J delta 67 zcmbQq(#tYINvS9`FD11owMZeYC_h(0y(l#?xkR@lwYWqVCNohYc;e!h{4lOwGEhxP J>g3ssbpS|h8N&bo From d6a39b3e0959dc40b21ebd0bf5775d172914b073 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 13:04:31 -0500 Subject: [PATCH 12/14] Hovercard: put hovercard on chat window --- .../features/chats/components/chat_window.js | Bin 2966 -> 3209 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/chats/components/chat_window.js b/app/soapbox/features/chats/components/chat_window.js index acc5c2e8e29b1618a62517b8663eca4b520ffa71..bb1a6346b8717faae649dea113a166fccbdcae94 100644 GIT binary patch delta 304 zcmbOx-YL1Ej7cmrw;;c$M8PA!EVU>oH7&d-v7jKeX!2S{DZvboSbR}xT6{S~baOG& zdRD3A{Ji24h0?sD)Wj4|AV7_3TaTDjee#bn5k*a1*Rc} zB$g$XBo-kIP_RLBheBd-~+|9|&1ORd0R`UP= delta 89 zcmeB_oF=}ZjA`>OrZudSk8m#G<5EBZ_LCbp)F*G?P!O`w&$L64vYKqhsXjS_Q%%rD Q-zPIK8%cI^9Tztf02PQ7 Date: Fri, 11 Sep 2020 13:04:45 -0500 Subject: [PATCH 13/14] UserPanel: only show stats when they're available --- .../features/ui/components/user_panel.js | Bin 4205 -> 4312 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/ui/components/user_panel.js b/app/soapbox/features/ui/components/user_panel.js index 1ba4e3efcab7d9546ad5e3d54532f327094d42d6..411b9b70b7320e686bbcb298013b219257686887 100644 GIT binary patch delta 115 zcmaE>a6@s!BM!#u$rm_fnHAL3Hb3O}!YEYB#if7(swdy$mIKL8e#jBC*@3$mtC};s ga5a-1xY;+G@-Ad#2AVZ_BahtVRcr#A+4$2L0ZU{amjD0& delta 86 zcmcbi_*P-VBaX>$*rX=&^KnlO;5M5az{WLs7PtK5|C~aT&v2&#=^v9fu<=ZO!6pY% avpIl!CnK@|P?PQE`Me9kf}4H$yBPt1=pMQN From 40937b9fdc2890d1f28632d1a62de09b03820057 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 13:09:39 -0500 Subject: [PATCH 14/14] Chats: allow clicking recipient in chatroom --- app/soapbox/features/chats/chat_room.js | Bin 2451 -> 2526 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/chats/chat_room.js b/app/soapbox/features/chats/chat_room.js index f3e81cc12035b2b8cae692973bcc6e6e1caed401..a9f0ccd5dc75c58d4d5fd943296f15e4d762e01b 100644 GIT binary patch delta 92 zcmbO%d{217CHZOvpUk{$g<6HQqWoM1^`g|oIwP*j2zPO7d;1 q6Z9QasuPow^Gowe^wLvHG}M8d5_Qemgxbl*9EVsy3Mc>Im<<3o;UY!= delta 26 icmca7JXv_crH#Mi*eBoNkeoc3V-0gkX4zzC&e;H?)C)BL