Switcher and Bottom Tabs Animations and UI Performance Improvements

- Migrated Switcher animations to Reanimated V2
- Added bottom tabs & Stacks Animations
- Improved bottom tabs, tab changing performance
- Polished android & IOS UI
This commit is contained in:
Parvesh Monu 2022-06-28 22:57:21 +05:30
parent d9d3f2bb73
commit 1047c26f69
No known key found for this signature in database
GPG Key ID: F399696520817DE9
30 changed files with 535 additions and 389 deletions

View File

@ -1,6 +1,6 @@
{:lint-as {status-im.utils.views/defview clojure.core/defn
status-im.utils.views/letsubs clojure.core/let
reagent.core/with-let clojkure.core/let
reagent.core/with-let clojure.core/let
status-im.utils.fx/defn clj-kondo.lint-as/def-catch-all
quo.react/with-deps-check clojure.core/fn
quo.previews.preview/list-comp clojure.core/for

View File

@ -104,41 +104,41 @@
},
{
"path": "cljsjs/react/16.13.0-0/react-16.13.0-0",
"path": "cljsjs/react-dom-server/17.0.1-0/react-dom-server-17.0.1-0",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "66011033045a6aaa778c01ed308675fa008817f0",
"sha256": "1j17bw4vmi26782v84znxnrx1qpi0wm6agbpczds0gb5f9nr2myv"
"sha1": "ff154f318e1f63061b5bd42d9a38fc8547360cb4",
"sha256": "166ynlrph7rx3nql0c85c37vcbcsnwbjamk71hw74rz451pgnncr"
},
"jar": {
"sha1": "b72f3f9a69ec4039ac57597859ea4b5d1cfcd113",
"sha256": "1dp4pi9jphncifa56kqj6sri8vwl62ia1xy3ii70fba1mdjij63s"
"sha1": "d5c53eca9f3884402c76268b82e3828223dcbf90",
"sha256": "1530hwqpxzxfjm6dy77whqwjzzx79jpnd9xvnkxy1lnk7l7lj494"
}
},
{
"path": "cljsjs/react-dom/16.13.0-0/react-dom-16.13.0-0",
"path": "cljsjs/react-dom/17.0.1-0/react-dom-17.0.1-0",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "367f3754430e092e8c9a5a9f58955fa68389401b",
"sha256": "0x5klcq3bdbckfi6dqy160rd2r9g3593gp86ha7a6b7p2sfrvmal"
"sha1": "077d1a0973c23cbbff52dea7365dca4cf9de5ad5",
"sha256": "1ccm3l19cgy30hr03n8jgkgzmswdbg520zmg97xk8b16ncn964jn"
},
"jar": {
"sha1": "b87b10a7d48e1c773eedfeb737f680a5566b7321",
"sha256": "10d9l42v7g78gpv6xklydywlpbvpxiky6gw1w3hnzrlqgbd40ip1"
"sha1": "a98b94cbc84d264ba9892c971cfaf5920c2152f1",
"sha256": "0ym20h0h7mw1mxzm1r7smbj65x8nsqj3cszg82mw3aw4a8j32c29"
}
},
{
"path": "cljsjs/react-dom-server/16.13.0-0/react-dom-server-16.13.0-0",
"path": "cljsjs/react/17.0.1-0/react-17.0.1-0",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "320f6487531caf52b15ef10d43129b80c40f7c35",
"sha256": "1l9s4akd1s06xcx0r38h6xf82bcr0ypmaw6xnvdrmll19a3g9ilc"
"sha1": "d5d3681281585d981375fe7bb29362bfcd0d4449",
"sha256": "0rskh6mfq5h0l0wybs68w9v585a6zlnnfgrvsf5k3h51fk2p28da"
},
"jar": {
"sha1": "4d400ae4f66687286170eb691aa8e642fe87aa47",
"sha256": "0fzwd6hfb2rx85pr6fsr2r4x76a90wgnjgnv23jzfn1vw6znch07"
"sha1": "726da8a9305a865df90d81e9a8d58f87ff0ee8bd",
"sha256": "0bfmvw8gk98vdf9azll6041r1jaz1pmb0dyb35cfc8dr3mmr4ag7"
}
},
@ -272,32 +272,6 @@
}
},
{
"path": "com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "7d5e372ff32c90095800f96d8308c41af0285a41",
"sha256": "1dj7p0m0kwnjvy1y3kq63zb6bw0azjf79i5xbccmy3wv63b1vqrg"
},
"jar": {
"sha1": "7e060dd5b19431e6d198e91ff670644372f60fbd",
"sha256": "1hn5plp7iyl626h8mrra56sysfm2qannj1dapr1m5afwkb24vfk1"
}
},
{
"path": "com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "5e902aae26ac5c36f6420f689f43333129dd69e2",
"sha256": "10vzlnl8vbjv2jqf818wdb7kgy9c6qjka7fjmmi3vdpg1mcn6pv6"
},
"jar": {
"sha1": "c9ad4a0850ab676c5c64461a05ca524cdfff59f1",
"sha256": "170rflxnqnah0265ik2aylmxkshyqbf2zas9bp2l32xqj9l6jsaf"
}
},
{
"path": "com/google/elemental2/elemental2-core/1.0.0-RC1/elemental2-core-1.0.0-RC1",
"host": "https://repo1.maven.org/maven2",
@ -428,6 +402,32 @@
}
},
{
"path": "com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "7d5e372ff32c90095800f96d8308c41af0285a41",
"sha256": "1dj7p0m0kwnjvy1y3kq63zb6bw0azjf79i5xbccmy3wv63b1vqrg"
},
"jar": {
"sha1": "7e060dd5b19431e6d198e91ff670644372f60fbd",
"sha256": "1hn5plp7iyl626h8mrra56sysfm2qannj1dapr1m5afwkb24vfk1"
}
},
{
"path": "com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "5e902aae26ac5c36f6420f689f43333129dd69e2",
"sha256": "10vzlnl8vbjv2jqf818wdb7kgy9c6qjka7fjmmi3vdpg1mcn6pv6"
},
"jar": {
"sha1": "c9ad4a0850ab676c5c64461a05ca524cdfff59f1",
"sha256": "170rflxnqnah0265ik2aylmxkshyqbf2zas9bp2l32xqj9l6jsaf"
}
},
{
"path": "com/ibm/icu/icu4j/66.1/icu4j-66.1",
"host": "https://repo1.maven.org/maven2",
@ -441,58 +441,6 @@
}
},
{
"path": "commons-codec/commons-codec/1.10/commons-codec-1.10",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "44b9477418d2942d45550f7e7c66c16262062d0e",
"sha256": "1yscxabk7i59vgfjg7c1y3prj39h1d8prnwgxbisc4ni29qdpf5x"
},
"jar": {
"sha1": "4b95f4897fa13f2cd904aee711aeafc0c5295cd8",
"sha256": "0scm6321zz76dc3bs8sy2qyami755lz4lq5455gl67bi9slxyha2"
}
},
{
"path": "commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "65112009d674333c1acfafb4e198ff250d710764",
"sha256": "007nyd66fqp3fbrmnsbfp1fpkhmr2lk33qmkp3salqld3xd7qlc8"
},
"jar": {
"sha1": "f95188e3d372e20e7328706c37ef366e5d7859b0",
"sha256": "1xyyl54sfxsdcwxdyq6b0azmr31b4dwqns850jjkw9a9dwrh5v54"
}
},
{
"path": "commons-io/commons-io/2.6/commons-io-2.6",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "5060835593e5b6ed18c82fc2e782f0a3c30a00b1",
"sha256": "0q4a6fp6xkyd86ikymkyv2plhf9vj8aqvggxg9d1yad2jcw8c8qc"
},
"jar": {
"sha1": "815893df5f31da2ece4040fe0a12fd44b577afaf",
"sha256": "04v5fg53jl9gbn6pyz3l7kbpxv0xjzyasnw6yd1a3hhacq2d6xzq"
}
},
{
"path": "compojure/compojure/1.5.2/compojure-1.5.2",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "9e8da477b6682094d56802cb155291a2acb829bd",
"sha256": "036z64iprypccz03iq7lqxvw99xjh4xlsfmfwbs37pmhfnfmbdnx"
},
"jar": {
"sha1": "0b5258d0616ffc5f64c2b6d95f09de56d24df439",
"sha256": "1s2k05lwnlm9a66mxnsss437i9gp70dny8y2rlfkl090s6mdqsaf"
}
},
{
"path": "com/taoensso/encore/2.105.0/encore-2.105.0",
"host": "https://repo.clojars.org",
@ -571,6 +519,58 @@
}
},
{
"path": "commons-codec/commons-codec/1.10/commons-codec-1.10",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "44b9477418d2942d45550f7e7c66c16262062d0e",
"sha256": "1yscxabk7i59vgfjg7c1y3prj39h1d8prnwgxbisc4ni29qdpf5x"
},
"jar": {
"sha1": "4b95f4897fa13f2cd904aee711aeafc0c5295cd8",
"sha256": "0scm6321zz76dc3bs8sy2qyami755lz4lq5455gl67bi9slxyha2"
}
},
{
"path": "commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "65112009d674333c1acfafb4e198ff250d710764",
"sha256": "007nyd66fqp3fbrmnsbfp1fpkhmr2lk33qmkp3salqld3xd7qlc8"
},
"jar": {
"sha1": "f95188e3d372e20e7328706c37ef366e5d7859b0",
"sha256": "1xyyl54sfxsdcwxdyq6b0azmr31b4dwqns850jjkw9a9dwrh5v54"
}
},
{
"path": "commons-io/commons-io/2.6/commons-io-2.6",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "5060835593e5b6ed18c82fc2e782f0a3c30a00b1",
"sha256": "0q4a6fp6xkyd86ikymkyv2plhf9vj8aqvggxg9d1yad2jcw8c8qc"
},
"jar": {
"sha1": "815893df5f31da2ece4040fe0a12fd44b577afaf",
"sha256": "04v5fg53jl9gbn6pyz3l7kbpxv0xjzyasnw6yd1a3hhacq2d6xzq"
}
},
{
"path": "compojure/compojure/1.5.2/compojure-1.5.2",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "9e8da477b6682094d56802cb155291a2acb829bd",
"sha256": "036z64iprypccz03iq7lqxvw99xjh4xlsfmfwbs37pmhfnfmbdnx"
},
"jar": {
"sha1": "0b5258d0616ffc5f64c2b6d95f09de56d24df439",
"sha256": "1s2k05lwnlm9a66mxnsss437i9gp70dny8y2rlfkl090s6mdqsaf"
}
},
{
"path": "crypto-equality/crypto-equality/1.0.0/crypto-equality-1.0.0",
"host": "https://repo.clojars.org",
@ -974,19 +974,6 @@
}
},
{
"path": "org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "dea94d117aa88d75e281f877914454f79df06bf2",
"sha256": "1nysls9ywj3b3zvlfwy68kayx47r4bacidmq1vx8w4h043l9kxrr"
},
"jar": {
"sha1": "6025affb7181cd40418600864f58eed1ea80055d",
"sha256": "0w6waii2qps7vp3nzbj5nai809xdq26ss0cabl4wz1s8fc6js6qw"
}
},
{
"path": "org/clojure/google-closure-library-third-party/0.0-20191016-6ae1f72f/google-closure-library-third-party-0.0-20191016-6ae1f72f",
"host": "https://repo1.maven.org/maven2",
@ -1000,6 +987,19 @@
}
},
{
"path": "org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "dea94d117aa88d75e281f877914454f79df06bf2",
"sha256": "1nysls9ywj3b3zvlfwy68kayx47r4bacidmq1vx8w4h043l9kxrr"
},
"jar": {
"sha1": "6025affb7181cd40418600864f58eed1ea80055d",
"sha256": "0w6waii2qps7vp3nzbj5nai809xdq26ss0cabl4wz1s8fc6js6qw"
}
},
{
"path": "org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176",
"host": "https://repo1.maven.org/maven2",
@ -1026,19 +1026,6 @@
}
},
{
"path": "org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "fa72b6392b31762b55e0dc3de1c220ecdc6bb8a7",
"sha256": "1yg46a9zbga7rsrhwdv877hh60hcbyaykn37r3i50icxmgqcylq4"
},
"jar": {
"sha1": "d2fb65426c7998647fb1fb3db1fb5b222ab91df6",
"sha256": "0mj1xi3v03fzcw1smpayvbvbgly2p3ysbgfz7jgfdhmxi4gl6gs6"
}
},
{
"path": "org/clojure/tools.analyzer.jvm/1.1.0/tools.analyzer.jvm-1.1.0",
"host": "https://repo1.maven.org/maven2",
@ -1052,6 +1039,19 @@
}
},
{
"path": "org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "fa72b6392b31762b55e0dc3de1c220ecdc6bb8a7",
"sha256": "1yg46a9zbga7rsrhwdv877hh60hcbyaykn37r3i50icxmgqcylq4"
},
"jar": {
"sha1": "d2fb65426c7998647fb1fb3db1fb5b222ab91df6",
"sha256": "0mj1xi3v03fzcw1smpayvbvbgly2p3ysbgfz7jgfdhmxi4gl6gs6"
}
},
{
"path": "org/clojure/tools.cli/1.0.194/tools.cli-1.0.194",
"host": "https://repo1.maven.org/maven2",
@ -1117,19 +1117,6 @@
}
},
{
"path": "org/graalvm/js/js/20.1.0/js-20.1.0",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "95452a7fdac1d358f1dd66b33e49f4440e986922",
"sha256": "0gkazzg8771g3pc90fb99wmlk99rjimcryrmzz6zab742m4dbina"
},
"jar": {
"sha1": "0abe5e8068014ccb34cf075637a00b7ce37e4a8c",
"sha256": "0v5pxjl9p7wwfrrzkkqh6qbvnn0p8n342smxzcqk3qxl4ah3aqnk"
}
},
{
"path": "org/graalvm/js/js-scriptengine/20.1.0/js-scriptengine-20.1.0",
"host": "https://repo1.maven.org/maven2",
@ -1143,6 +1130,19 @@
}
},
{
"path": "org/graalvm/js/js/20.1.0/js-20.1.0",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "95452a7fdac1d358f1dd66b33e49f4440e986922",
"sha256": "0gkazzg8771g3pc90fb99wmlk99rjimcryrmzz6zab742m4dbina"
},
"jar": {
"sha1": "0abe5e8068014ccb34cf075637a00b7ce37e4a8c",
"sha256": "0v5pxjl9p7wwfrrzkkqh6qbvnn0p8n342smxzcqk3qxl4ah3aqnk"
}
},
{
"path": "org/graalvm/regex/regex/20.1.0/regex-20.1.0",
"host": "https://repo1.maven.org/maven2",
@ -1273,19 +1273,6 @@
}
},
{
"path": "org/ow2/asm/asm/7.1/asm-7.1",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "7e40eb6619fd20bd7d98bf775bfdd810aec87ac7",
"sha256": "101i3pyrq082kjyz413hfqwkjjsyfnk9kx3rqr38ln56mlp78a8g"
},
"jar": {
"sha1": "fa29aa438674ff19d5e1386d2c3527a0267f291e",
"sha256": "1pnlb1ick32bihpzc599xl9ppd07qhls6pm0xaqwrj9cdlmzmcja"
}
},
{
"path": "org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1",
"host": "https://repo1.maven.org/maven2",
@ -1338,6 +1325,19 @@
}
},
{
"path": "org/ow2/asm/asm/7.1/asm-7.1",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "7e40eb6619fd20bd7d98bf775bfdd810aec87ac7",
"sha256": "101i3pyrq082kjyz413hfqwkjjsyfnk9kx3rqr38ln56mlp78a8g"
},
"jar": {
"sha1": "fa29aa438674ff19d5e1386d2c3527a0267f291e",
"sha256": "1pnlb1ick32bihpzc599xl9ppd07qhls6pm0xaqwrj9cdlmzmcja"
}
},
{
"path": "org/wildfly/client/wildfly-client-config/1.0.1.Final/wildfly-client-config-1.0.1.Final",
"host": "https://repo1.maven.org/maven2",
@ -1390,19 +1390,6 @@
}
},
{
"path": "reagent/reagent/0.10.0/reagent-0.10.0",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "0ced0db04eaf77ec3dfa7a3f56cc022fe2814d8b",
"sha256": "15cqnfwkzxia6bdjq1kism72jf66zdpldk0925313z41ynkqfr8r"
},
"jar": {
"sha1": "1a88fae22cd0f7f66bb181aa520da264a82f6942",
"sha256": "0vdvm75rpcq9kx2sp0jd2lsa70fv2xymy1g55ss972s85p5j50bm"
}
},
{
"path": "re-com/re-com/2.8.0/re-com-2.8.0",
"host": "https://repo.clojars.org",
@ -1416,19 +1403,6 @@
}
},
{
"path": "refactor-nrepl/refactor-nrepl/2.5.0/refactor-nrepl-2.5.0",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "0bce30b420249ba7e4b90cbb3e046b4bb5416389",
"sha256": "0zmg5qc8d55pry7832isiwd2q237znfjqjpxchd2hvlpalh5qnva"
},
"jar": {
"sha1": "6bc3441afc94f7ca024e41a864ca75e05df7e207",
"sha256": "0w8hax99y98l53mixxzx2ja0vcnhjv8dnsaz1zj3vqk775ns5w6i"
}
},
{
"path": "re-frame/re-frame/0.12.0/re-frame-0.12.0",
"host": "https://repo.clojars.org",
@ -1443,15 +1417,15 @@
},
{
"path": "re-frisk-remote/re-frisk-remote/1.3.11/re-frisk-remote-1.3.11",
"path": "re-frisk-remote/re-frisk-remote/1.6.0/re-frisk-remote-1.6.0",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "bd35e24adc571b642ec331bc7fb5746af806fece",
"sha256": "0a0lnh62hlq86c4nk6nwmpg2va5kb9pnslj0hkzrlbx79pmzczbl"
"sha1": "6b39ea7b345a81df08b80b411f9892b83f61890b",
"sha256": "0w577jvb7vgrdp29rfp85lvq3h3svycm6f0h29ln23j2qisqs7a8"
},
"jar": {
"sha1": "3821ad35fdc55b2e6e13871b6511fbc4159119a9",
"sha256": "0gg5wvfk6f8nmgm07n3whif2xrghais1mvclxyjg3nxfp6pgaq57"
"sha1": "dea48c4be6421c50c4bbf2c1be2ea3a6b2418d8d",
"sha256": "1rkfyc5fwbafx56a6zhy0k9ygmlxp9asqzby09a5xzjsmkrx2jf1"
}
},
@ -1468,6 +1442,32 @@
}
},
{
"path": "reagent/reagent/1.0.0/reagent-1.0.0",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "93ad5ccb0101108fb0843a3f2c50da28f8fd8336",
"sha256": "1l4xzgc4wbd8b29mhj5j336cf8w1zccaia0w413zf3bnj6jf5m38"
},
"jar": {
"sha1": "a1dd4d40425bb2e1afad0fe72780b43ff394ccfa",
"sha256": "1g607s1ymns85923bvhwrsj0y5czyqqq1jmxx0a58fnsm1b318fa"
}
},
{
"path": "refactor-nrepl/refactor-nrepl/2.5.0/refactor-nrepl-2.5.0",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "0bce30b420249ba7e4b90cbb3e046b4bb5416389",
"sha256": "0zmg5qc8d55pry7832isiwd2q237znfjqjpxchd2hvlpalh5qnva"
},
"jar": {
"sha1": "6bc3441afc94f7ca024e41a864ca75e05df7e207",
"sha256": "0w8hax99y98l53mixxzx2ja0vcnhjv8dnsaz1zj3vqk775ns5w6i"
}
},
{
"path": "rewrite-clj/rewrite-clj/0.6.1/rewrite-clj-0.6.1",
"host": "https://repo.clojars.org",

View File

@ -6,9 +6,9 @@ cider/cider-nrepl/0.25.3/cider-nrepl-0.25.3.jar
cider/piggieback/0.4.1/piggieback-0.4.1.jar
cljfmt/cljfmt/0.6.7/cljfmt-0.6.7.jar
cljs-bean/cljs-bean/1.3.0/cljs-bean-1.3.0.jar
cljsjs/react/16.13.0-0/react-16.13.0-0.jar
cljsjs/react-dom/16.13.0-0/react-dom-16.13.0-0.jar
cljsjs/react-dom-server/16.13.0-0/react-dom-server-16.13.0-0.jar
cljsjs/react-dom-server/17.0.1-0/react-dom-server-17.0.1-0.jar
cljsjs/react-dom/17.0.1-0/react-dom-17.0.1-0.jar
cljsjs/react/17.0.1-0/react-17.0.1-0.jar
clout/clout/2.1.2/clout-2.1.2.jar
com/andrewmcveigh/cljs-time/0.5.2/cljs-time-0.5.2.jar
com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar
@ -19,8 +19,6 @@ com/cognitect/transit-js/0.8.846/transit-js-0.8.846.jar
com/fasterxml/jackson/core/jackson-core/2.8.7/jackson-core-2.8.7.jar
com/google/code/findbugs/jsr305/3.0.1/jsr305-3.0.1.jar
com/google/code/gson/gson/2.7/gson-2.7.jar
com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar
com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar
com/google/elemental2/elemental2-core/1.0.0-RC1/elemental2-core-1.0.0-RC1.jar
com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar
com/google/guava/guava/25.1-jre/guava-25.1-jre.jar
@ -31,17 +29,19 @@ com/google/jsinterop/base/1.0.0/base-1.0.0.jar
com/google/jsinterop/jsinterop-annotations/1.0.2/jsinterop-annotations-1.0.2.jar
com/google/protobuf/protobuf-java/3.11.1/protobuf-java-3.11.1.jar
com/google/re2j/re2j/1.3/re2j-1.3.jar
com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar
com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar
com/ibm/icu/icu4j/66.1/icu4j-66.1.jar
commons-codec/commons-codec/1.10/commons-codec-1.10.jar
commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar
commons-io/commons-io/2.6/commons-io-2.6.jar
compojure/compojure/1.5.2/compojure-1.5.2.jar
com/taoensso/encore/2.105.0/encore-2.105.0.jar
com/taoensso/timbre/4.10.0/timbre-4.10.0.jar
com/taoensso/truss/1.5.0/truss-1.5.0.jar
com/taoensso/tufte/2.1.0/tufte-2.1.0.jar
com/wsscode/pathom/2.2.31/pathom-2.2.31.jar
com/wsscode/spec-inspec/1.0.0-alpha2/spec-inspec-1.0.0-alpha2.jar
commons-codec/commons-codec/1.10/commons-codec-1.10.jar
commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar
commons-io/commons-io/2.6/commons-io-2.6.jar
compojure/compojure/1.5.2/compojure-1.5.2.jar
crypto-equality/crypto-equality/1.0.0/crypto-equality-1.0.0.jar
crypto-random/crypto-random/1.2.0/crypto-random-1.2.0.jar
day8/re-frame/test/0.1.5/test-0.1.5.jar
@ -73,19 +73,19 @@ org/clojure/core.rrb-vector/0.1.1/core.rrb-vector-0.1.1.jar
org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar
org/clojure/data.json/1.0.0/data.json-1.0.0.jar
org/clojure/data.priority-map/1.0.0/data.priority-map-1.0.0.jar
org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f.jar
org/clojure/google-closure-library-third-party/0.0-20191016-6ae1f72f/google-closure-library-third-party-0.0-20191016-6ae1f72f.jar
org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f.jar
org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar
org/clojure/test.check/1.1.0/test.check-1.1.0.jar
org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0.jar
org/clojure/tools.analyzer.jvm/1.1.0/tools.analyzer.jvm-1.1.0.jar
org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0.jar
org/clojure/tools.cli/1.0.194/tools.cli-1.0.194.jar
org/clojure/tools.logging/0.4.1/tools.logging-0.4.1.jar
org/clojure/tools.macro/0.1.5/tools.macro-0.1.5.jar
org/clojure/tools.reader/1.3.3/tools.reader-1.3.3.jar
org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar
org/graalvm/js/js/20.1.0/js-20.1.0.jar
org/graalvm/js/js-scriptengine/20.1.0/js-scriptengine-20.1.0.jar
org/graalvm/js/js/20.1.0/js-20.1.0.jar
org/graalvm/regex/regex/20.1.0/regex-20.1.0.jar
org/graalvm/sdk/graal-sdk/20.1.0/graal-sdk-20.1.0.jar
org/graalvm/truffle/truffle-api/20.1.0/truffle-api-20.1.0.jar
@ -96,21 +96,21 @@ org/jboss/xnio/xnio-api/3.8.0.Final/xnio-api-3.8.0.Final.jar
org/jboss/xnio/xnio-nio/3.8.0.Final/xnio-nio-3.8.0.Final.jar
org/jsoup/jsoup/1.9.2/jsoup-1.9.2.jar
org/msgpack/msgpack/0.6.12/msgpack-0.6.12.jar
org/ow2/asm/asm/7.1/asm-7.1.jar
org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1.jar
org/ow2/asm/asm-commons/7.1/asm-commons-7.1.jar
org/ow2/asm/asm-tree/7.1/asm-tree-7.1.jar
org/ow2/asm/asm-util/7.1/asm-util-7.1.jar
org/ow2/asm/asm/7.1/asm-7.1.jar
org/wildfly/client/wildfly-client-config/1.0.1.Final/wildfly-client-config-1.0.1.Final.jar
org/wildfly/common/wildfly-common/1.5.2.Final/wildfly-common-1.5.2.Final.jar
prismatic/schema/1.1.7/schema-1.1.7.jar
quoin/quoin/0.1.2/quoin-0.1.2.jar
reagent/reagent/0.10.0/reagent-0.10.0.jar
re-com/re-com/2.8.0/re-com-2.8.0.jar
refactor-nrepl/refactor-nrepl/2.5.0/refactor-nrepl-2.5.0.jar
re-frame/re-frame/0.12.0/re-frame-0.12.0.jar
re-frisk-remote/re-frisk-remote/1.3.11/re-frisk-remote-1.3.11.jar
re-frisk-remote/re-frisk-remote/1.6.0/re-frisk-remote-1.6.0.jar
re-frisk/sente/1.15.0/sente-1.15.0.jar
reagent/reagent/1.0.0/reagent-1.0.0.jar
refactor-nrepl/refactor-nrepl/2.5.0/refactor-nrepl-2.5.0.jar
rewrite-clj/rewrite-clj/0.6.1/rewrite-clj-0.6.1.jar
rewrite-cljs/rewrite-cljs/0.4.4/rewrite-cljs-0.4.4.jar
ring-cors/ring-cors/0.1.8/ring-cors-0.1.8.jar

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 735 B

After

Width:  |  Height:  |  Size: 735 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -74,9 +74,6 @@
(def animated-view
(reagent/adapt-react-class (.-View ^js animated)))
(def animated-image-view
(reagent/adapt-react-class (.-Image ^js animated)))
(def ui-manager (.-UIManager ^js rn))
(def layout-animation (.-LayoutAnimation ^js rn))

View File

@ -16,6 +16,7 @@
(fx/merge cofx
{:init-root-fx :progress
:chat.ui/clear-inputs nil
:new-ui/reset-bottom-tabs nil
:hide-popover nil
::logout nil
::multiaccounts/webview-debug-changed false

View File

@ -12,8 +12,9 @@
[_]
(swap! config/new-ui-enabled? not)
(reloader/reload)
{:dispatch [:init-root (if @config/new-ui-enabled? :home-stack :chat-stack)]
::async-storage/set! {:new-ui-enabled? @config/new-ui-enabled?}})
{:new-ui/reset-bottom-tabs nil
:dispatch [:init-root (if @config/new-ui-enabled? :home-stack :chat-stack)]
::async-storage/set! {:new-ui-enabled? @config/new-ui-enabled?}})
(fx/defn init-root-nav2
{:events [:init-root-nav2]}

View File

@ -1,29 +0,0 @@
(ns status-im.navigation2.home-stack
(:require [quo.react-native :as rn]
[quo2.screens.main :as quo2.preview]
[status-im.switcher.switcher :as switcher]
[status-im.ui.screens.home.views :as home]
[status-im.switcher.constants :as switcher-constants]
[status-im.ui.screens.profile.user.views :as profile.user]
;; [status-im.ui.screens.browser.empty-tab.views :as empty-tab]
[status-im.ui.screens.wallet.accounts.views :as wallet.accounts]
[status-im.switcher.bottom-tabs :as bottom-tabs]))
;; TODO(parvesh) - improve stack changing performance (load all stacks at once)
(defn stack-view []
(let [{:keys [width height]} (switcher-constants/dimensions)]
;; bottom-tabs-height (switcher-constants/bottom-tabs-height)]
[rn/view {:style {:width width
:height (- height 80)}} ;; TODO(parvesh) - add height for ios
(case @bottom-tabs/selected-tab-id
:chats-stack [home/home]
:communities-stack [quo2.preview/main-screen]
:wallet-stack [wallet.accounts/accounts-overview]
;;:browser-stack [empty-tab/empty-tab])]))
:browser-stack [profile.user/my-profile])]))
(defn home []
[:<>
[stack-view]
[bottom-tabs/bottom-tabs]
[switcher/switcher :home-stack]])

