From 50feacbd6b724722215c42dbe580066c1d7f2dff Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 9 Oct 2021 16:56:03 -0500 Subject: [PATCH] Optimistic, nonblocking statuses --- app/soapbox/actions/compose.js | Bin 17232 -> 16389 bytes app/soapbox/actions/statuses.js | Bin 6705 -> 6750 bytes app/soapbox/actions/timelines.js | Bin 8024 -> 8443 bytes app/soapbox/components/status_list.js | Bin 5312 -> 6834 bytes .../components/scheduled_status.js | Bin 3857 -> 3886 bytes .../features/ui/components/pending_status.js | Bin 0 -> 3770 bytes .../components/poll_preview.js | Bin 1236 -> 1229 bytes .../ui/util/pending_status_builder.js | Bin 0 -> 1254 bytes app/soapbox/reducers/index.js | Bin 3487 -> 3558 bytes app/soapbox/reducers/pending_statuses.js | Bin 0 -> 700 bytes app/soapbox/reducers/scheduled_statuses.js | Bin 1182 -> 1192 bytes app/soapbox/reducers/timelines.js | Bin 8857 -> 10736 bytes app/styles/components/status.scss | 4 ++++ 13 files changed, 4 insertions(+) create mode 100644 app/soapbox/features/ui/components/pending_status.js rename app/soapbox/features/{scheduled_statuses => ui}/components/poll_preview.js (94%) create mode 100644 app/soapbox/features/ui/util/pending_status_builder.js create mode 100644 app/soapbox/reducers/pending_statuses.js diff --git a/app/soapbox/actions/compose.js b/app/soapbox/actions/compose.js index 21e4de7d65dd40c7472b42642ada51438c37f0e7..6807cec4b3e50ad802fad451f214bc77d6521400 100644 GIT binary patch delta 19 bcmcc6#@O1xxS@t|^KQoV!kfz^ZfOAkQThl0 delta 799 zcmZ`%u}T9$5G8FYL9`Hsv2kzZxCmMZ62UTsh-fD%&bvvnc)NSv?g~+l*yso7j|eIK z341?AXD_+a1T1Iwy*F>(%=1(0^QHCv*xGk_8e6;+5;LJNgcNTby5<2&7!+Cpi#m3W zG1I*Du{vo3bUJXULB=--c7zb;IY?a~6lij-jJP8`Atk1QT4ZC$of%a~V`J+K2xWCu zCpvRd8InwhXX(RWVS9r!fXH+y2tQ9z?B+Xf4!Z<`lK!l3;%HX{HRS705O1| zhQQ8F1Br%c112m=!+2!GJ;E{UEhBm=xSE4P*z0rH?sh@BENg%hay!$~m2<{!CcVd@VZjLy|H}w3JQ>J7&CIi|0k8JwElJk^&jOKx>5>nqY_%dqK%! zz`1u(`TZ3MfoWP(LD8^Ag86K`J%Ci0JhsUwSUQ0wv0fTh<2Fa)-SEHs!0 z*y2c}HLIlFltKILdvpE3$H`JrU}9-vzhuf~;SvHi(h^zKvINWwzHV)t=I%NZ$-k7} T1m;$kHEX^PqMYuoeeM1L2DAr_ diff --git a/app/soapbox/actions/statuses.js b/app/soapbox/actions/statuses.js index 041696fa879aba781210b26089f5847ea6a8ff9d..cdfc16d949108939f95546506c53e78dd40029ff 100644 GIT binary patch delta 34 qcmdmJa?fN#5&Pt=oFbgXC5a`a#hRMdlOM3FO^#<|-`vl>NC*Ju0}NLH delta 12 Tcmca-ve9Hi5&P!(?E8fPCDsK? diff --git a/app/soapbox/actions/timelines.js b/app/soapbox/actions/timelines.js index 137714a2afce9a403de2984fd1ef0f33245f26ca..6f93d74f0b9374a84a7759cb03c98af79f806b3f 100644 GIT binary patch delta 456 zcmZXQ&q~8U5XLV}K~EmMD2Ss-lR%n2fJ9L6AR-7o^x_}V%`{o;?uP8d5%V zgAd@zn-Ai}X(LV5z3lMK%SS4k)X;Ap%zvD z604wHw+7?{X2>>=2u-%TbVUguG1?`Nyk77}Fe!|J3=0ff$Osn$Q&h;;GC4^lElB~| u=>B-h>G&oqWLV#Jck3-@ZzGX5k4a=+{psx2H_qX@(mi5j`}NIv-uVVrqnh;q delta 42 qcmezEc*AakFUw?R*5i|pvPrTPrIwTyH}-*k#=m8iI?Krd^gnmGmb2(sNNLT_7)c69>NTTKNaq$|yF3#YG zVgtVyr~CT#*hE`qN00l43BAxM#f`vQy4?bw>s3^a)~lUU$ABzl+NIfQVr+IC;9-1RAN{NTwLSQH-{>#PRfkQ zOV*`j!AsD1r*L-sXyEWmVFnK;&rOPnkfVnA;(T8|F``>=q)0Ff12{lgJZDh)iP059 zmm2vPjj-$iaVbf~th4rq5#3<3rz%o`eMS3Qij*#n5RT>=RPsBZf|(Kb0)xvn#J?UM z9G~fnw#0Y#KD=M7(05&~+grZJ^cZE7A-g4eAa|S~YGp)L%W+yUwTv3JatQ@vYnWXb zN@dl?*1SjAJOloc3CNja&``FSO&c_j+AlXnO!bJ{Ct za4CSmwhDQrIXMat`Nyh88yGB~~#CVpu)7Q%Vy6%(Qhg diff --git a/app/soapbox/features/scheduled_statuses/components/scheduled_status.js b/app/soapbox/features/scheduled_statuses/components/scheduled_status.js index ecdc5f598b99a5cf1c76021c757bac37a0644b7d..5226125fc08ab6cb94ae29e10e955c4167fdc12e 100644 GIT binary patch delta 43 ycmbOzw@z-uE+)C+{KSH!{0jZF)Wnj~qSRvj(oFs2{M>^4ywtps;?296!gv66-w@;g delta 14 VcmZ1{H&JfGE+$63%{Q3BcmOG21qJ{B diff --git a/app/soapbox/features/ui/components/pending_status.js b/app/soapbox/features/ui/components/pending_status.js new file mode 100644 index 0000000000000000000000000000000000000000..93707d5070d8c47f106b32f725cee985fb8ccfcd GIT binary patch literal 3770 zcmcInOK;mo5WeeIOn|_Y0#WRthr$+}xONK|Z4)8(tqAB9xv~}^xdeA9%O&{VJNx2O zN`0vz807A^^Y~_FXUMXGmlD2G5=+>XJOi&(&)(IHnXMXPp63*|n?ArVX;K~gu-|!^ z5h-c%7Zrj$(-EHKGVS2^SyoB1P3fj8=`BZ9In4(a_{>540x^Ea)VzvPvqrJwMu zf8v?SJDw4iw`iwSxhDb=$GpmA&)Ay-k)%9tA<_Gtjyoobl)Neq&L2t)C{o09M{lGg z@jknL;<_JW5QWs#B8&`!vPr|G7o2S#74{#8)mT2z=tM9whiLPACg6=nL! zHzh9wgfLfOrAsK(`vSsisAr%u9nm$ggknZww#2W0&{rfdG{CDCW3xj^t&}`1ZiSrR z=kve4VeVi;EJq^0EtIH|%Bsw@X3!EUaS21oANx7l8f{Y3C?AVnz$N5Wnl4d6b2Y=? zj2?B7Cv-=uRKh28Qx)`lM9X5PQy4aV@j#ErLn7cz#nvUVf`z+yUwB*09&59xCzy#Z}l*w0b(L60Nm&Y>j;x5ux?-Jfw z&douVM|vZYJYtErfM(GE-q80L*<)CDF1k|EzWd4yw&tKTD$~p z*(FSDRjwp>xA`my2W%-v2j)*4XxYOWB6;Eg&u>!}f47Y6aV@34={>#PK*>{z(JraL z+YK*&o_i4VDLSu%43$&}7O1$NNG<_f!|+wZm>k1{)8^B*mLUx>mL|qDA`*gTEm z)M{ecGl(({ojDDVREC}hl1Yq&J3nC~EafYp25j9otG7G7pMmYxj4=oWB9 z*j_r-j5fJ0Z>adxFL2#mdY2eJO1!p^9p`R$8JxqO(urDa_qW1_3F0(jb_n(llKS&6 zC-TG)YOSAYF`Q0Q<$refRO#5E#MeW~)KX-lKim8lC8O&8Aq^);uuB7C)(^UM-kOnh zu;nHN7oldfYc499jFw{@j7TBW$UWFW;|K5S@n|;KRlPAQ@cUr2n$d(2XOU?rdI_%- zH@*qHTL!1bng=(tn&YquU0lGrKjx|Bp&A2J**L1!x;J&8n6577-lW(4VBZGc^u#bU zliulx0=vmKZL%8yR3@mu^|q1{$C0+PhizNIDMfvhMA&>u;%6K`bPV`(r!hTdnz8H2 z#}~Fbt7N5!z~NbG@W2j%_8Tqq9&i&orrDfi@;Wfq3^igP2a&9U5AgWq?hAYfh9OoP l>rF~xy5}iQh&Qq7hri-SMsPg>j|yY(+I!J+GpcW9{{o9XqkRAX literal 0 HcmV?d00001 diff --git a/app/soapbox/features/scheduled_statuses/components/poll_preview.js b/app/soapbox/features/ui/components/poll_preview.js similarity index 94% rename from app/soapbox/features/scheduled_statuses/components/poll_preview.js rename to app/soapbox/features/ui/components/poll_preview.js index 32b7231b2b4fc5f05395be5dc61afc6c83e309d1..edc3c9ed21bea11f139b2a57373b63add70ce9c8 100644 GIT binary patch delta 12 Tcmcb@d6sj-6voZ787-LsBBum| delta 19 XcmX@hd4+Ss6h<}$FxWhq(TW)WJ@N%Z diff --git a/app/soapbox/features/ui/util/pending_status_builder.js b/app/soapbox/features/ui/util/pending_status_builder.js new file mode 100644 index 0000000000000000000000000000000000000000..eb2548ab805d95ecdce066c505874bab1abdaf53 GIT binary patch literal 1254 zcmZux%Z}SH47}$ncqm{8NRytu%>oN7P@p~RVS8%}uWU13HF_9&q)CJPdnrqf?KC%w z9FB%V%3OBZI5@-3X!-ROF8v2&TuSd)B`|wf@ByQ=kxcNv`0AMR_6oL|b(KDDSnar0 zb`uNGY_0`nN+a1Gzo2`nYweZ$kHwN;L)CEA z#`p?&gQVA?s!!kWw1n*=oEHF*p&hT?!dyqbr0WKpMA$;lzowErlbBI@$g-q-3nSm4 zM>wP>@kuxH=JK=0OrbB3i{m*9l&;U||8u3lYPW)_cj!9-9JoOjwNJni&d=FzSzb zcE#L|s6ML5R*+@OwZTrX8lQy7v!5yiKUd~4TP9kAWNK3~Vp8}Ap6QgQ97_G0+X8<4 zir5`HXm2>dXUeW&TlNDk;8VnN!o8(wef)5q59;!kK&lK1Po>jkvZoA%W2bzA2$|XZ zW5aXE(3@bY^{mAynZ$-O>ejLPU6OyXJ=kpE`^)o70fv?f&2R^}cP}g3k1L?VwvT?$ zi@C9)<4WCzv=DbSca)%Mgg%qs1}mZ4soEH6ZzyB**6rXT$J?kyWx3-AGU1MI*DML? zcP%Ngo#p~f>F`K=ohMFGg4&3sJ3+_&LMU3gNoSm=eRm2fq f;?pwdyiw_o)xSG$munl|Y1$YnOkY%Sd06}d4f&Y5 literal 0 HcmV?d00001 diff --git a/app/soapbox/reducers/index.js b/app/soapbox/reducers/index.js index 2b7ecd23c81736bb0fd35a1dbd2b6d4cfaa32b49..d2c4b36ff8cea22dce1d774084fbc819b090e23f 100644 GIT binary patch delta 74 zcmbO){Y-kpWDbMO+=Bd~5`}`)yp+tm^!VbE#FEnD)MACSqWoM1bv=D_iOmx@o-wgQ LMK@=1n=t_ZMARH; delta 17 ZcmaDRJzsjmWRA_pI36=?-pj4Y1OP`{2NM7Q diff --git a/app/soapbox/reducers/pending_statuses.js b/app/soapbox/reducers/pending_statuses.js new file mode 100644 index 0000000000000000000000000000000000000000..445324ae520f32742590e9b7cd96d008856e4cf2 GIT binary patch literal 700 zcmZvaO>cuR42JLd6}}ZD)ZSNhQdMzSrybV78KvNEksu&qv{n=Uefc00v^|p8&uc$H zHeK5j{4xNZ?X#R0hf})G(&ChU<|)sThYOw`4k_me8{yKo4Xku4x^sKoh>~Qh^hT4Q zL8D%6nVjhGAvzEm-kN40ajwyPC$9a-A#h~4G>xn@Bm&>h9T0X9Su`fliC#210a>95 zAXMe;9d9x0Ufm)+($Fh##cPceE$c#myk+BmQiU}VJ|rzWU4qB@`a7~AhQXC2DQe3@ zGx&V($X4OiX|M1ihMM3qC?^j(RFza;g$=O|{ley|oez+`EzIQX^idgKA=ZO0*XedlCrXiu`H-(--D(p-7$sOMU2L0JV=!&ZT&UT=Cg80hg<2vk3N_u-8!63ZcajY3&MvzXYbZ%> z1wqic^1=(>pwI{KO?(9L3B>u?ZFlqIO<-ou_nq&Y?_|HV{uq~+nWskQpmSoJ9Uiw1 zI<2$gR{Nx7bTkEk)B~MlN_RqHl2Hh+eq?U#($CxLvjHR>}44R$SY{;205E5dcJ zfkV%Q6%AA@&vi$bO~4NkR#e-tZ;l)?*I$&0_lYuTD2nCbkN|{37!bXGglSvR)=(d) z^ruoRdzcHYoL1%F0E~RwBrtY>9^~)S^5(`apElVqfWBi|P$$r({(3?299y?FfZ;j) zTYN;P`Qi-OA!tgQm{Ku?gV-odpff?l>^bl?JF5&=w5ut1F?

i>KPy@ahm~N;6WJ87{5L@F{a9oWQOT98&y3OjkzHC%`e8Ee$ZfYjohC+X3 zYi(IWqVVb5KCmi{s^qUHk{6kisHYEeVDozMe9`ef>9nvn5F1>jFRd$bZcd(9%A&Tk zG=*;DYWE_$ld)mZdU6vR-4-EOwgUPkTgc8k{dM;N{hckbJub?KcQmg-uA`1PRU&W+ z$NuMdRGoHwo98ysV5Q~jImyfMTqOIY-}i>I)E6oKRHgpXXfcPeK+__~!}U0e(J?Js maET91n#wpiJZu>+jU`-$2>Tp~l&^uMBs5pvx!Njyy8RCie$;RP delta 28 kcmewmJkxc<2FA^tOkboX>nJBqW>FQGn8&`kSf!Q~0H#a|FaQ7m diff --git a/app/styles/components/status.scss b/app/styles/components/status.scss index 230c514d8f..c65539df27 100644 --- a/app/styles/components/status.scss +++ b/app/styles/components/status.scss @@ -729,3 +729,7 @@ a.status-card.compact:hover { bottom: 0; } } + +.pending-status { + opacity: 0.5; +}