From 9753067cccff4604574e340760623da10da5785d Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 19 Feb 2022 23:24:11 -0500 Subject: [PATCH 01/31] Add self-reply fixture from Mastodon --- .../__fixtures__/mastodon-reply-to-self.json | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 app/soapbox/__fixtures__/mastodon-reply-to-self.json diff --git a/app/soapbox/__fixtures__/mastodon-reply-to-self.json b/app/soapbox/__fixtures__/mastodon-reply-to-self.json new file mode 100644 index 0000000000..7cfc756f36 --- /dev/null +++ b/app/soapbox/__fixtures__/mastodon-reply-to-self.json @@ -0,0 +1,51 @@ +{ + "id": "107828148293766288", + "created_at": "2022-02-20T03:16:09.812Z", + "in_reply_to_id": "107828147870368566", + "in_reply_to_account_id": "106801667066418367", + "sensitive": false, + "spoiler_text": "", + "visibility": "public", + "language": "en", + "uri": "https://mastodon.social/users/benis911/statuses/107828148293766288", + "url": "https://mastodon.social/@benis911/107828148293766288", + "replies_count": 0, + "reblogs_count": 0, + "favourites_count": 0, + "edited_at": null, + "content": "

test reply to self

", + "reblog": null, + "application": { + "name": "Soapbox FE", + "website": "https://soapbox.pub/" + }, + "account": { + "id": "106801667066418367", + "username": "benis911", + "acct": "benis911", + "display_name": "", + "locked": false, + "bot": false, + "discoverable": null, + "group": false, + "created_at": "2021-08-22T00:00:00.000Z", + "note": "

", + "url": "https://mastodon.social/@benis911", + "avatar": "https://mastodon.social/avatars/original/missing.png", + "avatar_static": "https://mastodon.social/avatars/original/missing.png", + "header": "https://mastodon.social/headers/original/missing.png", + "header_static": "https://mastodon.social/headers/original/missing.png", + "followers_count": 0, + "following_count": 0, + "statuses_count": 3, + "last_status_at": "2022-02-20", + "emojis": [], + "fields": [] + }, + "media_attachments": [], + "mentions": [], + "tags": [], + "emojis": [], + "card": null, + "poll": null +} From d16b764de756e197c1c385251dc64fdeecb006a4 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 20 Feb 2022 00:21:47 -0500 Subject: [PATCH 02/31] Create normalizers/status module --- .../normalizers/__tests__/status-test.js | Bin 0 -> 2756 bytes app/soapbox/normalizers/status.js | Bin 0 -> 1239 bytes app/soapbox/reducers/statuses.js | Bin 5891 -> 4875 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 app/soapbox/normalizers/__tests__/status-test.js create mode 100644 app/soapbox/normalizers/status.js diff --git a/app/soapbox/normalizers/__tests__/status-test.js b/app/soapbox/normalizers/__tests__/status-test.js new file mode 100644 index 0000000000000000000000000000000000000000..580adc379ff4251d936cf7c80d07d388535ea503 GIT binary patch literal 2756 zcmcguOOM+&5WerP;7u~HvPp^01nF%rL0c5q-h#m3W4LCkha*whZG!#pr7X+I25r_! zjOZe1Fq-e1`8b*h&A#g+`iOkrHLq{cf1HW1oj7uxAk67pEb6yuB3 z^O^eU0Ep1~4pRCHpX_9A^gcgYr#c-UXYX-q|`uIisXAkL{(CE9Q;n6tub+YYZ+z&4{ zn*+o3(Al8tO#?3IjRZ`AV?~TH+6u)fF-($@Vaa7>L6o+VTvePCOQa(lQ_NW9%SsSP zhV{O^JE84+cpuujmKD4i`qNhV4#)M#NVt#E0qW}Yicsq~gsipWX;^U`BS8RMnIlwxg9NaxFR zDa5lSx(wjgA0hYd*UnX1*uH>r7O>f&U487-9@Mals?d{sZ1$x+k0?TC`u){DIYDC8xEXkAPHd~wjKFab}(zGYb zK%whWjrp3 zUwJLHU_-$hpic@fFOY=EOk^IoLt?X@Fbh;6z$1}W;p@e^)S8XQbVzK`_g1f4Q)u`2 zL;8j>lYvgdJWQaXGYAAI?nt3;4$~1s=eh6c5GOg-h{n9{1oy}ig+lUb*^f)IrL&+C zmS!tnb2cC~oN;!!;vKuNSmFv0It`3TG+*Qaj1_3X)DZL~NfKi#wLEM`%c~Azvs1wA zjxw0c$xtmqrT&Ip`}e!K-R(@T{hc@qlDe`1QF&AGh^eFqDTpyKy$^TFH$nPcD^Xl| zGZ6+l29G!0tPDqRx*p|(ae1&X#%X862BS=54U9+Dp%|2939qT9gZ_i8#z|j&40EJO z0=A^Um}~Za7@gy&>2tbp7w*bDqzoe0aVdBhUXL?1-H-ZtS4dB!(JehS!xGu4sFf}H_=qpBrm@xH!&x(DmAzyv81$Ep;jTSC_h(0y*NLyASu5>A1+^1tX~XP xqHeu0po3}iSvGkl=CsU;$*VbKCJS;J@WEArO`7b@sWo{zrz=Rw=BJ!;ya1Z8DV_iT delta 1111 zcmaJ=O>fjN5S13~ffXG2IG}3aKoYb~;98VQJ%CivN(hiRAQZXl*FtOM)C+tm>@p116lCNaQBI4Tf>S_)=QR6IKh5gOrJJ>} z%vL6@O3o~XL4jPbY{;;;*pnGo!l7s=cdy%}_ZOLPC z0!nk#pyuEfO3)6p!sp`Tu&t1#UTsI}uhtFpZ6AAA4jMWS74jLD`TG}YZ#GkvwEMjN zV@k+OJ4j|##ylt!+?_$1N$PW@E!d@7_A(d9x2@_F1O0RztIB>848iF^q#ee@t`dff zB5DGw{a%PUgv{%9Y>=iY{4F+WHs0+~Yxed7XC;{lnA6Jnv-ld@vc3Se=gV-GEJR)P$?= Date: Sun, 20 Feb 2022 01:13:30 -0500 Subject: [PATCH 03/31] pendingStatus: safer `to` fallback --- .../ui/util/pending_status_builder.js | Bin 1948 -> 1950 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/ui/util/pending_status_builder.js b/app/soapbox/features/ui/util/pending_status_builder.js index fcb41c14f3835e8598085b031bb2231b4569044a..6b55e4b7b873eb6895d97a28aeea2218436dc11b 100644 GIT binary patch delta 20 ccmbQkKaYRIYbJJ0g_;_L=-AC4nAWfW08NAkYXATM delta 35 pcmbQoKZk$AYbGHbh3HsKO=~U%AgEPH%_&ZuJb_7MvoLcv3jn(u3Hks4 From 1e4659248f492ba23187810fc5a5c3554dbf29e7 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 20 Feb 2022 01:19:28 -0500 Subject: [PATCH 04/31] statusNormalizer: fix mention to self --- app/soapbox/__fixtures__/alex.json | 127 ++++++++++++++++++ .../normalizers/__tests__/status-test.js | Bin 2756 -> 3187 bytes app/soapbox/normalizers/status.js | Bin 1239 -> 1878 bytes app/soapbox/utils/__tests__/accounts-test.js | Bin 2794 -> 3232 bytes app/soapbox/utils/accounts.js | Bin 1883 -> 2088 bytes 5 files changed, 127 insertions(+) create mode 100644 app/soapbox/__fixtures__/alex.json diff --git a/app/soapbox/__fixtures__/alex.json b/app/soapbox/__fixtures__/alex.json new file mode 100644 index 0000000000..022978fdee --- /dev/null +++ b/app/soapbox/__fixtures__/alex.json @@ -0,0 +1,127 @@ +{ + "acct": "alex", + "avatar": "https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png", + "avatar_static": "https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png", + "bot": false, + "created_at": "2020-01-08T01:25:43.000Z", + "display_name": "Alex Gleason", + "emojis": [], + "fields": [ + { + "name": "Website", + "value": "https://alexgleason.me" + }, + { + "name": "Soapbox", + "value": "https://soapbox.pub" + }, + { + "name": "Email", + "value": "alex@alexgleason.me" + }, + { + "name": "Gender identity", + "value": "Soyboy" + }, + { + "name": "Donate (PayPal)", + "value": "https://paypal.me/gleasonator" + }, + { + "name": "$BTC", + "value": "bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n" + }, + { + "name": "$ETH", + "value": "0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717" + }, + { + "name": "$DOGE", + "value": "D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D" + }, + { + "name": "$XMR", + "value": "45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK" + } + ], + "followers_count": 2378, + "following_count": 1571, + "fqn": "alex@gleasonator.com", + "header": "https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png", + "header_static": "https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png", + "id": "9v5bmRalQvjOy0ECcC", + "last_status_at": "2022-02-20T04:14:49", + "locked": false, + "note": "I create Fediverse software that empowers people online.

I'm vegan btw

Note: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.", + "pleroma": { + "accepts_chat_messages": true, + "also_known_as": [ + "https://mitra.social/users/alex" + ], + "ap_id": "https://gleasonator.com/users/alex", + "background_image": null, + "birthday": "1993-07-03", + "favicon": "https://gleasonator.com/favicon.png", + "hide_favorites": true, + "hide_followers": false, + "hide_followers_count": false, + "hide_follows": false, + "hide_follows_count": false, + "is_admin": true, + "is_confirmed": true, + "is_moderator": false, + "is_suggested": true, + "relationship": {}, + "skip_thread_containment": false, + "tags": [] + }, + "source": { + "fields": [ + { + "name": "Website", + "value": "https://alexgleason.me" + }, + { + "name": "Soapbox", + "value": "https://soapbox.pub" + }, + { + "name": "Email", + "value": "alex@alexgleason.me" + }, + { + "name": "Gender identity", + "value": "Soyboy" + }, + { + "name": "Donate (PayPal)", + "value": "https://paypal.me/gleasonator" + }, + { + "name": "$BTC", + "value": "bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n" + }, + { + "name": "$ETH", + "value": "0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717" + }, + { + "name": "$DOGE", + "value": "D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D" + }, + { + "name": "$XMR", + "value": "45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK" + } + ], + "note": "I create Fediverse software that empowers people online.\r\n\r\nI'm vegan btw\r\n\r\nNote: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.", + "pleroma": { + "actor_type": "Person", + "discoverable": false + }, + "sensitive": false + }, + "statuses_count": 23477, + "url": "https://gleasonator.com/users/alex", + "username": "alex" +} diff --git a/app/soapbox/normalizers/__tests__/status-test.js b/app/soapbox/normalizers/__tests__/status-test.js index 580adc379ff4251d936cf7c80d07d388535ea503..6543543738e2f90e53c6fccd3decf5f590e1a09c 100644 GIT binary patch delta 210 zcmX>i`dMPbPe#4Ol$2tH+|<01%=|osl6-~Y)SNVh%seoyTa;RmQ>g%y@J%c($xq48 zn|zwnSu7XIfk^9?3mv+#uy9x!N2(f@O8h8D3=ENA0k+b?O2j-U@`f1^V@$40$e8vBuiIN0$KB?1YdzGPlBRg>-4?;Rx`s`-e@BY z>HO1Yri{Q`aK@jpH#+y3xLA;IuQFgm$!cyQJw{J4sv6*VTXuy`!Bufz%U3 zSyn2#OxZ1$iujZLlJ&ZX#_OjG&8>FfPxUTis)%dk8@|zO!BWZWyaiKbk=sM)A$r(W O=Y!W#_f*yAVD<-RXuMJY delta 18 acmcb{cb#*B=f>8r%##R|f!3vj=DZ diff --git a/app/soapbox/utils/__tests__/accounts-test.js b/app/soapbox/utils/__tests__/accounts-test.js index 15a42ec575c7956d215ebc98f5e51cbbef5225bf..d3fd6f9ba189b5d9d77c94f980a39843606ffcb8 100644 GIT binary patch delta 395 zcmZ9I%}T>S5XV7OBwj=)#oOF=110g|L8XF}UIY<8?s1z=HDQx&cPC**qp{~Pbt7;8m7H-Q$q8+K4(|#sUJJJB Wyp8(-sqvx^lCLjnQVzZ2)%;(@YJevI delta 10 RcmZ1=`AT#`&c=p1E&v(S1a1HT diff --git a/app/soapbox/utils/accounts.js b/app/soapbox/utils/accounts.js index 6970f005046c2a23a7b0665b57cc786c8381b2dd..3cf2c7cd51334e2e442cbbe448162f0257328ab2 100644 GIT binary patch delta 214 zcmcc3w?be;G>SsTB4zznWC<#1C}Z+PA$qy%uPj8 k02KBEi^J3btuH}S0}_Hsmloxq$pS?nlC_%FT(#C*08;`)egFUf delta 7 OcmZ1>aGP&KG&=wcO9He2 From f7f18fac799586bebf9972659c3b125d4a50f03d Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 20 Feb 2022 02:27:29 -0500 Subject: [PATCH 05/31] Refactor status normalizer --- app/soapbox/actions/importer/index.js | Bin 4124 -> 3545 bytes app/soapbox/actions/importer/normalizer.js | Bin 4461 -> 2096 bytes .../components/status_reply_mentions.js | Bin 3285 -> 2450 bytes .../features/scheduled_statuses/builder.js | Bin 1403 -> 1370 bytes .../ui/util/pending_status_builder.js | Bin 1950 -> 1917 bytes app/soapbox/normalizers/status.js | Bin 1878 -> 2137 bytes app/soapbox/reducers/statuses.js | Bin 4875 -> 6809 bytes 7 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/actions/importer/index.js b/app/soapbox/actions/importer/index.js index 3a019e63692025f659500edba8a377d913ab8ab6..8599e7dbc379c7423bf11ae064ea796272d9fc2c 100644 GIT binary patch delta 45 zcmV+|0Mh@QAlVy{EGV&Os|Aw*4Ii@`2dM#*s{$9ZU_Q*dU;)R1Hl%pqZX|8qw;-U|p%j>N*M# zre0=Btfn=W0uVrqNv$YI%u5L_$j{74Eh>hZ0<~HLZMk=kQ*|o$N>ot83m|Up$;w9D=00_(181f#9-01-aMU4jfoxV`OW)yq!|HV CuF)X? diff --git a/app/soapbox/actions/importer/normalizer.js b/app/soapbox/actions/importer/normalizer.js index 7d40357f0a2343d7eb93e07df26bc20481ff13d2..4de148c0ba1afe81917b50765386c9b628d400ab 100644 GIT binary patch delta 19 acmaE>v_W8k{lv!P%^ZxXteaW*GnoKONd_wb literal 4461 zcmb_gU2oeq6n)RH;D7;^2Up&++ay@C27OrC0_j^)xQs;GY$Z|^r6iu~|Gsm1Nt<$= ztOFJVu}R*~!^_LV=(@3OCzLB>qduy~?!uZ*neNiIuUq@zR4W#(t;L8XUaY#h8ofL@ z(X6)-u4{F3Ve3YA`c7B6TVE>K^{sMZ8&sW@&7FOm_MNWW^uU6u?H9dR2hlvA;&%}& zO#LGNh0~qS-f%Q;KVJQ{^TMh_AB8op6Q!*`$d*z$6-GUXKi^;RI2$7qmZ{}e^@c*Z zk`2UKRoJ!^r)S|??jvz|tIEDmS!VCPOoX2slhEcw2u$64p8dMEj~alT8qM^O{nVz!$~wS7<#oOEGMhY&7( zsEc*>%<<2H9tAlLHIL*xY|%7r*_>@@RMOsVD)5{x%0?ULr3X9WmHYDWsZg~=lU%NR zAjB?vo=w2yiM*Cg)<}&Ga3-=1Hh_L`c4%%Ah6Ln3i`h?sL;5)>j>pl=y{!79cD$@# zO`sTRc^qa#81`zx#dhq$-_mJM5vlFHDh~nilL;Pvoa>T`&|3)oD8P!I^h`Ip#=+`c zM(3+{lhCE!S0&FQtH(x~^189QQmx}qxYD_yu^giDeT&VA|FvzUes;a<$RuJ&8rVR< zarpBNm*F_%$bskS5-d)IBfn4e>aw zBC5lfhpnn7Ej3u&+o91@Rv5_h{9BLalG+2@@8b0+{3>Af;CHrpQK@@{I}Vtas#3T~ zXjg2jm)gimEO7TVs>MewO`!mS8169J+aVTk=O99)B3d4RJ&^SKAykFyH38;WCYP!N zYXZ|KQU)~83^M#nR;kk}Gp3k0LL1IeFr2*F+H z!RC8Ytx@My(N~g@M+Uy(IV7S?s6#M~7OYGePi+*q2fUFwwyJ&5(D|xV!y5;pCuG$s zS*`_c2--}hU@deATi%3S4?0@DPRX`d&9y1jBZ}`pC10v88>KSL2@Wa)eT;bVTfR7t z+DJr>nh5RVITMM%xlNhXbO1^ z2wQrD~sIjn0i7$0vrRWqzVa?Xz4kYn3TgIOFTG8p@co)WPHFGP#fq+ zXaO^kSd8@d4CEK3IgC{qr#pSGcAY3NnpEm}TJr(dP)4=*BV(Z@1nKz-Nd&fnU7!xO ze=i=X8&c(};Yetlhhm3GvKEKF_A_3apwFRC`DbNds^F<%&6nUkF2r&sURzr!X?)B>AHEXoWm1u=0{gNz`q7g1u5?6PGCTh){%?d^LhWG<6Dhx Y7cw1;4RlhM@R5l5JNOV5@=-Y8AK!J^ZN@f|1t7#1uuib3TIg1$p4wV^r delta 519 zcmbOvd{uJ8YnI8}tkQ=1`U)W#sS1guB^mie3Yo_z3MKgpB^jx?#i==I zdRz)%keQ~SG1-?z!Yna4IlnZoBtA1mT~oo<)>fgoB(bElST8-b#4}GLS{*8{uA`t1 zR1&MHsZb3xVzL6O_+(R7-N`37gjvBxPVQjSo4kTmVe%z5naQu%q{KkhKs6UzDQMW( zL6jM=YsulaVsaL{^yEf%;mJ3c6`5-jY9|M>N!iE8!yIDgP>oxEX>n>%USe)4(4n<9 z`aYR?*-&dgvg>OqDA?%RY3e{j01^%$GB>{{)k+~PF{d~cA~`vpQ#2GLqYu#yVuCcM zWR@WWG_9cq)heU{b%KKhq7WJp;NaHsoYv3_w$Vo7Q7#!Mx~&9fO-FdJBNaVaPirIwTyPG(hV(Z&QNMgcfCxFoTpv{++v z6XObI3r%Y-E(L|6)RNMoJcYEP{9LbKjbg9@O}*mO5)JjlR diff --git a/app/soapbox/features/ui/util/pending_status_builder.js b/app/soapbox/features/ui/util/pending_status_builder.js index 6b55e4b7b873eb6895d97a28aeea2218436dc11b..1e07b1dc3832b1f7d72281e967508ca2eefa9ef5 100644 GIT binary patch delta 83 zcmbQo|CetsoYv3_w$Vo7Q7#ufjWHg9KM&un1L#igK7lv+|+l&1h! Z7YtUUkyezS>lLg4(W0qo%~fm71psu=A6x(c delta 117 zcmey%H;;cpuXJK^NoIatv3_Q5L4Hw5YLR|keo<~>PG(hV(Z>1znFQe6;F83W(qfIx z^O)B&TWDHyaVaPirIwTyz_@YZQYOXzCTGmT0IaCMV~Y=9Q@HC_q_29kte6 E0F9d~6#xJL diff --git a/app/soapbox/normalizers/status.js b/app/soapbox/normalizers/status.js index dc8886e356a421540990b0d65a9ba83d32681c4f..806048172c775a33d59bc6cccdff9335fc031a4c 100644 GIT binary patch delta 257 zcmZ9Gy$%6E6onJT7E_2?b-Ue7gx=OvDoPON5Ussd*v{Lslq%Xky=9x zgxvpt?yEobDzMk+W*BV+JcHUU6t#g^vZv+@ISR`zjG-uCIBL8-T3MB&8#8YB*ZwBu nCJbMjU7UzrB1EeN9YfwBNM@PN_2rxe_5WiOl@H?NbPwbMQ>t2Q delta 15 Wcmca9aE)(5$L1WyBDTqY*<%1U)dq0@ diff --git a/app/soapbox/reducers/statuses.js b/app/soapbox/reducers/statuses.js index c6e06e242fbac6e1a8deed46920cf04c1f656060..733386c7ef502418ece2d1a9906427e633d38c28 100644 GIT binary patch delta 1845 zcma)7&2HO95Jqj}P@%o|IENrhrYcz!2!cql1J||Dq6ktTy;(v+kt1oHhtu_*&iy5?H1KRTFxJ5=KJ>3PxpR%@Q~My(iYH^MT0-$r9D>C zqO_+0jv8xMXy8e*-^`FtJSMitFWUFLHv>`J4_y*qrf@h^{l z-G2Vj#}ACvyg62NQ&>LZg4^|JjEBv&LMzLK$=&Pz`18?TTdDeoLc4YjK;i{_^XzGO zPSWvUP%3FG)Ws`2aa}zv8Vb``DqX?BVLW9EvLu6&Pm=JK5jafb9M`8o$h!caGK*k2OsEA9MCC(^ZtKk?F27tobH{H2tOzF zl#3*AEbP0r)U89tDewpUn9pG#ynU2!UMxuE>cWYrgJ5l(3jfgbGu) zGID{{q;@pdO)JwZTX}INY2<}iJ r@_n#*_xIk(-uAEkueL{bs)xkfPLP5c+@cQw;JPQ@$-Ce0y#DkbIYMn+ delta 29 lcmbPf+O0Ox+;QTXzRlH)W=xyqxonsw_wuA{Hs(#^1puNN3CjQg From f1f784f751cc1d8cde81a83b523eb2b1f1f52f12 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 20 Feb 2022 03:38:22 -0500 Subject: [PATCH 06/31] normalizeStatus: fix tests, fixQuote fix --- .../reducers/__tests__/statuses-test.js | Bin 4879 -> 4724 bytes app/soapbox/reducers/statuses.js | Bin 6809 -> 6763 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/reducers/__tests__/statuses-test.js b/app/soapbox/reducers/__tests__/statuses-test.js index 926c9a867c2a6bc90ce7b70d910ef5d6086132ed..94204d5bccc9d62fb8677f3c2fbb8b815c00b3aa 100644 GIT binary patch delta 58 zcmV-A0LA~0CiEnbe6hnm1PO6 diff --git a/app/soapbox/reducers/statuses.js b/app/soapbox/reducers/statuses.js index 733386c7ef502418ece2d1a9906427e633d38c28..1d0d5eb481cdf9843c4d31324c9b9c4879119a7e 100644 GIT binary patch delta 75 zcmbPf`r2f}bQbaO%#sWZjeH%2JWT~#JB2)jni>TlZ}JQl-N~m}bSD30(U`2w8os%U fHGp-p5}Wd7ZSEb69HqrN3i&xH!JD7+Y~lp~tJ)Z} delta 79 zcmaEDGShU!bQVU9$?I5j*>n{0N^^21-)7N)G1*x)U`&11a1Mo<8nBYhZL9&Tlf`*l UHoxII%E*$cqfoqgC(kBc00y=h)Bpeg From c99415a868ba6053cbf5d08e18688eedb5d9c3be Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 20 Feb 2022 12:16:53 -0500 Subject: [PATCH 07/31] Fix status importing --- app/soapbox/actions/importer/index.js | Bin 3545 -> 3617 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/actions/importer/index.js b/app/soapbox/actions/importer/index.js index 8599e7dbc379c7423bf11ae064ea796272d9fc2c..3792ea7c094ac007f4e3db7bd12d2613ec7e6a9e 100644 GIT binary patch delta 72 zcmca9y-;R@G8b=Neo<~>PH;(LNojHFWI?W885EIXy@Jx>42@#2yr%W$>0D||>`)b( J_wh(G0sz|i8ejkb delta 23 fcmZ1|b5nYQGS_4$uIkMXxa64_i#N0JN;3igV Date: Sun, 20 Feb 2022 12:44:10 -0500 Subject: [PATCH 08/31] Add back expandSpoilers --- app/soapbox/__fixtures__/status-cw.json | 63 ++++++++++++++++++ app/soapbox/actions/importer/index.js | Bin 3617 -> 3945 bytes .../reducers/__tests__/statuses-test.js | Bin 4724 -> 5347 bytes app/soapbox/reducers/statuses.js | Bin 6763 -> 6956 bytes 4 files changed, 63 insertions(+) create mode 100644 app/soapbox/__fixtures__/status-cw.json diff --git a/app/soapbox/__fixtures__/status-cw.json b/app/soapbox/__fixtures__/status-cw.json new file mode 100644 index 0000000000..af9978cfb4 --- /dev/null +++ b/app/soapbox/__fixtures__/status-cw.json @@ -0,0 +1,63 @@ +{ + "id": "107831528995252317", + "created_at": "2022-02-20T17:35:55.224Z", + "in_reply_to_id": null, + "in_reply_to_account_id": null, + "sensitive": true, + "spoiler_text": "testing", + "visibility": "public", + "language": "en", + "uri": "https://fedibird.com/users/alex/statuses/107831528995252317", + "url": "https://fedibird.com/@alex/107831528995252317", + "replies_count": 0, + "reblogs_count": 0, + "favourites_count": 0, + "emoji_reactions_count": 0, + "emoji_reactions": [], + "content": "

hello world

", + "reblog": null, + "application": { + "name": "Web", + "website": null + }, + "account": { + "id": "66768", + "username": "alex", + "acct": "alex", + "display_name": "", + "locked": false, + "bot": false, + "cat": false, + "discoverable": null, + "group": false, + "created_at": "2020-01-27T00:00:00.000Z", + "note": "

", + "url": "https://fedibird.com/@alex", + "avatar": "https://fedibird.com/avatars/original/missing.png", + "avatar_static": "https://fedibird.com/avatars/original/missing.png", + "header": "https://fedibird.com/headers/original/missing.png", + "header_static": "https://fedibird.com/headers/original/missing.png", + "followers_count": 1, + "following_count": 1, + "subscribing_count": 0, + "statuses_count": 5, + "last_status_at": "2022-02-20", + "emojis": [], + "fields": [], + "other_settings": { + "noindex": false, + "hide_network": false, + "hide_statuses_count": false, + "hide_following_count": false, + "hide_followers_count": false, + "enable_reaction": true + } + }, + "media_attachments": [], + "mentions": [], + "tags": [], + "emojis": [], + "card": null, + "poll": null, + "quote": null +} diff --git a/app/soapbox/actions/importer/index.js b/app/soapbox/actions/importer/index.js index 3792ea7c094ac007f4e3db7bd12d2613ec7e6a9e..56efcf651703eccec0739d78b6f772fa96c628e9 100644 GIT binary patch delta 293 zcmZ1|^HNSHGq)hWs6?S!Aw9JuIJKlCGcUbZp;jTSC_h(0T~ANH7%HZ2&Be8$pK06p!vz4nU}q8l delta 29 lcmaDUw@_xIPCwIRV`kmS2`sXcCo{`U)?`uKoWR1#4FHuh2#^2( diff --git a/app/soapbox/reducers/__tests__/statuses-test.js b/app/soapbox/reducers/__tests__/statuses-test.js index 94204d5bccc9d62fb8677f3c2fbb8b815c00b3aa..0ca31c745cd553514324fd0d3a0ee82202a0a9b6 100644 GIT binary patch delta 359 zcmeyO@>p|&8^0iz0uW@DXsBmorlb}tIEPPO%WBVAT#{H)TCAH~KG~YjesU%gFB?!g zB{gqyH=k_1UV3VYXP!p1x}kx&g|VTjk%gtDsgbFXv7x!TjsnOapi1>vO>3~(3JR$e z1*yp;8W3?!y^?&VRE?6N(p0E|S|AN~1yF5bUJA$^#R}yasd*sHK!Mfpyu_rO)Rf8VSnW_8YOSk-rrb&aWRF5E)B**C Date: Mon, 21 Feb 2022 03:17:52 -0500 Subject: [PATCH 09/31] Fix error in ErrorBoundary --- app/soapbox/components/error_boundary.js | Bin 3017 -> 3015 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/components/error_boundary.js b/app/soapbox/components/error_boundary.js index b7394457520263d10acc65d4f6163175cf6b2629..1f817f8d8e6af76fe21eb041b2501839c65c6202 100644 GIT binary patch delta 16 YcmX>peq4ORF1E>aTpXK^u(7fN06M`1*#H0l delta 12 TcmX>ueo}nHF1F1(*!WoiBvb^n From 5afd1ce4b3527ff2b0aedd5ff1799e90f604a6a2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 21 Feb 2022 03:56:31 -0500 Subject: [PATCH 10/31] Fix PendingStatus --- .../features/scheduled_statuses/builder.js | Bin 1370 -> 1448 bytes .../components/scheduled_status.js | Bin 3549 -> 3678 bytes .../features/ui/components/pending_status.js | Bin 5749 -> 4304 bytes .../ui/util/pending_status_builder.js | Bin 1917 -> 2058 bytes app/soapbox/reducers/statuses.js | Bin 6956 -> 6963 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/scheduled_statuses/builder.js b/app/soapbox/features/scheduled_statuses/builder.js index d9ba1fdf9775dbfb46ce50dbf5ca3073addf80e8..2849f553962f418a9f803ddc5f39838bfd735f64 100644 GIT binary patch delta 87 zcmcb`wSs#>jzMx_PI75ZVo7RnNn%N9u|lmvT2X$kf_ia&VnI@Vg?>?LN@;RxQL%n8 aSUz=Q{B;%qG))?l%~<8xG_AR6t+@cq*dOKq delta 47 zcmZ3%eT!>C&c>CeSXA=zi*gflGOJR9OA<>;i#5`U@^ig{HHyJJO-*aAT5B!<)k+c5 diff --git a/app/soapbox/features/scheduled_statuses/components/scheduled_status.js b/app/soapbox/features/scheduled_statuses/components/scheduled_status.js index b47e2b6d02b72b67e67b4d068d606eaa9fb8b285..c79de8af124113a089bc74e0670e017591d4a720 100644 GIT binary patch delta 95 zcmcaBeNSeC43lthNn%N9aZqYOPNi>ZUP)$tUh!l@Mk&!^uy}kCNFqKLDzjOLX$Pk~ Vied$bLfdKxU8|tKc?-8D69CneBq;y@ delta 17 Ycmca7b60wU4AbTergfZ~y?KP006q5wv;Y7A diff --git a/app/soapbox/features/ui/components/pending_status.js b/app/soapbox/features/ui/components/pending_status.js index 0968558582217cf7798e1a801b4376364e00e750..e788819a6013501d6ba14875e1e8ac34d648c33a 100644 GIT binary patch delta 108 zcmeyWb3t)J-^K++jKaYsi6y1QL8%2fmAaG57i zguC@2lv%p;1$+gcz?DnIoBx?~S_) z14M+yQ2?4EKHupsq7-Gns%aHTQ+xnMv%NK|EbW*mOJJ7?2H7WS_&H>PV~-UanJA;i z4W_^rAtVKE$`e0~2yX^oU@s=rOv-+9Xz9BQ9DzY+IDoN-DSd@~QlP5ZvhBhZSlcA0`l@;yQxXL-OcKS7VVcV7H97!Dv5jDYJxZEJ&eyz$mLk5W51+`{wb+vO}1Klp&A+YZ49dO}*Qxv1TT&h~)OuMLyh$MpVaLr;MAZ;yRF( zAl__H#AY?rN=TQ)bH_y6>%qQ0@bOG5j9^-z8RDmMfANmY&9cg%oIbyyeu{K;Tp^hi zPE&Rh1ZZ6s#?aFBR6C2B{ajV$W?QfiyStayZqv-u$jigVfdff)26(1e1QlWO-pK1P zk_X4g??_)(<6Np?RnIG0u4G~i9rq%iy?(fi+vn|_guQjCT=u{rQMS$Hq0@A}RPTLn F{R1OsiDv)+ diff --git a/app/soapbox/features/ui/util/pending_status_builder.js b/app/soapbox/features/ui/util/pending_status_builder.js index 1e07b1dc3832b1f7d72281e967508ca2eefa9ef5..552e7e7ac633e6cff17d5794a306d2537ed23b37 100644 GIT binary patch delta 177 zcmey%*CjB)PgF<2H?cq=u~@+~H@CDTF)1e%$e+kBIx*S9AUQE7xilxSBsI7sv81$E zp;jTSC_h(0y*NLyASu5>zbG}OG&!}XSicx7pSp403MQ43e4otX5)Dng+{6Nn+|<01 w%=|nBTRRlP=OBV)4 delta 12 TcmdmNw#IA&Bim*UHf>P=9VY{X From 1224044876d32dc24e241f3c4394b5ccb92ea66e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 21 Feb 2022 19:21:13 -0500 Subject: [PATCH 11/31] Fix post without mentions --- app/soapbox/normalizers/status.js | Bin 2137 -> 2207 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/normalizers/status.js b/app/soapbox/normalizers/status.js index 806048172c775a33d59bc6cccdff9335fc031a4c..084b20102c39ab7169b60ca03e6fd69b328aa8b1 100644 GIT binary patch delta 86 zcmca9Fkf(kIwQYlZflEjkIV!ia# W5)E~jsJf;?O^pJY&dsrmf7k#EVIDOA delta 19 bcmbO)cvE15IwMnb>|`@Wi_Oa!f3N`nK;s67 From 5e18691ab54120c5bdcf098beb7aa3c6d5db9f4d Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 23 Feb 2022 12:37:12 -0500 Subject: [PATCH 12/31] Fix custom emoji parsing --- .../__fixtures__/status-custom-emoji.json | 126 ++++++++++++++++++ .../reducers/__tests__/statuses-test.js | Bin 5347 -> 6328 bytes app/soapbox/reducers/statuses.js | Bin 6963 -> 6970 bytes 3 files changed, 126 insertions(+) create mode 100644 app/soapbox/__fixtures__/status-custom-emoji.json diff --git a/app/soapbox/__fixtures__/status-custom-emoji.json b/app/soapbox/__fixtures__/status-custom-emoji.json new file mode 100644 index 0000000000..ac3f184ee4 --- /dev/null +++ b/app/soapbox/__fixtures__/status-custom-emoji.json @@ -0,0 +1,126 @@ +{ + "account": { + "acct": "benis911", + "avatar": "https://gleasonator.com/images/avi.png", + "avatar_static": "https://gleasonator.com/images/avi.png", + "bot": false, + "created_at": "2021-03-26T20:42:11.000Z", + "display_name": "benis911", + "emojis": [], + "fields": [], + "followers_count": 0, + "following_count": 0, + "fqn": "benis911@gleasonator.com", + "header": "https://media.gleasonator.com/fc595bbbcf5aabefecd1c2adfe5b7f5457db59847992881668653a0338ba25bd.jpg", + "header_static": "https://media.gleasonator.com/fc595bbbcf5aabefecd1c2adfe5b7f5457db59847992881668653a0338ba25bd.jpg", + "id": "A5c5LK7EJTFR0u26Pg", + "last_status_at": "2022-02-23T17:31:08", + "locked": true, + "note": "hello world 2", + "pleroma": { + "accepts_chat_messages": true, + "also_known_as": [ + "https://gleasonator.com/users/alex", + "https://poa.st/users/alex" + ], + "ap_id": "https://gleasonator.com/users/benis911", + "background_image": null, + "birthday": "2000-01-25", + "favicon": "https://gleasonator.com/favicon.png", + "hide_favorites": true, + "hide_followers": true, + "hide_followers_count": true, + "hide_follows": true, + "hide_follows_count": true, + "is_admin": false, + "is_confirmed": true, + "is_moderator": false, + "is_suggested": false, + "relationship": {}, + "skip_thread_containment": false, + "tags": [] + }, + "source": { + "fields": [], + "note": "hello world 2", + "pleroma": { + "actor_type": "Person", + "discoverable": false + }, + "sensitive": false + }, + "statuses_count": 152, + "url": "https://gleasonator.com/users/benis911", + "username": "benis911" + }, + "application": { + "name": "Soapbox FE", + "website": "https://soapbox.pub/" + }, + "bookmarked": false, + "card": null, + "content": "Hello :ablobcathyper: :ageblobcat: 😂 world 😋 test :blobcatphoto:", + "created_at": "2022-02-23T17:31:07.000Z", + "emojis": [ + { + "shortcode": "ablobcathyper", + "static_url": "https://gleasonator.com/emoji/blobcat/ablobcathyper.png", + "url": "https://gleasonator.com/emoji/blobcat/ablobcathyper.png", + "visible_in_picker": false + }, + { + "shortcode": "ageblobcat", + "static_url": "https://gleasonator.com/emoji/blobcat/ageblobcat.png", + "url": "https://gleasonator.com/emoji/blobcat/ageblobcat.png", + "visible_in_picker": false + }, + { + "shortcode": "blobcatphoto", + "static_url": "https://gleasonator.com/emoji/blobcat/blobcatphoto.png", + "url": "https://gleasonator.com/emoji/blobcat/blobcatphoto.png", + "visible_in_picker": false + } + ], + "favourited": false, + "favourites_count": 0, + "id": "AGm7uC9DaAIGUa4KYK", + "in_reply_to_account_id": null, + "in_reply_to_id": null, + "language": null, + "media_attachments": [], + "mentions": [], + "muted": false, + "pinned": false, + "pleroma": { + "content": { + "text/plain": "Hello :ablobcathyper: :ageblobcat: 😂 world 😋 test :blobcatphoto:" + }, + "conversation_id": "AGm7uC3BwZTOBtFW9w", + "direct_conversation_id": null, + "emoji_reactions": [], + "expires_at": null, + "in_reply_to_account_acct": null, + "local": true, + "parent_visible": false, + "pinned_at": null, + "quote": null, + "quote_url": null, + "quote_visible": false, + "spoiler_text": { + "text/plain": "" + }, + "thread_muted": false + }, + "poll": null, + "reblog": null, + "reblogged": false, + "reblogs_count": 0, + "replies_count": 0, + "sensitive": false, + "spoiler_text": "", + "tags": [], + "text": null, + "uri": "https://gleasonator.com/objects/2dc79219-aed6-40c0-8818-0c2d26ed3436", + "url": "https://gleasonator.com/notice/AGm7uC9DaAIGUa4KYK", + "visibility": "public" +} diff --git a/app/soapbox/reducers/__tests__/statuses-test.js b/app/soapbox/reducers/__tests__/statuses-test.js index 0ca31c745cd553514324fd0d3a0ee82202a0a9b6..779c0e847f8ae118b69f638bcf4aa2f0cdb54834 100644 GIT binary patch delta 783 zcmbV}!Ab%_9LB-Oiil9V1Rln{Y(csjp(Jf#1zL9P(5-PD*R|Q5W#_+zr-iQ3A?DIe zdVnD4P;U`EK&M`yM`(4I+!P_Ze$4lMzyCL%>#v2Um&7VU2CT_8b~xckb2%^*5tDTc z@i@De;()>B*+9<*dT;qe81Y3)I~>(+GhmTrN96HsCr%r2&a+@$S-dBac#9>) zd14_`shTDCVEYhPj;g14tA19OH;}9`3y1|ZFsVqV(y@Ia9+p Date: Wed, 23 Feb 2022 12:42:04 -0500 Subject: [PATCH 13/31] ErrorBoundary: display Soapbox version --- app/soapbox/components/error_boundary.js | Bin 3015 -> 3159 bytes app/styles/components/error-boundary.scss | 5 +++++ 2 files changed, 5 insertions(+) diff --git a/app/soapbox/components/error_boundary.js b/app/soapbox/components/error_boundary.js index 1f817f8d8e6af76fe21eb041b2501839c65c6202..2e7c3f717f2110dd324b66ab436f0cd4c00f8f98 100644 GIT binary patch delta 121 zcmX>ueqCb1C9TZdg8ZTqh2s3uqU2QP{FGFMw4(f61@+?m#Db*!3jNZO%$#EVWT3>x z^I;s5=Wz&Fm8BLHXXfXr+f^fU>7`^A7vv;X`X%P3)+!)NKvmb;=oi>+=HcAU1ORMs BF3kV{ delta 15 XcmcaEaa?@DrH%iCIW}+QT*L$bKjjBd diff --git a/app/styles/components/error-boundary.scss b/app/styles/components/error-boundary.scss index b809a1efa4..fbf515c128 100644 --- a/app/styles/components/error-boundary.scss +++ b/app/styles/components/error-boundary.scss @@ -63,6 +63,11 @@ } } + &__version { + font-size: 12px; + margin: 6px 0; + } + p.help-text { text-align: left; font-style: italic; From 717a0917a3aaf26f0a85482b111f9ef122386ab8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 23 Feb 2022 15:42:05 -0500 Subject: [PATCH 14/31] pendingStatus: fix media uploads --- .../ui/util/pending_status_builder.js | Bin 2058 -> 2072 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/ui/util/pending_status_builder.js b/app/soapbox/features/ui/util/pending_status_builder.js index 552e7e7ac633e6cff17d5794a306d2537ed23b37..433436d56bf5a1466c58cfd89d440db6aefd8d6c 100644 GIT binary patch delta 33 ocmeAYm?5x1noYzrH@CDTF)1h2H?csYS|Kw Date: Wed, 23 Feb 2022 18:02:24 -0500 Subject: [PATCH 15/31] normalizeStatus: refactor baseStatus --- app/soapbox/normalizers/status.js | Bin 2207 -> 2269 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/normalizers/status.js b/app/soapbox/normalizers/status.js index 084b20102c39ab7169b60ca03e6fd69b328aa8b1..02525ec3b153ec06cdaaf008d1ea996179e15ee4 100644 GIT binary patch delta 240 zcmbO)cvo=3>H4I^;?&@h#FElt1zQEr+}zTV#H5^5-^2oqYAywZ)ZF~6%wj8qgimI1 ziH4>QP^!2fKQkw_D83}MqQpu;T^%Hro0?aWnV*MEL#?JY7gsV+t^}y6C_U9BH7zqQ zHN_rit44lKN?2l!jzV5)Igr*=u(eZw2r1aw+A5Uhr9jjw*h5t)SV85jxh5X5QFKX7 XEeOvn$xlF delta 152 zcmcaBIA3tW>B$oqP1Q82xfFmPH8(#iv)D?ZxFoTpv{)}awM0W5BBrjXP*XGUgGi); yLUBQUW=?8Rd`W6W393?L8L$Qgb#)!E!MUk Date: Wed, 23 Feb 2022 18:04:20 -0500 Subject: [PATCH 16/31] Add GoToSocial fixtures --- .../__fixtures__/gotosocial-account.json | 27 ++++++++++ .../__fixtures__/gotosocial-instance.json | 42 ++++++++++++++++ .../__fixtures__/gotosocial-status.json | 50 +++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 app/soapbox/__fixtures__/gotosocial-account.json create mode 100644 app/soapbox/__fixtures__/gotosocial-instance.json create mode 100644 app/soapbox/__fixtures__/gotosocial-status.json diff --git a/app/soapbox/__fixtures__/gotosocial-account.json b/app/soapbox/__fixtures__/gotosocial-account.json new file mode 100644 index 0000000000..3700bc4735 --- /dev/null +++ b/app/soapbox/__fixtures__/gotosocial-account.json @@ -0,0 +1,27 @@ +{ + "id": "00YSECR4P7E64BD5MBA639PRVT", + "username": "alex", + "acct": "alex", + "display_name": "Alex Gleason", + "locked": false, + "bot": false, + "created_at": "2022-02-23T22:43:55Z", + "note": "

My GoToSocial profile

", + "url": "http://localhost/@alex", + "avatar": "", + "avatar_static": "", + "header": "", + "header_static": "", + "followers_count": 0, + "following_count": 0, + "statuses_count": 1, + "last_status_at": "2022-02-23T22:54:14Z", + "emojis": [], + "fields": [], + "source": { + "privacy": "unlisted", + "language": "en", + "note": "

My GoToSocial profile

", + "fields": [] + } +} diff --git a/app/soapbox/__fixtures__/gotosocial-instance.json b/app/soapbox/__fixtures__/gotosocial-instance.json new file mode 100644 index 0000000000..fdaf4c96b4 --- /dev/null +++ b/app/soapbox/__fixtures__/gotosocial-instance.json @@ -0,0 +1,42 @@ +{ + "uri": "http://localhost", + "title": "localhost", + "description": "", + "short_description": "", + "email": "", + "version": "0.2.0 31935ee", + "registrations": true, + "approval_required": true, + "invites_enabled": false, + "urls": { + "streaming_api": "wss://localhost" + }, + "stats": { + "domain_count": 0, + "status_count": 1, + "user_count": 1 + }, + "thumbnail": "", + "contact_account": { + "id": "", + "username": "", + "acct": "", + "display_name": "", + "locked": false, + "bot": false, + "created_at": "", + "note": "", + "url": "", + "avatar": "", + "avatar_static": "", + "header": "", + "header_static": "", + "followers_count": 0, + "following_count": 0, + "statuses_count": 0, + "last_status_at": "", + "emojis": null, + "fields": null + }, + "max_toot_chars": 5000 +} diff --git a/app/soapbox/__fixtures__/gotosocial-status.json b/app/soapbox/__fixtures__/gotosocial-status.json new file mode 100644 index 0000000000..3546482b27 --- /dev/null +++ b/app/soapbox/__fixtures__/gotosocial-status.json @@ -0,0 +1,50 @@ +{ + "id": "01FWMCNM07GGDV8HF40NZ9YTGR", + "created_at": "2022-02-23T22:54:14Z", + "sensitive": false, + "spoiler_text": "", + "visibility": "public", + "language": "en", + "uri": "http://localhost/users/alex/statuses/01FWMCNM07GGDV8HF40NZ9YTGR", + "url": "http://localhost/@alex/statuses/01FWMCNM07GGDV8HF40NZ9YTGR", + "replies_count": 0, + "reblogs_count": 0, + "favourites_count": 0, + "favourited": false, + "reblogged": false, + "muted": false, + "bookmarked": false, + "content": "

Hello GoToSocial!

", + "application": { + "name": "Soapbox FE", + "website": "https://soapbox.pub/" + }, + "account": { + "id": "00YSECR4P7E64BD5MBA639PRVT", + "username": "alex", + "acct": "alex", + "display_name": "alex", + "locked": false, + "bot": false, + "created_at": "2022-02-23T22:43:55Z", + "note": "", + "url": "http://localhost/@alex", + "avatar": "", + "avatar_static": "", + "header": "", + "header_static": "", + "followers_count": 0, + "following_count": 0, + "statuses_count": 1, + "last_status_at": "2022-02-23T22:54:14Z", + "emojis": [], + "fields": [] + }, + "media_attachments": [], + "mentions": [], + "tags": [], + "emojis": [], + "card": null, + "poll": null, + "text": "Hello GoToSocial!" +} From 34ba2505bdd8c6a30c9f8ffaa0a2cbd72ceed11f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 23 Feb 2022 18:25:38 -0500 Subject: [PATCH 17/31] normalizeStatus: normalize quote post --- .../normalizers/__tests__/status-test.js | Bin 3187 -> 3510 bytes app/soapbox/normalizers/status.js | Bin 2269 -> 2540 bytes app/soapbox/reducers/statuses.js | Bin 6970 -> 6992 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/normalizers/__tests__/status-test.js b/app/soapbox/normalizers/__tests__/status-test.js index 6543543738e2f90e53c6fccd3decf5f590e1a09c..ae9052ccca65e38eed15675414080b22c8706c16 100644 GIT binary patch delta 201 zcmew?u}ykIK935QfspjLO@PxQGRZsLSbosNvc9YesRgQ&X=b-?gwbF-N1gB(bElST8-b#4}GLTD<^bn!1jH zIz(x#rlvK}QU!(7ih|VS5{;tN;?kTFyy}5wJEdxr=B1>jW#*-(fc4h`Ng!tA0syh! BLlgi2 delta 12 Tcmdlc{aIo|J`YQ+rZpD;ALj%2 diff --git a/app/soapbox/normalizers/status.js b/app/soapbox/normalizers/status.js index 02525ec3b153ec06cdaaf008d1ea996179e15ee4..f6f8fccb36af17a2080368464fffd811101d7d11 100644 GIT binary patch delta 217 zcmcaB_(pgGCx@ZFzJhOlS*k)wMyf(#X?_Wil@I2Wp=l%MRvAzxpTSW;T7S6YygSdyxt4%Vx#12x0e4$7#hQ7DEeOiwNG%+rWgFUUzP z%Fj&%DuwEa)l>kg$}7#u(X{4L00O9nl+>Kml2lxJtl5BSYc;JWvv5q~fV-`SBM<;1 C%t?{} delta 15 XcmaDOd{=M-C&y$a&WV#(aykP5FL4EC diff --git a/app/soapbox/reducers/statuses.js b/app/soapbox/reducers/statuses.js index aca48b9c103908b7330c0d4d997b90b48e2023ff..d06b0acecfbe6f8b44bb9b3524231d8bf2b2b3e4 100644 GIT binary patch delta 83 zcmdmGcEM~zBJ1W}*5fRW`uYma8L7$H3gsE8B^jwj3W*BEC5a`a#R{3lKz3nieo3lA lQl&z1YI1&FN@7u^LUKl8QDSmQYEfo!NoI2K=3uVp0ssewA143+ delta 21 dcmca$w##foBJ1R}T*{jxSTC?_&f Date: Wed, 23 Feb 2022 20:00:49 -0500 Subject: [PATCH 18/31] Simplify scheduled/pending status builders --- .../features/scheduled_statuses/builder.js | Bin 1448 -> 1077 bytes .../ui/util/pending_status_builder.js | Bin 2072 -> 1710 bytes app/soapbox/normalizers/status.js | Bin 2540 -> 2920 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/scheduled_statuses/builder.js b/app/soapbox/features/scheduled_statuses/builder.js index 2849f553962f418a9f803ddc5f39838bfd735f64..6b3d1a4f8f240f4e9ae4f15bb9c4c62276cbe289 100644 GIT binary patch delta 35 tcmV+;0Nnqm3$+Na(gBkY0;7}j0xy$9116Jx13{Da10IuT1Spfl1my5J4OjpG delta 359 zcmdnWv4VTUB}R+Hf`XjPC$%WPB((zQ33YXd(vrk9c diff --git a/app/soapbox/features/ui/util/pending_status_builder.js b/app/soapbox/features/ui/util/pending_status_builder.js index 433436d56bf5a1466c58cfd89d440db6aefd8d6c..293aabfb555e742dcb3e8dba4941b9ebd898b9cc 100644 GIT binary patch delta 159 zcmbOsu#R_v4ilHcL>*;AE(HbO!~%uHVg=9K+|rW7q?}YBUk51clUZDXA`TMJ;hHEQ zvaw<-^WQ27LYG9y)FaV@bLsL^PH?cq?GeyDH4j~0JTccV5C|EmL dpG}OVAU`K(@_bg&$<1s|lO@^BCeLNB1^~>uGkE|2 delta 481 zcmZ9JKTE_g7{&)%2SL3-_kiHFP!A{3;-5u92OV_~DR0~NO1v})X`_PN;Nt925C=bl z;NVyA+c>+LUe30f?fK>5&GSBaTYTv~1(U(r3ONNypdcrCu1km+8a-KFeSiL#+Xg8a zO`xQLhlFd!f(2quEW{`WHNrF`Ltq73oPaW*wpB;Y<3*wnN=zdt4a8e=Xq4w$E9T;w z79qL3vU&(NLMv+Qe8MGNxpUzGXlBtg9?}J~?!4dVoBE6>?}(=3rs6i sXqv^AR^RUKaUlg|sG<_@%&Psq9Z*8nY0BQUe_>i{ty-~KR2%aTKWSf=*8l(j diff --git a/app/soapbox/normalizers/status.js b/app/soapbox/normalizers/status.js index f6f8fccb36af17a2080368464fffd811101d7d11..288a074982cf53bd536207710178525bf99d3d3b 100644 GIT binary patch delta 384 zcmZutF=_)b5X86%ZXHZ2qwbvGB5AKqpC^btc`X+2NkS(%xXKrD`ASOv$0T5kpAad* zxjS&Dnc30K>~Z=vd;fj`=a>`(vZfR!GA}1WRMu{4@Ecr}Vh!A2CKdPuFC)q$1YAi7 ziNja%oY3Na*&gO^YuMW8DXBg8KiNoSqe-sE{3#jf(eX|OD?$A#l6q_UdY@-7I)cV7 zP>m*+Xv+3{OLZJ>cVx^Uj>n3v?%aP^Uzr)^&0z^U?qhT}4xro9>>*VyMN#Bd(evfG VrG_eE3cJL(SfyhZpHHLx%@5~Bf;RvF delta 36 scmaDM_C|QZ%gNS^(gMW=`I$MXMe!x66(v>*>gtnEFv@RU&$N>R01x90+W-In From cd6d575ae900a72c4f52d26eb87313b01525ae3c Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 23 Feb 2022 20:37:38 -0500 Subject: [PATCH 19/31] Simplify pending status builder --- .../ui/util/pending_status_builder.js | Bin 1710 -> 1519 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/ui/util/pending_status_builder.js b/app/soapbox/features/ui/util/pending_status_builder.js index 293aabfb555e742dcb3e8dba4941b9ebd898b9cc..374d79c649395b12a36d6385bbfb1c7163767217 100644 GIT binary patch delta 347 zcmZ3-`<~k*Gq)hWs6?S!!8fr$A+cD&GdH)iBrz!`70B07@X0JLK@kNB=uG60nK*6o zWD7>Q$@3Xixw(?_^MK0IQ%ig&7ch&nD%jd7R8MwfG7>3DEh#O^LzoHDJ=vOBe)2x% zbWMfSoZ?i4YAyvJz@|_`(;6sO%T+r$m@#PbCq{cw1qFyrnR!8}1v!-=`JO2Xwv%Tw zsW4hkR%N-Bl9-&FUz%4EpP6E%P+XE&lBx%ElV_erv^t1aTAW&}uA_jYSw}$~szp6k zMyNGHLoNS=yQ#N)V!3;y!2qO9h#fx IunI8(04_gvP5=M^ delta 522 zcmZutKTE?v6en##j1*kvqG1BVL`G*lm@OVacodDbcO5d)v~!FN zaG3-wVL^{+@D#Lj&}!`>sN=R From 02f05abeaa8f62aa8db926bc1302c0398979b570 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 23 Feb 2022 22:11:40 -0500 Subject: [PATCH 20/31] More defensive status normalization --- .../features/scheduled_statuses/builder.js | Bin 1077 -> 1096 bytes .../ui/util/pending_status_builder.js | Bin 1519 -> 1506 bytes app/soapbox/normalizers/status.js | Bin 2920 -> 3441 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/scheduled_statuses/builder.js b/app/soapbox/features/scheduled_statuses/builder.js index 6b3d1a4f8f240f4e9ae4f15bb9c4c62276cbe289..8e3417582ae2e2a03ca5d169d8088296addce27b 100644 GIT binary patch delta 76 zcmdnWae_l8Gq)hWs6?S!!8fr$A+cD&GdH)iBrz!`70BPnzk!h#SwLg+enwL!M$O4z Un00uIOA<>;i#0W^xoWMs01^6u_XgIJGD*F*nsp0jg53xF9F9L_^&{T{GGsRtKsqF*&&eu4MB!Mp4Gi63mMk g!PXpLc`Z#IFQSe$7Ja`ZfYqF^e$)@aXirN;zSJ)R3 z>d}*DA4KpZ;#oIMgQ$Dh!^}V5{QtbJystkz78>eQEO!d!B59Wz`JOFA;<@9FZp2Qs+P>kY?@%yGQI(O^_egL delta 82 zcmV-Y0ImP=8t4|Vv;vdt0#dV61M~q9C~qtvZYdx=J|J%(e0(5olkNr_lWzs4lbZ)8 olg9@)vkwT&1d|*M3zJ9 Date: Wed, 23 Feb 2022 22:31:35 -0500 Subject: [PATCH 21/31] Normalize mentions, add tests --- .../ui/util/pending_status_builder.js | Bin 1506 -> 1459 bytes .../normalizers/__tests__/status-test.js | Bin 3510 -> 4277 bytes app/soapbox/normalizers/status.js | Bin 3441 -> 3425 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/ui/util/pending_status_builder.js b/app/soapbox/features/ui/util/pending_status_builder.js index b51b1ceedab0efd24a7c476bc16102473ca60292..7812dbec620f6edc4dd94c58495a31e089ab9809 100644 GIT binary patch delta 18 acmaFFy_tK%aYj~!#N_0X&A%C+GXnrd@dteX delta 65 zcmdnY{fK+RaYhp^1u#fVPA<`bvP+9oi}Dh4Q>_$0qI$&zIhiFI>JI9f(FU<#HJi^c HK4%61apDsx diff --git a/app/soapbox/normalizers/__tests__/status-test.js b/app/soapbox/normalizers/__tests__/status-test.js index ae9052ccca65e38eed15675414080b22c8706c16..8e32555a82bbcecf299975b79d824298be70fd47 100644 GIT binary patch delta 380 zcmaKn%}T>S5XZrKstUb`f>K6MHlb2_t_V_)f>)2F$R?fCmC26oN3@1Kffpf9BBHP5 zE0`FKC*8vye)Id!$NS#f!E@1*i-mugq^O-@{co3TgAwtv&1z57#Cuim z77Nk9!%SHfDN=6rTf6lUskkz_07dn`WT%~-pW$$?+%>SK705Vt^^K#vU2P1r{ELr4 yNWzD+C84yerDHRUITcXMp(qFI;iOLgWgS*p;REmQpVM9U3T=ylL}>V5)xJbA4E delta 16 Xcmdn0xJ`OO?PggfGv>{k*qFHhG|2@x diff --git a/app/soapbox/normalizers/status.js b/app/soapbox/normalizers/status.js index 8377a1a513528801f288f75e0e621b286d094b20..38819fb2d30200a51471b5b01242fbf941ffd483 100644 GIT binary patch delta 44 rcmew;^-yX-6fpB6>{ From fe6ffc9bc5785aaf7f6a12f908fe7aaca0397955 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 23 Feb 2022 22:43:38 -0500 Subject: [PATCH 22/31] normalizeInstance(): add fixtures and tests for Fedibird, Mitra --- .../__fixtures__/fedibird-instance.json | 185 ++++++++++++++++++ app/soapbox/__fixtures__/mitra-instance.json | 13 ++ .../normalizers/__tests__/instance-test.js | Bin 2785 -> 3523 bytes 3 files changed, 198 insertions(+) create mode 100644 app/soapbox/__fixtures__/fedibird-instance.json create mode 100644 app/soapbox/__fixtures__/mitra-instance.json diff --git a/app/soapbox/__fixtures__/fedibird-instance.json b/app/soapbox/__fixtures__/fedibird-instance.json new file mode 100644 index 0000000000..31e17e34e0 --- /dev/null +++ b/app/soapbox/__fixtures__/fedibird-instance.json @@ -0,0 +1,185 @@ +{ + "uri": "fedibird.com", + "title": "Fedibird", + "short_description": "多くの独自機能を備えた、連合志向の汎用Mastodonサーバです。Fediverseの活動拠点としてご利用ください。", + "description": "多くの独自機能を備えた、連合志向の汎用Mastodonサーバです。Fediverseの活動拠点としてご利用ください。", + "email": "support@fedibird.com", + "version": "3.4.1", + "urls": { + "streaming_api": "wss://fedibird.com" + }, + "stats": { + "user_count": 1964, + "status_count": 4590304, + "domain_count": 9024 + }, + "thumbnail": "https://s3.fedibird.com/site_uploads/files/000/000/001/original/fedibird_hero_image.png", + "languages": [ + "ja" + ], + "registrations": true, + "approval_required": false, + "invites_enabled": true, + "configuration": { + "statuses": { + "max_characters": 500, + "max_media_attachments": 4, + "characters_reserved_per_url": 23, + "min_expiration": 60, + "max_expiration": 37152000, + "supported_expires_actions": [ + "delete", + "mark" + ] + }, + "media_attachments": { + "supported_mime_types": [ + "image/jpeg", + "image/png", + "image/gif", + "image/webp", + "image/heif", + "image/heic", + "video/webm", + "video/mp4", + "video/quicktime", + "video/ogg", + "audio/wave", + "audio/wav", + "audio/x-wav", + "audio/x-pn-wave", + "audio/ogg", + "audio/mpeg", + "audio/mp3", + "audio/webm", + "audio/flac", + "audio/aac", + "audio/m4a", + "audio/x-m4a", + "audio/mp4", + "audio/3gpp", + "video/x-ms-asf" + ], + "image_size_limit": 10485760, + "image_matrix_limit": 16777216, + "video_size_limit": 41943040, + "video_frame_rate_limit": 60, + "video_matrix_limit": 2304000 + }, + "polls": { + "max_options": 4, + "max_characters_per_option": 50, + "min_expiration": 300, + "max_expiration": 2629746 + }, + "emoji_reactions": { + "max_reactions": 20 + } + }, + "feature_quote": true, + "fedibird_capabilities": [ + "favourite_hashtag", + "favourite_domain", + "favourite_list", + "status_expire", + "follow_no_delivery", + "follow_hashtag", + "subscribe_account", + "subscribe_domain", + "subscribe_keyword", + "timeline_home_visibility", + "timeline_no_local", + "timeline_domain", + "timeline_group", + "timeline_group_directory", + "visibility_mutual", + "visibility_limited", + "emoji_reaction", + "misskey_birthday", + "misskey_location" + ], + "contact_account": { + "id": "1", + "username": "noellabo", + "acct": "noellabo", + "display_name": "のえる", + "locked": false, + "bot": false, + "cat": false, + "discoverable": true, + "group": false, + "created_at": "2019-08-15T00:00:00.000Z", + "note": "

主に、Fediverseへの関心に基づいた投稿を行うアカウントです。DTP・印刷に関する話をしたり、同人の話をしたり、カレーをブーストしたりします。

Mastodonサーバ『Fedibird』の管理者アカウントでもあります。ご連絡は当アカウントへ、サーバインフォメーションについては https://fedibird.com/about/more@info を参照してください。

", + "url": "https://fedibird.com/@noellabo", + "avatar": "https://s3.fedibird.com/accounts/avatars/000/000/001/original/6ef3b7f18f726755.png", + "avatar_static": "https://s3.fedibird.com/accounts/avatars/000/000/001/original/6ef3b7f18f726755.png", + "header": "https://s3.fedibird.com/accounts/headers/000/000/001/original/6a5a51722c094835.jpg", + "header_static": "https://s3.fedibird.com/accounts/headers/000/000/001/original/6a5a51722c094835.jpg", + "followers_count": 1560, + "following_count": 758, + "subscribing_count": 121, + "statuses_count": 61325, + "last_status_at": "2022-02-24", + "emojis": [ + { + "shortcode": "liberapay", + "url": "https://s3.fedibird.com/custom_emojis/images/000/025/634/original/5b8620742973f844.png", + "static_url": "https://s3.fedibird.com/custom_emojis/images/000/025/634/static/5b8620742973f844.png", + "visible_in_picker": true + }, + { + "shortcode": "mastodon", + "url": "https://s3.fedibird.com/custom_emojis/images/000/008/396/original/1317b6f8efcf8318.png", + "static_url": "https://s3.fedibird.com/custom_emojis/images/000/008/396/static/1317b6f8efcf8318.png", + "visible_in_picker": true + } + ], + "fields": [ + { + "name": ":liberapay: Liberapay", + "value": "https://liberapay.com/noellabo", + "verified_at": "2020-10-22T03:04:43.206+00:00" + }, + { + "name": ":mastodon: DTP-Mstdn.jp", + "value": "https://dtp-mstdn.jp/@noellabo", + "verified_at": "2020-05-23T00:14:02.232+00:00" + }, + { + "name": "別宅", + "value": "https://gorone.xyz/@noellabo", + "verified_at": "2021-08-11T07:48:53.479+00:00" + }, + { + "name": "bluesky community", + "value": "https://mastodon.blueskycommunity.net/@noellabo", + "verified_at": "2021-11-13T04:28:30.593+00:00" + } + ], + "other_settings": { + "birthday": null, + "location": "埼玉県", + "cat_ears_color": "#d5c5c0", + "noindex": false, + "hide_network": false, + "hide_statuses_count": false, + "hide_following_count": false, + "hide_followers_count": false, + "enable_reaction": true + } + }, + "rules": [ + { + "id": "2", + "text": "日本の法律と社会規範に従った行動を心がけてください" + }, + { + "id": "3", + "text": "不快や脅威に対してはブロック・ミュート・フィルターで距離をとってください" + }, + { + "id": "1", + "text": "投稿する際は、適切な公開範囲・CW・閲覧注意を使用してください" + } + ] +} diff --git a/app/soapbox/__fixtures__/mitra-instance.json b/app/soapbox/__fixtures__/mitra-instance.json new file mode 100644 index 0000000000..2c476ba304 --- /dev/null +++ b/app/soapbox/__fixtures__/mitra-instance.json @@ -0,0 +1,13 @@ +{ + "uri": "mitra.social", + "title": "Mitra", + "short_description": "Federated social network with smart contracts", + "description": "This is an instance of [Mitra](https://codeberg.org/silverpill/mitra), federated social network built on [ActivityPub](https://activitypub.rocks/) protocol.\nRegistration is invitation-only.\nAdmin:\n - [@silverpill@mitra.social](https://mitra.social/profile/dd4ebc18-269d-4c7b-a310-03d29c6ab551)\n - Matrix: @silverpill:poa.st\n", + "version": "3.0.0 (compatible; Mitra 0.4.0)", + "registrations": false, + "login_message": "Sign this message to log in to https://mitra.social. Do not sign this message on other sites!", + "post_character_limit": 5000, + "blockchain_explorer_url": null, + "blockchain_contract_address": null, + "ipfs_gateway_url": "https://ipfs.mitra.social" +} diff --git a/app/soapbox/normalizers/__tests__/instance-test.js b/app/soapbox/normalizers/__tests__/instance-test.js index 28eea3191845dddd19c05481d6110ecb7b784703..3496da046d05282d1638f99867531bdda78bedd3 100644 GIT binary patch delta 492 zcmaDTdRThHU9QRJnS=!0Qd2UMGK*3aGV_W{67!N%CvFs-{D8wiDh(>33zN{xD$dVS z*VMG0ypP4Oo=X7;^z{{jQ%i~!Qc{bPi!uvJGV}A|b24)?OTe_OI}T9A^OlUkBWzz&#aCd;$R@Me}2C8GJ;Pz)qUz|W2;Da8uO`FUxX>7_-9 zAYUsa=A{rH3Mg9DHQ`RkPgC&B%`GiSOv*|1O)LO~j8m#cNl|GkFjy26CNJX>Fu)g# PK*i87R8Xh|Y5`#Y>jkJW delta 12 TcmX>s{ZMqnT`rbdO=~UyBB}&i From 0c962ee1982ea91b48b5364acd165d3ee4d43ba3 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 23 Feb 2022 22:51:23 -0500 Subject: [PATCH 23/31] normalizeInstance(): add tests for GoToSocial and Friendica --- .../__fixtures__/friendica-instance.json | 46 ++++++++++++++++++ .../normalizers/__tests__/instance-test.js | Bin 3523 -> 4617 bytes 2 files changed, 46 insertions(+) create mode 100644 app/soapbox/__fixtures__/friendica-instance.json diff --git a/app/soapbox/__fixtures__/friendica-instance.json b/app/soapbox/__fixtures__/friendica-instance.json new file mode 100644 index 0000000000..cb6902d1ff --- /dev/null +++ b/app/soapbox/__fixtures__/friendica-instance.json @@ -0,0 +1,46 @@ +{ + "uri": "https://ica.mkljczk.pl", + "title": "Friendica Social Network", + "short_description": "", + "description": "", + "email": "me@mkljczk.pl", + "version": "2022.05-dev", + "urls": null, + "stats": { + "user_count": 0, + "status_count": 0, + "domain_count": 0 + }, + "thumbnail": "https://ica.mkljczk.plimages/friendica-32.png", + "languages": [ + "pl" + ], + "max_toot_chars": 200000, + "registrations": true, + "approval_required": false, + "invites_enabled": false, + "contact_account": { + "id": "2", + "username": "nofriend", + "acct": "nofriend", + "display_name": "marcin mikołajczak", + "locked": true, + "bot": false, + "discoverable": true, + "group": false, + "created_at": "2022-02-19T14:51:00.000Z", + "note": "", + "url": "https://ica.mkljczk.pl/profile/nofriend", + "avatar": "https://ica.mkljczk.pl/photo/contact/300/68a16c11-1262-1103-d40b-806159848009?ts=1645292106", + "avatar_static": "https://ica.mkljczk.pl/photo/contact/300/68a16c11-1262-1103-d40b-806159848009?ts=1645292106", + "header": "https://ica.mkljczk.pl/photo/header/68a16c11-1262-1103-d40b-806159848009?ts=1645292106", + "header_static": "https://ica.mkljczk.pl/photo/header/68a16c11-1262-1103-d40b-806159848009?ts=1645292106", + "followers_count": 0, + "following_count": 1, + "statuses_count": 0, + "last_status_at": "2022-02-20", + "emojis": [], + "fields": [] + }, + "rules": [] +} diff --git a/app/soapbox/normalizers/__tests__/instance-test.js b/app/soapbox/normalizers/__tests__/instance-test.js index 3496da046d05282d1638f99867531bdda78bedd3..8f992bb841989c12e3acf39ecf5e7d22cada88c3 100644 GIT binary patch delta 345 zcmX>s-Knx+KksA>Rv|9;{E+cu6AC8fow#UM6F z6G(kxa!G1Yv3jhgrd~ Date: Wed, 23 Feb 2022 22:58:38 -0500 Subject: [PATCH 24/31] normalizeStatus(): test GoToSocial and Friendica normalization --- .../__fixtures__/friendica-status.json | 53 ++++++++++++++++++ .../normalizers/__tests__/status-test.js | Bin 4277 -> 5013 bytes 2 files changed, 53 insertions(+) create mode 100644 app/soapbox/__fixtures__/friendica-status.json diff --git a/app/soapbox/__fixtures__/friendica-status.json b/app/soapbox/__fixtures__/friendica-status.json new file mode 100644 index 0000000000..fc64e430e7 --- /dev/null +++ b/app/soapbox/__fixtures__/friendica-status.json @@ -0,0 +1,53 @@ +{ + "id": "106", + "created_at": "2022-02-19T18:19:40.000Z", + "in_reply_to_id": null, + "in_reply_to_account_id": null, + "sensitive": false, + "spoiler_text": "", + "visibility": "public", + "language": "fa", + "uri": "https://ica.mkljczk.pl/objects/68a16c11-4262-1134-bc4e-0db298374337", + "url": "https://ica.mkljczk.pl/display/68a16c11-4262-1134-bc4e-0db298374337", + "replies_count": 0, + "reblogs_count": 0, + "favourites_count": 0, + "favourited": false, + "reblogged": false, + "muted": false, + "bookmarked": true, + "content": "Hello to Friendica from fe.soapbox.pub!", + "reblog": null, + "application": { + "name": "Soapbox FE" + }, + "account": { + "id": "95", + "username": "alex", + "acct": "alex", + "display_name": "Alex Gleason", + "locked": true, + "bot": false, + "discoverable": false, + "group": false, + "created_at": "2022-02-19T18:17:43.000Z", + "note": "", + "url": "https://ica.mkljczk.pl/profile/alex", + "avatar": "https://ica.mkljczk.pl/photo/contact/300/68a16c11-1862-1134-4779-f98088458845?ts=1645294804", + "avatar_static": "https://ica.mkljczk.pl/photo/contact/300/68a16c11-1862-1134-4779-f98088458845?ts=1645294804", + "header": "https://ica.mkljczk.pl/photo/header/68a16c11-1862-1134-4779-f98088458845?ts=1645294804", + "header_static": "https://ica.mkljczk.pl/photo/header/68a16c11-1862-1134-4779-f98088458845?ts=1645294804", + "followers_count": 0, + "following_count": 0, + "statuses_count": 2, + "last_status_at": "2022-02-19", + "emojis": [], + "fields": [] + }, + "media_attachments": [], + "mentions": [], + "tags": [], + "emojis": [], + "card": null, + "poll": null +} diff --git a/app/soapbox/normalizers/__tests__/status-test.js b/app/soapbox/normalizers/__tests__/status-test.js index 8e32555a82bbcecf299975b79d824298be70fd47..c582d230daa80ca9326d10824d1409df33e2f431 100644 GIT binary patch delta 485 zcmdn0I8}YaMgb)*1%=EK4fVYIqTIxs%&OF41^4`r{NViL%)}gp;*!LY(uqB4ljrft z38d$j+35xrlb@riyQvd(} delta 12 TcmbQLzEyF Date: Wed, 23 Feb 2022 23:41:49 -0500 Subject: [PATCH 25/31] Status reducer: fix search_index --- .../__fixtures__/status-with-poll.json | 201 ++++++++++++++++++ .../ui/util/pending_status_builder.js | Bin 1459 -> 1736 bytes .../reducers/__tests__/statuses-test.js | Bin 6328 -> 6813 bytes app/soapbox/reducers/statuses.js | Bin 6992 -> 7006 bytes 4 files changed, 201 insertions(+) create mode 100644 app/soapbox/__fixtures__/status-with-poll.json diff --git a/app/soapbox/__fixtures__/status-with-poll.json b/app/soapbox/__fixtures__/status-with-poll.json new file mode 100644 index 0000000000..9dfd90d7ed --- /dev/null +++ b/app/soapbox/__fixtures__/status-with-poll.json @@ -0,0 +1,201 @@ +{ + "account": { + "acct": "alex", + "avatar": "https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png", + "avatar_static": "https://media.gleasonator.com/6d64aecb17348b23aaff78db4687b9476cb0da1c07cc6a819c2e6ec7144c18b1.png", + "bot": false, + "created_at": "2020-01-08T01:25:43.000Z", + "display_name": "Alex Gleason", + "emojis": [], + "fields": [ + { + "name": "Website", + "value": "https://alexgleason.me" + }, + { + "name": "Soapbox", + "value": "https://soapbox.pub" + }, + { + "name": "Email", + "value": "alex@alexgleason.me" + }, + { + "name": "Gender identity", + "value": "Soyboy" + }, + { + "name": "Donate (PayPal)", + "value": "https://paypal.me/gleasonator" + }, + { + "name": "$BTC", + "value": "bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n" + }, + { + "name": "$ETH", + "value": "0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717" + }, + { + "name": "$DOGE", + "value": "D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D" + }, + { + "name": "$XMR", + "value": "45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK" + } + ], + "followers_count": 2390, + "following_count": 1574, + "fqn": "alex@gleasonator.com", + "header": "https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png", + "header_static": "https://media.gleasonator.com/accounts/headers/000/000/001/original/9d0e4dbf1c9dbc8f.png", + "id": "9v5bmRalQvjOy0ECcC", + "last_status_at": "2022-02-23T17:54:41", + "locked": false, + "note": "I create Fediverse software that empowers people online.

I'm vegan btw

Note: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.", + "pleroma": { + "accepts_chat_messages": true, + "also_known_as": [ + "https://mitra.social/users/alex" + ], + "ap_id": "https://gleasonator.com/users/alex", + "background_image": null, + "birthday": "1993-07-03", + "favicon": "https://gleasonator.com/favicon.png", + "hide_favorites": true, + "hide_followers": false, + "hide_followers_count": false, + "hide_follows": false, + "hide_follows_count": false, + "is_admin": true, + "is_confirmed": true, + "is_moderator": false, + "is_suggested": true, + "relationship": {}, + "skip_thread_containment": false, + "tags": [] + }, + "source": { + "fields": [ + { + "name": "Website", + "value": "https://alexgleason.me" + }, + { + "name": "Soapbox", + "value": "https://soapbox.pub" + }, + { + "name": "Email", + "value": "alex@alexgleason.me" + }, + { + "name": "Gender identity", + "value": "Soyboy" + }, + { + "name": "Donate (PayPal)", + "value": "https://paypal.me/gleasonator" + }, + { + "name": "$BTC", + "value": "bc1q9cx35adpm73aq2fw40ye6ts8hfxqzjr5unwg0n" + }, + { + "name": "$ETH", + "value": "0xAc9aB5Fc04Dc1cB1789Af75b523Bd23C70B2D717" + }, + { + "name": "$DOGE", + "value": "D5zVZs6jrRakaPVGiErkQiHt9sayzm6V5D" + }, + { + "name": "$XMR", + "value": "45JDCLrjJ4bgVUSbbs2yjy9m5Mf4VLPW8fG7jw9sq5u69rXZZopQogZNeyYkMBnXpkaip4p4QwaaJNhdTotPa9g44DBCzdK" + } + ], + "note": "I create Fediverse software that empowers people online.\r\n\r\nI'm vegan btw\r\n\r\nNote: If you have a question for me, please tag me publicly. This gives the opportunity for others to chime in, and bystanders to learn.", + "pleroma": { + "actor_type": "Person", + "discoverable": false + }, + "sensitive": false + }, + "statuses_count": 23502, + "url": "https://gleasonator.com/users/alex", + "username": "alex" + }, + "application": null, + "bookmarked": false, + "card": null, + "content": "

What is tolerance?

", + "created_at": "2020-03-23T19:33:06.000Z", + "emojis": [], + "favourited": false, + "favourites_count": 47, + "id": "103874034847713213", + "in_reply_to_account_id": null, + "in_reply_to_id": null, + "language": null, + "media_attachments": [], + "mentions": [], + "muted": false, + "pinned": true, + "pleroma": { + "content": { + "text/plain": "What is tolerance?" + }, + "conversation_id": "3023268", + "direct_conversation_id": null, + "emoji_reactions": [ + { + "count": 3, + "me": false, + "name": "❤️" + } + ], + "expires_at": null, + "in_reply_to_account_acct": null, + "local": true, + "parent_visible": false, + "pinned_at": "2021-11-23T01:38:44.000Z", + "quote": null, + "quote_url": null, + "quote_visible": false, + "spoiler_text": { + "text/plain": "" + }, + "thread_muted": false + }, + "poll": { + "emojis": [], + "expired": true, + "expires_at": "2020-03-24T19:33:06.000Z", + "id": "4930", + "multiple": false, + "options": [ + { + "title": "Banning, censoring, and deplatforming anyone you disagree with", + "votes_count": 2 + }, + { + "title": "Promoting free speech, even for people and ideas you dislike", + "votes_count": 36 + } + ], + "voters_count": 2, + "votes_count": 38 + }, + "reblog": null, + "reblogged": false, + "reblogs_count": 26, + "replies_count": 14, + "sensitive": false, + "spoiler_text": "", + "tags": [], + "text": null, + "uri": "https://gleasonator.com/users/alex/statuses/103874034847713213", + "url": "https://gleasonator.com/notice/103874034847713213", + "visibility": "public" +} diff --git a/app/soapbox/features/ui/util/pending_status_builder.js b/app/soapbox/features/ui/util/pending_status_builder.js index 7812dbec620f6edc4dd94c58495a31e089ab9809..5bcc095c60212a966aebe1135a196ac118bbd723 100644 GIT binary patch delta 274 zcmdnYeS&ubBNKmeeqM2jLQ-jFPD((2PR?W_My>jc#A44pjcD}(pn$rLf_i>INhVO4 zdaS0VLN%8H5EP}BlosVF6r|>*Wagy@mn4>y7VD*_mS{lqXzG;~q$HN4YQVMXC_oKS zu(gAl0XGFIqnDdlpaEjr=I4P_dFJMpmLw+Sr1}EIs})KzOL9`JpvLGZl;xMC7RM*& zm*$mNDHtf!YHC`8T~<5!JfkE_UTIFw=I@MqnUvr@(?D^orVdzjVQGHJWIAjL7v$&UsOu=?mFDD3e$M(30I^*Qi2wiq diff --git a/app/soapbox/reducers/__tests__/statuses-test.js b/app/soapbox/reducers/__tests__/statuses-test.js index 779c0e847f8ae118b69f638bcf4aa2f0cdb54834..3a81f20046dc90e26e7c0879df9615a5213980a2 100644 GIT binary patch delta 260 zcmY*UyH3L}6qV?NJD|2I6T=lt7y=?qP`V)@u`zUGBqqLXu5hm{+W|VUclC_;1dv$x z4L*fGAgRQ_nU0RmL+2}dz4+Kpj|6m}aFX1&q?HGc($&o!vBKy0J-Xh1qR^aLqjh{c zxQRR-zEro33_u=&(dZ=Ccqzn{WF}svP$PTec2u$gg;vY3G;ZBVAbDdLVPjfQ7C delta 12 TcmbPhy2Efom+0nvaXn@LB0B_i diff --git a/app/soapbox/reducers/statuses.js b/app/soapbox/reducers/statuses.js index d06b0acecfbe6f8b44bb9b3524231d8bf2b2b3e4..2f2b0ac7f12d0fefaf5ebb9f5dea7000fa33746a 100644 GIT binary patch delta 91 zcmca$cF$}=sHjh7afw1=v4UrAZfQwkQcfyJU}LZjJ1>gJvRQ(|LKpx9XdnCl delta 51 zcmca-cEM~y=*Ao^_Q^}wRVJTg*I?FEu%B$mD#4jwP?DLSSF9d8nTbP%Rl!OjI(D-f HhlMZz$C?jh From f0dc2339731cf5b897778cda1467a2118dc6ff68 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 24 Feb 2022 00:07:18 -0500 Subject: [PATCH 26/31] Normalize poll and poll options --- .../ui/util/pending_status_builder.js | Bin 1736 -> 1711 bytes .../normalizers/__tests__/status-test.js | Bin 5013 -> 5520 bytes app/soapbox/normalizers/status.js | Bin 3425 -> 4239 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/ui/util/pending_status_builder.js b/app/soapbox/features/ui/util/pending_status_builder.js index 5bcc095c60212a966aebe1135a196ac118bbd723..8ea186f5679d2e3efc0de94fcaeb53ad021b0494 100644 GIT binary patch delta 42 ucmX@XyPkK$Rwmh!%#xf`1zS4>&)nS7lEkE(RNuq`jcNt3_~zG4cbNfED-ad{ delta 82 zcmZ3_dxCevRwl>%f|AVqJOx`j1<%~v(vrlaoK)Y$0*z{glFX8vR4WCDypBRyeo1O^ gd~$wiUWt{0fkLgOrZtxW5Y$dS&nUV18`Dl^0M$Dj#{d8T diff --git a/app/soapbox/normalizers/__tests__/status-test.js b/app/soapbox/normalizers/__tests__/status-test.js index c582d230daa80ca9326d10824d1409df33e2f431..26428e3bacffb90055b3490164f49778af042891 100644 GIT binary patch delta 368 zcmaKn!Ab)$5QgcY9z5Bt2M-3FU>Y|=bx4o7MjpbGhLU&;mlj4KV4YpxePfQvNW>7 zoWo2gi)&p`E0R9{4_@d4!fNBZmjBLkg~DLovq6tPJwyu2eMN^Y?6R1Er~KiJ%bxT7)-7)rmDu|!td1jH{36qxO2n+ delta 12 TcmbQBJym_fL}8X%O=~Uy9Kr*; diff --git a/app/soapbox/normalizers/status.js b/app/soapbox/normalizers/status.js index 38819fb2d30200a51471b5b01242fbf941ffd483..8927546e8fef76dddea35dadd3cf8c5afa62fc5d 100644 GIT binary patch delta 672 zcmZvaPfEi;6vk=MifO$-L492%(UL}?qLu2#O&4nSB4yf6F*2D6nTZuk@CaSx9D-19 z;i6}7x zh~g<+A%P8bSd>i-6At0Xwrw~7<3ycp(`-Vk1#NI08pse*!VQRUJQXchWnQ!_)f+0N zzsjlnipdvmPOOZ*^0^JLkNi`pfz^8I9`m8iwSMVf{ zP$H2*Z!#574(p^PDK3x*cqZyhz(^|A1L8eu-05moV%HOQuHTzx?4Ku4{n1jZ9;cm! zUnh~Na;6XRNrS6$w5;sLJDOJDjTQdfrkN7Sqp8t+I1OXD@^-9&B^e~`>UOBNFgmO5 g*Da2Pku5|6LgKHXYH3)ALD%=cL~FXO6Yoopo#3IJ(62%rD} From 5b3f7c1cdccfe4aded1a8a1688ee9e67f568ee71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 24 Feb 2022 18:28:52 +0100 Subject: [PATCH 27/31] Let accent color be configurable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/actions/soapbox.js | Bin 4049 -> 4070 bytes app/soapbox/containers/soapbox.js | Bin 7326 -> 7425 bytes .../soapbox_config/components/site_preview.js | Bin 2069 -> 2099 bytes app/soapbox/features/soapbox_config/index.js | Bin 23995 -> 24355 bytes app/soapbox/locales/pl.json | 1 + app/soapbox/locales/uk.json | 1 + app/soapbox/utils/theme.js | Bin 2232 -> 2823 bytes app/styles/forms.scss | 6 +++++- app/styles/themes.scss | 3 --- 9 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/soapbox/actions/soapbox.js b/app/soapbox/actions/soapbox.js index d85bd0f0ff49a941a04195094e0ac3d32419fdf2..cc266aeb38a4d977085005b69c6cc8cae502a96e 100644 GIT binary patch delta 29 kcmca8|4e>E2a7;ra&l^3iF1BVevy@ey1LHhW)?qg0I7Tm761SM delta 12 TcmaDRe^Guz2g~NUES}r|B~}F5 diff --git a/app/soapbox/containers/soapbox.js b/app/soapbox/containers/soapbox.js index 301de4c0151a07487554f6bfa7ea6820a6a70206..c08e643a6a8d45f0040e45e69b84fbe33b08acad 100644 GIT binary patch delta 56 zcmbPd*=V)lCnukRLUMjyafw1=a&l^3$>g=1@{>Jyq}U+b%^x^dF>>fYB{xsy<`e_~ DMb;Cm delta 17 ZcmZp)nrFG;C+B8=u7!-7|8lbk0suqM2EzaV diff --git a/app/soapbox/features/soapbox_config/components/site_preview.js b/app/soapbox/features/soapbox_config/components/site_preview.js index a5160469572723f9ea7ccf1da7587daffb774fed..5d6749452695e0d5da20570b488772aa8ea56852 100644 GIT binary patch delta 65 zcmbO#uvuWjA?}il)ZA3({G9xv;*DoIn2`CCl9++3>cW(5G&NhU7< delta 18 acmZ3yk8$^I#tmDQC+Dm4Z`M)$ZV3QSst3*h diff --git a/app/soapbox/locales/pl.json b/app/soapbox/locales/pl.json index 470bac41b5..d26164d620 100644 --- a/app/soapbox/locales/pl.json +++ b/app/soapbox/locales/pl.json @@ -856,6 +856,7 @@ "soapbox_config.crypto_donate_panel_limit.meta_fields.limit_placeholder": "Liczba elementów do wyświetlenia w widżecie krypto na stronie głównej", "soapbox_config.custom_css.meta_fields.url_placeholder": "Adres URL", "soapbox_config.display_fqn_label": "Wyświetlaj domenę (np. @użytkownik@domena) dla lokalnych kont.", + "soapbox_config.fields.accent_color_label": "Kolor akcentu", "soapbox_config.fields.brand_color_label": "Kolor marki", "soapbox_config.fields.crypto_address.add": "Dodaj nowy adres krypto", "soapbox_config.fields.crypto_addresses_label": "Adresy kryptowalut", diff --git a/app/soapbox/locales/uk.json b/app/soapbox/locales/uk.json index 47b9144911..1ab59de143 100644 --- a/app/soapbox/locales/uk.json +++ b/app/soapbox/locales/uk.json @@ -844,6 +844,7 @@ "soapbox_config.crypto_donate_panel_limit.meta_fields.limit_placeholder": "Number of items to display in the crypto homepage widget", "soapbox_config.custom_css.meta_fields.url_placeholder": "URL", "soapbox_config.display_fqn_label": "Display domain (eg @user@domain) for local accounts.", + "soapbox_config.fields.accent_color_label": "Акцентний колір", "soapbox_config.fields.brand_color_label": "Brand color", "soapbox_config.fields.crypto_address.add": "Add new crypto address", "soapbox_config.fields.crypto_addresses_label": "Cryptocurrency addresses", diff --git a/app/soapbox/utils/theme.js b/app/soapbox/utils/theme.js index b398145bf2213d0efa5266e1177ddc6dd1d1e6e6..1b3c85dfe752dc1c28d4d8416a49166c2008205a 100644 GIT binary patch delta 454 zcmdlX*e*69NKzxIC^0X^IX@@ANJk+tIXN}21kBN#7!%K{mz!FYo~i*6o;Y8c4^_#= zT?*{}NP0r@Lo!lxQ(Y2E5*2I}aGI=OYo}1nrJ#_RrT{e>Vk1~^vLd@i5R#din$}!E zwF(MFsU@XFc?zDnxuqqENja&$i3J)UQ$Ro+qCqzq002sj4^E7&R^6ilAUWx}j! G%>@8Wwi46; diff --git a/app/styles/forms.scss b/app/styles/forms.scss index 64ab2fb4d1..53551941a8 100644 --- a/app/styles/forms.scss +++ b/app/styles/forms.scss @@ -418,6 +418,10 @@ code { margin-bottom: 10px; margin-right: 10px; + &#accent_color { + background: var(--accent-color); + } + &:last-child { margin-right: 0; } @@ -510,7 +514,7 @@ code { .label_input { &__color { - display: inline-flex; + display: flex; font-size: 14px; .color-swatch { diff --git a/app/styles/themes.scss b/app/styles/themes.scss index 032f8ce4db..de6a6b1bff 100644 --- a/app/styles/themes.scss +++ b/app/styles/themes.scss @@ -41,9 +41,6 @@ body, --background-color_hsl: var(--background-color_h), var(--background-color_s), var(--background-color_l); --foreground-color_hsl: var(--foreground-color_h), var(--foreground-color_s), var(--foreground-color_l); --warning-color_hsl: var(--warning-color_h), var(--warning-color_s), var(--warning-color_l); - --accent-color_h: calc(var(--brand-color_h) - 15); - --accent-color_s: 86%; - --accent-color_l: 44%; // Modifiers --brand-color--faint: hsla(var(--brand-color_hsl), 0.1); From 06d33de47f5dc712fbdb2fb6fb197f7455908bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Fri, 25 Feb 2022 16:08:05 +0100 Subject: [PATCH 28/31] Single user mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/actions/soapbox.js | Bin 4070 -> 4128 bytes app/soapbox/containers/soapbox.js | Bin 7425 -> 7733 bytes app/soapbox/features/soapbox_config/index.js | Bin 24355 -> 25704 bytes .../features/ui/components/sign_up_panel.js | Bin 1306 -> 1541 bytes .../features/ui/components/tabs_bar.js | Bin 7849 -> 8070 bytes .../ui/components/unauthorized_modal.js | Bin 7610 -> 7979 bytes 6 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/actions/soapbox.js b/app/soapbox/actions/soapbox.js index cc266aeb38a4d977085005b69c6cc8cae502a96e..03814cf7c6236312a832bd16b022ae5aef1c92d0 100644 GIT binary patch delta 67 zcmaDRzd&JwG`pFCLUCqZdQNI+acYroeoCs9LRw-@ajFiN0uZ1|1r+6{W##}?sH<-l IXFtyY01Vp}mH+?% delta 12 TcmZ3W@JxP#H2daI_R|~yAM6Br diff --git a/app/soapbox/containers/soapbox.js b/app/soapbox/containers/soapbox.js index c08e643a6a8d45f0040e45e69b84fbe33b08acad..19b218877d78e56ec0fa42816bbdadd44ed953c2 100644 GIT binary patch delta 297 zcmZp)+G?{wgi+q9D8IZowJ0dRv?R4iM?c|L-BEqPG>Y55_Y9Mh@RPlhK{ItxR)Xm;polF7>XeMpG zz*EG;gDg6EA)nM{C;pF20y^kwjfK)#!!=M%=Tg7|>=kTao=`}wNK7tKNGr@iW@O%Zayt;#tHybA7WAf delta 63 zcmV-F0KosXJb^l}6af`ecWHEEXe=N?a&LEYWpYw)b#!HNvoirH3A4!xf&#N&4Q>Ln V^AGU?v-A>Y1(VGfF|+>|HU;HU7uNs) diff --git a/app/soapbox/features/soapbox_config/index.js b/app/soapbox/features/soapbox_config/index.js index 1b3fb51d3d1fea68a4b5aa4560fc2395cb3fed9a..84d80eea3566f7d9aefeed88f9ba000724ef65ca 100644 GIT binary patch delta 617 zcmZ3ykMYF`#toPG1r!vDGxO4OQbUVVi+uA_QYQ4i}pC$qxLo{Aju-7xGK_x)tT;l_(S>rl%^DXXfN66s4wQ7NsVaD3s(Y zBr2q5mZj!FOfD$OPs_|n)x&0bY5+tMR8Uh>(BPUJXR157Pn%5) zRT>&L>XQ?dgeUX+DT`v2p3HA1H95gg6W#KI`f`&SRK##-TBss6IWACi@;Mbwbd7-q i(vu~$#U}Hq3o~ifPBzeXot&@EKUqhWd-GERJ3RmvHr@IF delta 23 fcmaEHf^qRa#toPGH*Xa@pfFip*J87PS%e+{h7k#s diff --git a/app/soapbox/features/ui/components/sign_up_panel.js b/app/soapbox/features/ui/components/sign_up_panel.js index cee57bb0d973c8f759a64efee0ed7175e6e2bd7f..49410affa078a8d7349eeeeb8f2dc487ba0dc4ca 100644 GIT binary patch delta 262 zcmbQm)ygwrrAf6ydTL2URq|lLajntQGTw1dND*)KQXx^Ge56bAIev^ zp13eWKN%=eq5u_wYP7{LOQX0Xu_RT~nrku}W0aACLUCqZdQNI+acYroeoCqps(wA7 zOElC`luV9fG&0gb)22|XsbFiTP|c;FkeQ~Sk(;VeQ-i8x^K3>-W(7>^0*dkrLMjVV Pi}jN7^K&L&V(|a~{Oeuj delta 43 zcmZqWnZ-3><;156lgk;yC$lqY3ncN(rUO&60+bH%W#~p3NgR`Gu(HW;v-cMhyjp$VhN4dos7pf~)d}jFn=54v7y-D_ BPu&0j delta 56 zcmV-80LTA^KdC*iF9x$y2B-qF3kie}lfMfFlf4;JlP4J-lQ0@KlV}fA^9xMSI&Jsib diff --git a/app/soapbox/features/ui/components/unauthorized_modal.js b/app/soapbox/features/ui/components/unauthorized_modal.js index be54a6becac02d934230c9d38b9dc85c1ff782d0..590b73d2d1cbbe9b82f8f28feb381c1561da1581 100644 GIT binary patch delta 377 zcmdmGz1nWWEJl%Ph4j>t;QYjbr2Go!{JgZxbcNc;5^NLFp zic!?rVrbPUE=eqz{D^tCse(drW?p(uYG`q4k#BxVsuikUJ)or;>ZnT8H78GJ`AnY9 z&26k_7!@!r4JgVl2&pVcE!IoQ&(GQH$1cPypo8YL%?VuQT$ Date: Sat, 26 Feb 2022 13:32:54 +0100 Subject: [PATCH 29/31] Use gavel icon from Tabler icons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/icons/COPYING.md | 2 -- app/icons/gavel.svg | 5 ----- app/soapbox/components/status_action_bar.js | Bin 24019 -> 24033 bytes .../features/account/components/header.js | Bin 27974 -> 27988 bytes .../features/admin/components/admin_nav.js | Bin 4685 -> 4699 bytes .../features/status/components/action_bar.js | Bin 20987 -> 21001 bytes 6 files changed, 7 deletions(-) delete mode 100644 app/icons/gavel.svg diff --git a/app/icons/COPYING.md b/app/icons/COPYING.md index d99855b130..de5c4fcf8d 100644 --- a/app/icons/COPYING.md +++ b/app/icons/COPYING.md @@ -2,11 +2,9 @@ - dashboard-filled.svg - Modified from Tabler icons, MIT - fediverse.svg - Modified from Wikipedia, CC0 -- gavel.svg - Created by ramsha61 for this project, MIT - home-squared.svg - Modified from Tabler icons, MIT - pen-plus.svg - Modified from Tabler icons, MIT Tabler: https://tabler-icons.io/ Feather: https://feathericons.com/ Fediverse logo: https://en.wikipedia.org/wiki/Fediverse#/media/File:Fediverse_logo_proposal.svg -ramsha61: https://www.fiverr.com/ramsha61 diff --git a/app/icons/gavel.svg b/app/icons/gavel.svg deleted file mode 100644 index 38a0ff272e..0000000000 --- a/app/icons/gavel.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/soapbox/components/status_action_bar.js b/app/soapbox/components/status_action_bar.js index 1780f657594189ef5f6360e8e3b980f44388ffd1..1770d7cc21928ffac9cfdbf895e9b6fd0060539b 100644 GIT binary patch delta 18 acmcb-oAKdp#tk!UCKs59Y@TOhst5p8z6aj` delta 14 WcmaF3oAL5)#tk!UHZQZWRs;Yz!3LrL diff --git a/app/soapbox/features/account/components/header.js b/app/soapbox/features/account/components/header.js index 884d57034c1bce5030521628879f0d40e1c4a2c5..b38ff492cb5333d730cb735b449d0911d97cf491 100644 GIT binary patch delta 18 acmX?hi}A`W#tnitlP741Y! Date: Sat, 26 Feb 2022 15:57:09 +0100 Subject: [PATCH 30/31] Account notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/actions/account_notes.js | Bin 0 -> 1720 bytes .../features/account/components/header.js | Bin 27974 -> 28410 bytes .../account_timeline/components/header.js | Bin 4780 -> 4902 bytes .../containers/header_container.js | Bin 9261 -> 9399 bytes .../ui/components/account_note_modal.js | Bin 0 -> 3463 bytes .../features/ui/components/modal_root.js | Bin 2839 -> 2895 bytes .../ui/components/profile_info_panel.js | Bin 9346 -> 10057 bytes .../features/ui/util/async-components.js | Bin 14591 -> 14721 bytes app/soapbox/reducers/account_notes.js | Bin 0 -> 1081 bytes app/soapbox/reducers/index.js | Bin 3489 -> 3551 bytes app/soapbox/reducers/relationships.js | Bin 3750 -> 3858 bytes app/soapbox/utils/features.js | Bin 4635 -> 4782 bytes app/styles/components/modal.scss | 95 ++++++++++++------ app/styles/components/profile-info-panel.scss | 16 ++- 14 files changed, 75 insertions(+), 36 deletions(-) create mode 100644 app/soapbox/actions/account_notes.js create mode 100644 app/soapbox/features/ui/components/account_note_modal.js create mode 100644 app/soapbox/reducers/account_notes.js diff --git a/app/soapbox/actions/account_notes.js b/app/soapbox/actions/account_notes.js new file mode 100644 index 0000000000000000000000000000000000000000..d6aeefc499a9b2c7932c9d1db7ee71fb879f5c0b GIT binary patch literal 1720 zcmb7EO^=%}5WVMD%%KuSia@>YYAaF7wvjeOU6NB(u@t-;OTnhtRIMWZdp(#>WnnkD z1Z(U!GjHA-mKUN_kQ5A_OOb=+IIccex2qL1p)-hr@~y~{(;Cu~khJ-Rx_jW}7?b#f z{%z1w!KDJv_jiYIABVer5J!j4+s!_H489+NXb*Q_Erd1Hn@G{Y_k$>!Lu$kCLAv)g z51@ZDHDP$Uw@s)!+wQ)24;L6iXc@x)=7nE_*xzlpL3l~eG(3WOu6U}L;2^7CIa6Mm zii)dHC`xQNuK-G_s*(fAm@E>N9@p?fRiqL{ZMgf?Tmk5U3HO=aliGIFk#bT}S!lh|fsPR&gWekokbzP3g084a zQz~VT>12sYkUM;)6Q(!^BNBybpW9L74&Aw zlt{}v(+qu{5|p1jvSOmQw^FwDG?OUlfO16h@~xKYX_kP2JiIBF+{&Q-C_5bcA>-Vj%`imSa-JUq5HK@ kCcD~N5@dQz_zU%hHRKzsk~Y_bw^@-)*PW?vR4j`0Kg*pXv;Y7A literal 0 HcmV?d00001 diff --git a/app/soapbox/features/account/components/header.js b/app/soapbox/features/account/components/header.js index 884d57034c1bce5030521628879f0d40e1c4a2c5..d639838aaf429265201cb6a43b865ae9160ea485 100644 GIT binary patch delta 214 zcmX?hi}BZ8#tmV7s>wyEi6yCi`6a1V3e^gkDOL*ViOI?NrFkWK5UKdQ{F2ERc}1n2 z!73FJ6@UV%>I$_wTnY-QDVZfey^|-fi8Djhak&D;AgVU|@ij{ErvWV}ElMrc1L-T) zocvJTYVuk`1w*hgv6>3@3c0Dp#fj-a6;R_+6|4|q2nSAfG*@B^&d4wK%b#3pV#oqA TVDdqA>B;Y0cs8HcD0cw>f0<38 delta 27 jcmex$m+{yw#tmV7o8RzNN=^1r7nporOJMV2t#B6rwGRuM diff --git a/app/soapbox/features/account_timeline/components/header.js b/app/soapbox/features/account_timeline/components/header.js index 51120dfcf6b57517cf969968623742221d5d5ccd..5886979433d57d64473de3028ba8ae8db4a9bf68 100644 GIT binary patch delta 77 zcmZ3Zx=d}uYM#jxIN3OYGxE#*@=H=DH?qjELphTbIpsF5=Gnt4pPvVlx2-P8$Sl^& QNX$#gNreecjur|807SVQP5=M^ delta 16 YcmZ3cwnlZsYM#x%c=oVPekkM$06ug94v;G_c^b3XWOF8g$#toP1h22>>b#MQ#89 delta 169 zcmdn)xz=OC$;r1EuTHLI4w-Dnk~#S{i{WHG#+4j;dir2Ac^{+v+D4M%FbeJt!4}7gF;(nX}?m z-;#C%r{5Z5WaUfi56UEhS7BCqwX^#}rMFn<>(&By2iq1(_Q?O>eNksgX76MSQeg%~*;&mw6GOu;OY075@l${A4|)?jxNjDB0ie@7uM z8ViVcE)4w-ouYr{ge!ozUc-=FY~vxT>Cm5t?avcA2K7-r*l$kF+xx66umFmiMpX#Z z2-o+sE`YuMD0IzCb{tU8{YsC$4@1`gAghh6_Cl3-H*N)>cZkp0IG*FRkQ?51?@p|| z9Y*CgiTGUS6vIVkwERaD^^mJJ3Y*X+NRuUu zaj_1fF90$jFZv1MPDjPCJ??mEjzTAdr%s5pL6$L33{%*z$rCFYZYj|XF`Y7uQn{?bd$p&s@@EUfQMT+B=`Sd(8`sx7#CUSWDo9Zg%8qm8Gq6 zOpc=)!*&H%E1I|3f6|$WemX?+4pzgd7~t$FBl2{l@SY0MWPYa6@2L9lA{zx19rjYe zP3w5mMPQku)3yb-wC?LCy^rYx6V0I;rE|4H5U-sO(lt&oy#xvtX&64#Cb-nsZ>a2u zw|idKU$TLWRq)7p4O*7m)yHc^J~QkcjH-$YT6IqW#-BST@q zC38eKUe4DMVt=)&g9@=mgVKkF>_i2sJRp+hhKBHx?7%*1qLFFvFiBgYYl3;<>(sw< z;{MGPzF_9vD1^PMwDsCE-os9?GbL?ry|Q*%r^=)$oLYmEFP zvqlFA2L$$vA;{?OErf9o<>ih|7~>zi)cGQNOj|DjU3eE43COC97fb&Z4twjh?n27a z0|DomteiF^$Ttjf&c%&i4@$WvHeGCkJkw@lrZdc&mDzMy0XDD&C;$Ke diff --git a/app/soapbox/features/ui/components/profile_info_panel.js b/app/soapbox/features/ui/components/profile_info_panel.js index 8cd4dfb5dc66bc106bc1e2f25fc3f45cf591e0fa..35d12a627bee1018060e54bdde9f979c3892e181 100644 GIT binary patch delta 536 zcmZuu%SyvQ6h%}Dp(qwBEh=1}lSoO$g$pGGQ5P;Mg6>3QOr}jRor#%=4?+;!yO06V zr5_*&`2n}C{1AV^g_GE#QfD(Wcg{WcoHI8&Z@Vu~1C1Cw>WK~8W)T&;OpqpXun!5e zLe>Gq84ga^WgXkXW0b2s2Od*}ofm%QOdRIaEF!G@-$1^kC zyV)jUhw6tYBtFiyx?X^4fHI}%$biK~&^3uC#|P0IlJ8}GA%9WSo4#kCTCs3FZvGXT zG&H$4H7*Y;vqKqLz81^!p;BH2&#_Q%GFR5~KoB_JvYUi++$I*v9K-jVy5hQ>o=l_a zy>@M@ECqCMu;uXp3)?+lS!`S-qdVP_0agR_So!aFZ$MTD=wbE$KCu^-k%ySnv_u^= Rav3l=I=@otpDwrOtuLA0xxfGb delta 40 ycmV+@0N4M?PJ&6Wp#ih!0rUm4`v(mNvxyJk3bVl*hzgU$CN>0ab!=>t3@1Hr_z+$I diff --git a/app/soapbox/features/ui/util/async-components.js b/app/soapbox/features/ui/util/async-components.js index 5f44a280171edd1f9f469026a6a28fc4f767744a..9c2218f8e56f6544e794b20bfe56579ad1b692b2 100644 GIT binary patch delta 46 zcmexg*jT(_megclE_N2b{F2nk8-@IM5|fkjOY=(N^FRUu60(y8q**r4lS-5W0H-Jr AiU0rr delta 12 TcmZoH{$IFZmegh$=~OuYC~^fh diff --git a/app/soapbox/reducers/account_notes.js b/app/soapbox/reducers/account_notes.js new file mode 100644 index 0000000000000000000000000000000000000000..67cd83e1d4fd37d8c0ca4f0b5aba7989b13419c2 GIT binary patch literal 1081 zcmbVLUu%Of5P$bm+?xvG-W?ru&TYc9Y_?BhNNQsn&{)icZIpiZB^sfva~pdS?{dF? zxv+ZQvJ=b#MG4Z~nu24EtS>zW}lz73!xm7v-YfFTNi z%c|;2MN`+5E1aQpbd^R|iJ%`{?i*SXSs|2?cX9`iUacdHx>K>9I-{Mrpk<18hQ$t? zzUJfSp7xD`2s(8^L8rH+C|eF4hp%9EiMshNGp8qZVRqAzXm|ZFK{4jetF6UFcmYWLk1X!aK4J)1aax`XQDB| o`7-~3;4(sNC7lp&u=PvOz?0m>K>z>% literal 0 HcmV?d00001 diff --git a/app/soapbox/reducers/index.js b/app/soapbox/reducers/index.js index a5c178b3c46cd6dd9de1572d89d315cd6eda2a00..c7b48cc229bc7e5ac95f9fd200fb49bba543a1f8 100644 GIT binary patch delta 52 zcmZ1|eP4RQ8oBtq{F2mSg|wplTm^MK{lw(t{L;JnvFLbI5uZ-ma+fd nnV(k-q?7YY^Gf3L@=H>S)vY(K-pD=Kj)#{UN&Dsio-if=^wb}F delta 22 ecmbOvw@h}zmW_W_a8K6am7B!IvH2a33KIZsuLyGh diff --git a/app/soapbox/utils/features.js b/app/soapbox/utils/features.js index 54355e005629a3324e7de6f9ff8b2fad42f764a6..0516ef02ddd303c5a5867240856b902edf4ffa31 100644 GIT binary patch delta 30 kcmbQOvQBk_hyc5SLSBAJYVqWatd5LEljV85HUkBj0Fzq?d;kCd delta 12 TcmZ3dI$LFfh`{FM0_;ox9pnSr diff --git a/app/styles/components/modal.scss b/app/styles/components/modal.scss index aa12f40927..7d40aab68c 100644 --- a/app/styles/components/modal.scss +++ b/app/styles/components/modal.scss @@ -126,7 +126,9 @@ top: 0; bottom: 0; - @media screen and (max-width: 600px) { padding: 30px 2px; } + @media screen and (max-width: 600px) { + padding: 30px 2px; + } .svg-icon { width: 24px; @@ -342,7 +344,8 @@ .mute-modal, .reactions-modal, .reblogs-modal, -.mentions-modal { +.mentions-modal, +.account-note-modal { position: relative; flex-direction: column; overflow: hidden; @@ -411,7 +414,8 @@ .boost-modal__action-bar, .confirmation-modal__action-bar, -.mute-modal__action-bar { +.mute-modal__action-bar, +.account-note-modal__action-bar { display: flex; align-items: center; justify-content: space-between; @@ -464,7 +468,8 @@ vertical-align: middle; } -.report-modal { +.report-modal, +.account-note-modal { width: 90vw; max-width: 700px; } @@ -521,27 +526,6 @@ margin-bottom: 20px; } - .setting-text { - display: block; - box-sizing: border-box; - width: 100%; - margin: 0; - color: var(--primary-text-color); - background: var(--background-color); - padding: 10px; - font-family: inherit; - font-size: 14px; - resize: vertical; - outline: 0; - border: 1px solid var(--background-color); - border-radius: 4px; - margin-bottom: 20px; - - &:focus { - border: 1px solid var(--background-color); - } - } - .setting-toggle { margin-top: 20px; margin-bottom: 24px; @@ -574,7 +558,9 @@ max-height: 300px; } - .actions-modal__item-label { font-weight: 500; } + .actions-modal__item-label { + font-weight: 500; + } ul { overflow-y: auto; @@ -582,12 +568,18 @@ max-height: calc(100vh - 147px); // NOTE - not sure what this is yet, leaving alone for now until I find out. - &.with-status { max-height: calc(80vh - 75px); } + &.with-status { + max-height: calc(80vh - 75px); + } - li:empty { margin: 0; } + li:empty { + margin: 0; + } li:not(:empty) { - &:first-of-type { margin: 10px 0 0; } + &:first-of-type { + margin: 10px 0 0; + } a { display: flex; @@ -654,10 +646,12 @@ } .confirmation-modal__action-bar, -.mute-modal__action-bar { +.mute-modal__action-bar, +.account-note-modal__action-bar { .confirmation-modal__secondary-button, .confirmation-modal__cancel-button, - .mute-modal__cancel-button { + .mute-modal__cancel-button, + .account-note-modal__cancel-button { background-color: transparent; color: var(--highlight-text-color); font-size: 14px; @@ -726,7 +720,9 @@ } .modal-layout { - background: var(--brand-color--med) url('data:image/svg+xml;utf8,') repeat-x bottom fixed; + background: var(--brand-color--med) + url('data:image/svg+xml;utf8,') + repeat-x bottom fixed; display: flex; flex-direction: column; height: 100vh; @@ -1068,7 +1064,8 @@ } .confirmation-modal, -.mute-modal { +.mute-modal, +.account-note-modal { &__header { display: flex; align-items: center; @@ -1090,3 +1087,35 @@ text-align: left; } } + +.report-modal__comment, +.account-note-modal__container { + .setting-text { + display: block; + box-sizing: border-box; + width: 100%; + margin: 0; + color: var(--primary-text-color); + background: var(--background-color); + padding: 10px; + font-family: inherit; + font-size: 14px; + resize: vertical; + outline: 0; + border: 1px solid var(--background-color); + border-radius: 4px; + margin-bottom: 20px; + + &:focus { + border: 1px solid var(--background-color); + } + } +} + +.account-note-modal { + .setting-text { + margin-top: 20px; + margin-bottom: 0; + resize: none; + } +} diff --git a/app/styles/components/profile-info-panel.scss b/app/styles/components/profile-info-panel.scss index a3c3f6dc56..65e70c4bd4 100644 --- a/app/styles/components/profile-info-panel.scss +++ b/app/styles/components/profile-info-panel.scss @@ -23,7 +23,8 @@ } &__join-date, - &__birthday { + &__birthday, + &__note { display: flex; font-size: 14px; color: var(--primary-text-color--faint); @@ -39,6 +40,15 @@ } } + &__note { + text-decoration: none; + + &:hover, + &:focus { + text-decoration: underline; + } + } + &__stats { margin: 15px 0; @@ -163,10 +173,10 @@ } .profile-info-panel__name-content::before { - content: '['; + content: "["; } .profile-info-panel__name-content::after { - content: ']'; + content: "]"; } } From 5a66a9b8c58eb233d60adf2d5ee99eaafdff5787 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 26 Feb 2022 15:14:56 -0600 Subject: [PATCH 31/31] Improve phrasing --- .../features/account/components/header.js | Bin 28410 -> 28408 bytes .../ui/components/account_note_modal.js | Bin 3463 -> 3448 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/soapbox/features/account/components/header.js b/app/soapbox/features/account/components/header.js index d639838aaf429265201cb6a43b865ae9160ea485..b3aa078747c311eeed3f17ae646ec3d5dbad9b28 100644 GIT binary patch delta 14 Wcmex$m+{A4#trxRHb3N(OaK5s{s(6O delta 16 Ycmexym+{wK#trxR7!x<& delta 56 zcmew%)h@julat#uC9_1KGQYG)A#ZXP=Pl{t{M=N9y!?_>g~X)%(h`M|jKmU!g4Cko L{JhPPTyo3+R7ezL