View File

@ -1,6 +1,6 @@
(ns status-im.navigation2.screens
(:require [status-im.ui.screens.chat.views :as chat]
[status-im.navigation2.home-stack :as home-stack]
[status-im.switcher.home-stack :as home-stack]
[status-im.navigation2.stack-with-switcher :as stack-with-switcher]))
;; We have to use the home screen name :chat-stack for now, for compatibility with navigation.cljs

View File

@ -1,7 +1,10 @@
(ns status-im.navigation2.stack-with-switcher
(:require [status-im.switcher.switcher :as switcher]))
(:require [quo.react-native :as rn]
[status-im.utils.platform :as platform]
[status-im.switcher.switcher :as switcher]))
(defn overlap-stack [comp view-id]
[:<>
[rn/view {:style {:flex 1
:margin-bottom (if platform/ios? 30 0)}}
[comp]
[switcher/switcher view-id]])

View File

@ -46,7 +46,8 @@
:collectible (js/require "../resources/images/ui/collectible.png")
:collectible-dark (js/require "../resources/images/ui/collectible-dark.png")
:hand-wave (js/require "../resources/images/ui/hand-wave.png")
:graph (js/require "../resources/images/ui/graph.png")})
:graph (js/require "../resources/images/ui/graph.png")
:switcher (js/require "../resources/images/ui/switcher.png")})
(defn get-theme-image [k]
(get ui (when (colors/dark?) (keyword (str (name k) "-dark"))) (get ui k)))

View File

@ -1,47 +1,65 @@
(ns status-im.switcher.animation
(:require [quo.react-native :as rn]
[reagent.core :as reagent]
[status-im.switcher.constants :as constants]
[status-im.ui.components.animation :as anim]))
(:require [quo2.reanimated :as reanimated]
[status-im.switcher.constants :as constants]))
(def bottom-tabs-opacity (anim/create-value 1))
(def bottom-tabs-position (anim/create-value 0))
;;;; Switcher Animations
;; TODO(parvesh): Use 300, after using dispatch-later for opening card(otherwise pending animation issue)
;; or OnAnimationEnd
(def layout-animation #js {:duration 250
:create #js {:type (:ease-in-ease-out rn/layout-animation-types)
:property (:scale-xy rn/layout-animation-properties)}
:update #js {:type (:ease-in-ease-out rn/layout-animation-types)
:property (:scale-xy rn/layout-animation-properties)}
:delete #js {:type (:ease-in-ease-out rn/layout-animation-types)
:property (:scale-xy rn/layout-animation-properties)}})
;; Component Animations
(defn switcher-touchable-on-press-in
[touchable-scale]
(reanimated/animate-shared-value-with-timing touchable-scale constants/switcher-pressed-scale 300 :easing1))
(defn animate-layout [show? anim-values]
(let [{:keys [width height]} (constants/dimensions)
target-radius (- (max width height)
constants/switcher-button-radius)]
(rn/configure-next layout-animation)
(reset! (:switcher-screen-radius anim-values) (if show? target-radius 1))
(reagent/flush)))
(defn switcher-touchable-on-press-out [switcher-opened? view-id shared-values]
(let [{:keys [width height]} (constants/dimensions)
switcher-bottom-position (constants/switcher-pressed-bottom-position view-id)
switcher-target-radius (Math/hypot
(/ width 2)
(- height constants/switcher-pressed-radius switcher-bottom-position))
switcher-size (* 2 switcher-target-radius)]
(reanimated/animate-shared-value-with-timing (:button-touchable-scale shared-values) 1 300 :easing1)
(if @switcher-opened?
(do
(reanimated/animate-shared-value-with-timing (:switcher-button-opacity shared-values) 1 300 :easing1)
(reanimated/animate-shared-value-with-timing (:switcher-screen-size shared-values) constants/switcher-pressed-size 300 :linear)
(reanimated/animate-shared-value-with-timing (:switcher-container-scale shared-values) 0.9 300 :linear))
(do
(reanimated/animate-shared-value-with-timing (:switcher-button-opacity shared-values) 0 300 :easing1)
(reanimated/animate-shared-value-with-timing (:switcher-screen-size shared-values) switcher-size 300 :linear)
(reanimated/animate-shared-value-with-timing (:switcher-container-scale shared-values) 1 300 :linear)))
(swap! switcher-opened? not)))
(defn timing-animation [property toValue]
(anim/timing property {:toValue toValue
:duration 300
:useNativeDriver true}))
;; Derived Values
(defn animate-components [show? view-id anim-values]
(anim/start
(anim/parallel
(into
[(timing-animation (:switcher-button-opacity anim-values) (if show? 0 1))
(timing-animation (:switcher-close-button-icon-opacity anim-values) (if show? 1 0))
(timing-animation (:switcher-close-button-background-opacity anim-values) (if show? 0.2 0))]
(when (= view-id :home-stack)
[(timing-animation bottom-tabs-opacity (if show? 0 1))
(timing-animation bottom-tabs-position (if show? (constants/bottom-tabs-height) 0))])))))
(defn switcher-close-button-opacity [switcher-button-opacity]
(.switcherCloseButtonOpacity ^js reanimated/worklet-factory switcher-button-opacity))
(defn animate [show? view-id anim-values]
(reagent/flush)
(animate-layout show? anim-values)
(animate-components show? view-id anim-values))
(defn switcher-screen-radius [switcher-screen-size]
(.switcherScreenRadius ^js reanimated/worklet-factory switcher-screen-size))
(defn switcher-screen-bottom-position [switcher-screen-radius view-id]
(.switcherScreenBottomPosition ^js reanimated/worklet-factory
switcher-screen-radius
constants/switcher-pressed-radius
(constants/switcher-pressed-bottom-position view-id)))
(defn switcher-container-bottom-position [switcher-screen-bottom]
(.switcherContainerBottomPosition ^js reanimated/worklet-factory
switcher-screen-bottom
(+ constants/switcher-container-height-padding
constants/switcher-height-offset)))
;;;; Bottom Tabs & Home Stack Animations
(defn bottom-tab-on-press [shared-values selected-stack-id]
(doseq [id constants/stacks-ids]
(let [selected-tab? (= id selected-stack-id)
tab-opacity-shared-value (get shared-values (get constants/tabs-opacity-keywords id))
stack-opacity-shared-value (get shared-values (get constants/stacks-opacity-keywords id))
stack-pointer-shared-value (get shared-values (get constants/stacks-pointer-keywords id))]
(reanimated/animate-shared-value-with-timing tab-opacity-shared-value (if selected-tab? 1 0) 300 :easing3)
(reanimated/set-shared-value stack-pointer-shared-value (if selected-tab? "auto" "none"))
(if selected-tab?
(reanimated/animate-shared-value-with-delay stack-opacity-shared-value 1 300 :easing3 150)
(reanimated/animate-shared-value-with-timing stack-opacity-shared-value 0 300 :easing3)))))

View File

@ -1,30 +1,67 @@
(ns status-im.switcher.bottom-tabs
(:require [quo.react-native :as rn]
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[quo2.reanimated :as reanimated]
[status-im.switcher.styles :as styles]
[status-im.switcher.constants :as constants]
[status-im.switcher.animation :as animation]
[status-im.ui.components.icons.icons :as icons]))
(def selected-tab-id (reagent/atom :chats-stack))
(def selected-stack-id (atom :communities-stack))
(defn bottom-tab-pressed [tab-id]
(when-not (= tab-id @selected-tab-id)
(reset! selected-tab-id tab-id)))
;; Reagent atoms used for lazily loading home screen tabs
(def load-communities-tab? (reagent/atom true))
(def load-chats-tab? (reagent/atom false))
(def load-wallet-tab? (reagent/atom false))
(def load-browser-tab? (reagent/atom false))
(re-frame/reg-fx
:new-ui/reset-bottom-tabs
(fn []
(reset! selected-stack-id :communities-stack)
(reset! load-communities-tab? true)
(reset! load-chats-tab? false)
(reset! load-wallet-tab? false)
(reset! load-browser-tab? false)))
(defn bottom-tab-on-press [shared-values stack-id]
(when-not (= stack-id @selected-stack-id)
(reset! selected-stack-id stack-id)
(animation/bottom-tab-on-press shared-values stack-id)
(case stack-id
:communities-stack (reset! load-communities-tab? true)
:chats-stack (reset! load-chats-tab? true)
:wallet-stack (reset! load-wallet-tab? true)
:browser-stack (reset! load-browser-tab? true))))
;; TODO(parvesh) - reimplement tab with counter, once design is complete
;; (implement natively, for performance improvement)
(defn bottom-tab [icon tab-id]
[rn/touchable-opacity {:style {:padding 15}
:active-opacity 1
:on-press #(bottom-tab-pressed tab-id)}
[icons/icon icon (styles/bottom-tab-icon
(if (= tab-id @selected-tab-id)
:bottom-tabs-selected-tab
:bottom-tabs-non-selected-tab))]])
(defn bottom-tab [icon stack-id icons-only? shared-values]
[:f>
(fn []
(let [bottom-tab-original-style {:padding 16}]
(if icons-only?
[rn/touchable-opacity {:active-opacity 1
:style bottom-tab-original-style
:on-press #(bottom-tab-on-press shared-values stack-id)}
[reanimated/view {:style (reanimated/apply-animations-to-style
{:opacity (get
shared-values
(get constants/tabs-opacity-keywords stack-id))}
{})}
[icons/icon icon (styles/bottom-tab-icon :bottom-tabs-selected-tab)]]]
[rn/view {:style bottom-tab-original-style}
[icons/icon icon (styles/bottom-tab-icon :bottom-tabs-non-selected-tab)]])))])
(defn bottom-tabs []
[rn/animated-view {:style (styles/bottom-tabs)}
[bottom-tab :main-icons/redesign-messages :chats-stack]
[bottom-tab :main-icons/communities :communities-stack]
[rn/view {:width 10}]
[bottom-tab :main-icons/redesign-wallet :wallet-stack]
[bottom-tab :main-icons/browser :browser-stack]])
(defn tabs [shared-values icons-only?]
[rn/view {:style (styles/bottom-tabs icons-only?)}
[bottom-tab :main-icons/redesign-communities24 :communities-stack icons-only? shared-values]
[bottom-tab :main-icons/redesign-messages24 :chats-stack icons-only? shared-values]
[rn/view {:width 50}]
[bottom-tab :main-icons/redesign-wallet24 :wallet-stack icons-only? shared-values]
[bottom-tab :main-icons/redesign-browser24 :browser-stack icons-only? shared-values]])
(defn bottom-tabs [shared-values]
[:<>
[tabs shared-values false]
[tabs shared-values true]])

View File

@ -6,8 +6,10 @@
[status-im.utils.handlers :refer [>evt <sub]]
[status-im.switcher.cards.styles :as styles]))
;; TODO - Add switcher close animation (fade) while opening screen from cards
;; currently dealy is added to avoid default circular animation
(defn on-press [id toggle-switcher-screen]
(toggle-switcher-screen)
(js/setTimeout toggle-switcher-screen 100)
(>evt [:chat.ui/navigate-to-chat-nav2 id true]))
;; TODO - add last message for other content types

View File

@ -2,17 +2,32 @@
(:require [status-im.utils.handlers :refer [<sub]]
[status-im.utils.platform :as platform]))
;; For translucent status bar, dimensions/window also includes status bar's height,
;; this offset is used for correctly calculating switcher position
(def switcher-height-offset 24)
;; extra height of switcher container for show/peek hidden cards while opening animation
(def switcher-container-height-padding 100)
(def switcher-button-radius 24)
(def switcher-button-size
(* switcher-button-radius 2))
(def switcher-pressed-scale 0.9)
(def switcher-pressed-radius
(* switcher-pressed-scale switcher-button-radius))
(def switcher-pressed-size
(* 2 switcher-pressed-radius))
(def switcher-bottom-positions
{:android
{:home-stack 17
{:home-stack 15
:chat 57}
:ios
{:home-stack 35
{:home-stack 40
:chat 67}})
(defn switcher-bottom-position [view-id]
@ -20,13 +35,36 @@
switcher-bottom-positions
[(keyword platform/os) view-id]))
(defn switcher-center-position [view-id]
(+ (switcher-bottom-position view-id) (/ switcher-button-size 2)))
(defn switcher-pressed-bottom-position [view-id]
(+
(get-in
switcher-bottom-positions
[(keyword platform/os) view-id])
(- switcher-button-radius switcher-pressed-radius)))
;; TODO(parvesh) - use different height for android and ios(Confirm from Design)
(defn bottom-tabs-height []
(if platform/android? 55 80))
;; TODO - move to switcher/utils.cljs
(defn dimensions []
(<sub [:dimensions/window]))
(def stacks-ids [:communities-stack :chats-stack :wallet-stack :browser-stack])
(def stacks-opacity-keywords
{:communities-stack :communities-stack-opacity
:chats-stack :chats-stack-opacity
:wallet-stack :wallet-stack-opacity
:browser-stack :browser-stack-opacity})
(def stacks-pointer-keywords
{:communities-stack :communities-stack-pointer
:chats-stack :chats-stack-pointer
:wallet-stack :wallet-stack-pointer
:browser-stack :browser-stack-pointer})
(def tabs-opacity-keywords
{:communities-stack :communities-tab-opacity
:chats-stack :chats-tab-opacity
:wallet-stack :wallet-tab-opacity
:browser-stack :browser-tab-opacity})

View File

@ -0,0 +1,63 @@
(ns status-im.switcher.home-stack
(:require [quo2.reanimated :as reanimated]
[quo2.screens.main :as quo2.preview]
[status-im.utils.platform :as platform]
[status-im.switcher.switcher :as switcher]
[status-im.ui.screens.home.views :as home]
[status-im.switcher.constants :as constants]
[status-im.switcher.bottom-tabs :as bottom-tabs]
[status-im.ui.screens.profile.user.views :as profile.user]
[status-im.ui.screens.wallet.accounts.views :as wallet.accounts]))
(defn load-stack? [stack-id]
(case stack-id
:communities-stack @bottom-tabs/load-communities-tab?
:chats-stack @bottom-tabs/load-chats-tab?
:browser-stack @bottom-tabs/load-browser-tab?
:wallet-stack @bottom-tabs/load-wallet-tab?))
(defn stack-view [stack-id shared-values top-margin]
(when (load-stack? stack-id)
[:f>
(fn []
[reanimated/view {:style (reanimated/apply-animations-to-style
{:opacity (get shared-values (get constants/stacks-opacity-keywords stack-id))
:pointer-events (get shared-values (get constants/stacks-pointer-keywords stack-id))}
{:top top-margin
:bottom (if platform/ios? 79 55)
:left 0
:right 0
:position :absolute})}
(case stack-id
:communities-stack [quo2.preview/main-screen]
:chats-stack [home/home]
:wallet-stack [wallet.accounts/accounts-overview]
:browser-stack [profile.user/my-profile])])]))
(defn home-stack [shared-values]
[:<>
[stack-view :communities-stack shared-values (if platform/ios? 47 0)]
[stack-view :chats-stack shared-values (if platform/ios? 47 0)]
[stack-view :browser-stack shared-values 0]
[stack-view :wallet-stack shared-values 0]])
(defn home []
[:f>
(fn []
(let [selected-stack-id @bottom-tabs/selected-stack-id
shared-values (reduce (fn [acc id]
(let [selected-tab? (= id selected-stack-id)
tab-opacity-keyword (get constants/tabs-opacity-keywords id)
stack-opacity-keyword (get constants/stacks-opacity-keywords id)
stack-pointer-keyword (get constants/stacks-pointer-keywords id)]
(assoc
acc
tab-opacity-keyword (reanimated/use-shared-value (if selected-tab? 1 0))
stack-opacity-keyword (reanimated/use-shared-value (if selected-tab? 1 0))
stack-pointer-keyword (reanimated/use-shared-value (if selected-tab? "auto" "none")))))
{}
constants/stacks-ids)]
[:<>
[home-stack shared-values]
[bottom-tabs/bottom-tabs shared-values]
[switcher/switcher :home-stack]]))])

View File

@ -1,47 +1,46 @@
(ns status-im.switcher.styles
(:require [quo.theme :as theme]
[quo2.foundations.colors :as colors]
[status-im.switcher.constants :as constants]
[status-im.switcher.animation :as animation]))
[status-im.switcher.constants :as constants]))
(def themes
{:light {:bottom-tabs-bg-color colors/neutral-80
:bottom-tabs-on-scroll-bg-color colors/neutral-80-opa-80
:bottom-tabs-non-selected-tab colors/neutral-50
:bottom-tabs-selected-tab colors/white}
:bottom-tabs-selected-tab colors/white
:switcher-close-button-bg-color colors/white}
:dark {:bottom-tabs-bg-color colors/neutral-80
:bottom-tabs-on-scroll-bg-color colors/neutral-80-opa-60
:bottom-tabs-non-selected-tab colors/neutral-40
:bottom-tabs-selected-tab colors/white}})
:bottom-tabs-on-scroll-bg-color colors/neutral-80-opa-80
:bottom-tabs-non-selected-tab colors/neutral-50
:bottom-tabs-selected-tab colors/white
:switcher-close-button-bg-color colors/white}})
(defn get-color [key]
(get-in themes [(theme/get-theme) key]))
;; Bottom Tabs
(defn bottom-tab-icon [tab-state]
{:width 20
:height 20
{:width 24
:height 24
:color (get-color tab-state)})
(defn bottom-tabs []
{:background-color (get-color :bottom-tabs-bg-color)
:flex-direction :row
:flex 1
:align-items :center
:justify-content :space-around
:height (constants/bottom-tabs-height)
:position :absolute
:bottom -1
:right 0
:left 0
:opacity animation/bottom-tabs-opacity
:transform [{:translateY animation/bottom-tabs-position}]})
(defn bottom-tabs [icons-only?]
{:background-color (if icons-only? nil (get-color :bottom-tabs-bg-color))
:flex-direction :row
:flex 1
:justify-content :space-between
:height (constants/bottom-tabs-height)
:position :absolute
:bottom -1
:right 0
:left 0
:padding-horizontal 16})
;; Switcher
(defn switcher-button [opacity]
(defn switcher-button []
{:width constants/switcher-button-size
:height constants/switcher-button-size
:opacity opacity})
:z-index 2})
(defn merge-switcher-button-common-styles [style]
(merge
@ -49,8 +48,7 @@
:height constants/switcher-button-size
:border-radius constants/switcher-button-radius
:position :absolute
:bottom 0
:z-index 3
:z-index 2
:align-items :center
:align-self :center
:justify-content :center}
@ -58,39 +56,26 @@
(defn switcher-button-touchable [view-id]
(merge-switcher-button-common-styles
{:align-self :center
:bottom (constants/switcher-bottom-position view-id)}))
{:bottom (constants/switcher-bottom-position view-id)}))
(defn switcher-close-button-background [opacity]
(defn switcher-close-button []
(merge-switcher-button-common-styles
{:background-color colors/switcher-background
:opacity opacity}))
{:backgroundColor (get-color :switcher-close-button-bg-color)}))
(defn switcher-close-button-icon [opacity]
(merge-switcher-button-common-styles
{:opacity opacity}))
(defn switcher-screen []
(dissoc
(merge-switcher-button-common-styles
{:background-color colors/switcher-background-opa-80
:z-index 1
:overflow :hidden})
:justify-content))
(defn switcher-screen [view-id radius]
(let [bottom (- (constants/switcher-center-position view-id) radius)
size (* 2 radius)]
(merge-switcher-button-common-styles
{:background-color colors/switcher-background-opa-80
:bottom bottom
:border-radius 1000
:width size
:overflow :hidden
:height size})))
(defn switcher-screen-container [view-id radius]
(let [radius radius
bottom (- radius (constants/switcher-center-position view-id))
{:keys [width height]} (constants/dimensions)]
{:position :absolute
:align-self :center
:bottom bottom
:width width
:height (- height 25)
:align-items :center}))
(defn switcher-screen-container []
(let [{:keys [width height]} (constants/dimensions)]
{:width width
:height (+ height constants/switcher-container-height-padding)
:align-items :center
:position :absolute}))
(defn switcher-switch-screen []
{:margin-top 40

View File

@ -1,44 +1,75 @@
(ns status-im.switcher.switcher
(:require [quo.react-native :as rn]
[reagent.core :as reagent]
(:require [reagent.core :as reagent]
[quo2.reanimated :as reanimated]
[quo2.foundations.colors :as colors]
[status-im.switcher.styles :as styles]
[status-im.ui.components.animation :as anim]
[status-im.switcher.constants :as constants]
[status-im.switcher.animation :as animation]
[status-im.ui.components.icons.icons :as icons]
[status-im.react-native.resources :as resources]
[status-im.switcher.switcher-container :as switcher-container]))
(defn toggle-switcher-screen [switcher-opened? view-id anim-values]
(swap! switcher-opened? not)
(animation/animate @switcher-opened? view-id anim-values))
(defn switcher-button [view-id toggle-switcher-screen-fn shared-values]
[:f>
(fn []
(let [touchable-original-style (styles/switcher-button-touchable view-id)
close-button-original-style (styles/switcher-close-button)
switcher-button-original-style (styles/switcher-button)
touchable-animated-style (reanimated/apply-animations-to-style
{:transform [{:scale (:button-touchable-scale shared-values)}]}
touchable-original-style)
close-button-animated-style (reanimated/apply-animations-to-style
{:opacity (:close-button-opacity shared-values)}
close-button-original-style)
switcher-button-animated-style (reanimated/apply-animations-to-style
{:opacity (:switcher-button-opacity shared-values)}
switcher-button-original-style)]
[reanimated/touchable-opacity {:active-opacity 1
:on-press-in #(animation/switcher-touchable-on-press-in
(:button-touchable-scale shared-values))
:on-press-out toggle-switcher-screen-fn
:style touchable-animated-style}
[reanimated/view {:style close-button-animated-style}
[icons/icon :main-icons/close {:color colors/black}]]
[reanimated/image {:source (resources/get-image :switcher)
:style switcher-button-animated-style}]]))])
(defn switcher-button [switcher-opened? view-id anim-values]
[rn/touchable-opacity {:active-opacity 1
:on-press #(toggle-switcher-screen switcher-opened? view-id anim-values)
:style (styles/switcher-button-touchable view-id)}
[rn/animated-view {:style (styles/switcher-close-button-background
(:switcher-close-button-background-opacity anim-values))}]
[rn/animated-view {:style (styles/switcher-close-button-icon
(:switcher-close-button-icon-opacity anim-values))}
[icons/icon :main-icons/close {:color :white}]]
[rn/animated-image-view {:source (resources/get-image :status-logo)
:style (styles/switcher-button
(:switcher-button-opacity anim-values))}]])
(defn switcher-screen [switcher-opened? view-id anim-values]
[rn/view {:style (styles/switcher-screen
view-id @(:switcher-screen-radius anim-values))
:pointer-events (if switcher-opened? :auto :none)}
[switcher-container/container
view-id @(:switcher-screen-radius anim-values)
#(toggle-switcher-screen switcher-opened? view-id anim-values)]])
(defn switcher-screen [toggle-switcher-screen-fn shared-values]
[:f>
(fn []
(let [switcher-screen-original-style (styles/switcher-screen)
switcher-container-original-style (styles/switcher-screen-container)
switcher-screen-animated-style (reanimated/apply-animations-to-style
{:width (:switcher-screen-size shared-values)
:height (:switcher-screen-size shared-values)
:bottom (:switcher-screen-bottom shared-values)
:border-radius (:switcher-screen-radius shared-values)}
switcher-screen-original-style)
switcher-container-animated-style (reanimated/apply-animations-to-style
{:bottom (:switcher-container-bottom shared-values)
:transform [{:scale (:switcher-container-scale shared-values)}]}
switcher-container-original-style)]
[reanimated/view {:style switcher-screen-animated-style}
[reanimated/view {:style switcher-container-animated-style}
[switcher-container/tabs toggle-switcher-screen-fn]]]))])
(defn switcher [view-id]
(let [switcher-opened? (reagent/atom false)
anim-values {:switcher-button-opacity (anim/create-value 1)
:switcher-close-button-icon-opacity (anim/create-value 0)
:switcher-close-button-background-opacity (anim/create-value 0)
:switcher-screen-radius (reagent/atom 1)}]
[:<>
[switcher-screen switcher-opened? view-id anim-values]
[switcher-button switcher-opened? view-id anim-values]]))
[:f>
(fn []
(let [switcher-opened? (reagent/atom false)
switcher-button-opacity (reanimated/use-shared-value 1)
switcher-screen-size (reanimated/use-shared-value constants/switcher-pressed-size)
switcher-screen-radius (animation/switcher-screen-radius switcher-screen-size)
switcher-screen-bottom (animation/switcher-screen-bottom-position switcher-screen-radius view-id)
shared-values {:switcher-button-opacity switcher-button-opacity
:switcher-screen-size switcher-screen-size
:switcher-screen-radius switcher-screen-radius
:switcher-screen-bottom switcher-screen-bottom
:button-touchable-scale (reanimated/use-shared-value 1)
:switcher-container-scale (reanimated/use-shared-value 0.9)
:close-button-opacity (animation/switcher-close-button-opacity switcher-button-opacity)
:switcher-container-bottom (animation/switcher-container-bottom-position switcher-screen-bottom)}
toggle-switcher-screen-fn #(animation/switcher-touchable-on-press-out switcher-opened? view-id shared-values)]
[:<>
[switcher-screen toggle-switcher-screen-fn shared-values]
[switcher-button view-id toggle-switcher-screen-fn shared-values]]))])

View File

@ -28,7 +28,5 @@
:num-columns 2
:key-fn str}]]))
(defn container [view-id switcher-screen-radius toggle-switcher-screen]
[rn/view {:style (styles/switcher-screen-container
view-id switcher-screen-radius)}
[switch-screen toggle-switcher-screen]])
(defn tabs [toggle-switcher-screen]
[switch-screen toggle-switcher-screen])