From 6e52c28c8137ec2d8bad558281fe572b05a8d652 Mon Sep 17 00:00:00 2001 From: Jost Schulte Date: Sat, 24 Dec 2022 20:57:27 -0600 Subject: [PATCH] feat(mew-view)!: add page for mew view (#37) * show help texts for mew input field * add lick icon & tooltips * replace like with lick icon * add avatar to main search results * reduce number of mew fetches & lick in background * set min height for mew input field * refactor dialogs * move tag mew state to store * trim mew field input when publishing * workaround profile context mess up of app structure * replace base modal * move yarn to own page * reload yarn on toggle lick * show skeletons while loading yarn * fix agent profile mews feed * fix mew licking in yarn * narrow view in xl mode * fix tag mews feed * fix mews feed store * add followers and followees to my profile * move empty mew feed to mew list * pass onLickMew down to list item * pass in onToggleLickMew from tag mews feed * pass onToggleLickMew from agent profile * pass onPublishMew from mews feed * pass onPublishMew from TagMewsFeed * pass onPublishMew from AgentProfile * fetch mewmew in yarn * update changelog * update holonix sources * add ci os matrix --- .github/workflows/test.yml | 6 +- CHANGELOG.md | 1 + nix/sources.json | 6 +- ui/public/icons.svg | 6 +- ui/src/components/BaseDialog.vue | 32 --- ui/src/components/ButtonFollow.vue | 4 +- ui/src/components/CreateMewDialog.vue | 118 +++++----- ui/src/components/CreateMewField.vue | 91 +++++--- ui/src/components/EmptyMewsFeed.vue | 12 + ui/src/components/FolloweesList.vue | 6 + ui/src/components/FollowersList.vue | 6 + ui/src/components/MewContent.vue | 28 ++- ui/src/components/MewList.vue | 27 ++- ui/src/components/MewListItem.vue | 318 ++++++++++++-------------- ui/src/components/MewTimestamp.vue | 29 +++ ui/src/components/MewYarnListItem.vue | 234 +++++++++++++++++++ ui/src/components/ProfilePopup.vue | 4 +- ui/src/components/Timestamp.vue | 27 --- ui/src/css/quasar.variables.sass | 13 +- ui/src/layouts/MainLayout.vue | 67 ++++-- ui/src/main.ts | 6 +- ui/src/pages/AgentProfile.vue | 56 ++++- ui/src/pages/HomePage.vue | 6 +- ui/src/pages/MewYarn.vue | 147 ++++++++++++ ui/src/pages/MewsFeed.vue | 43 ++-- ui/src/pages/MyProfile.vue | 35 ++- ui/src/pages/NotFound.vue | 3 +- ui/src/pages/TagMewsFeed.vue | 55 ++++- ui/src/router.ts | 6 + ui/src/services/clutter-dna.ts | 2 +- ui/src/stores/clutter.ts | 30 ++- ui/src/stores/index.ts | 2 +- ui/src/types/types.ts | 10 +- ui/src/utils/hash.ts | 2 +- ui/src/utils/page-layout.ts | 9 + 35 files changed, 1018 insertions(+), 429 deletions(-) delete mode 100644 ui/src/components/BaseDialog.vue create mode 100644 ui/src/components/EmptyMewsFeed.vue create mode 100644 ui/src/components/MewTimestamp.vue create mode 100644 ui/src/components/MewYarnListItem.vue delete mode 100644 ui/src/components/Timestamp.vue create mode 100644 ui/src/pages/MewYarn.vue create mode 100644 ui/src/utils/page-layout.ts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b95b5f0d..a6418261 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,11 @@ on: [pull_request] jobs: build-and-test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + # os: [ubuntu-latest, macos-latest] steps: - name: Checkout code diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d28f091..0ef72aa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased ### Added +- Thread view for a mew with all its replies. ### Changed ### Fixed ### Removed diff --git a/nix/sources.json b/nix/sources.json index 940894de..6d0c284e 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -5,10 +5,10 @@ "homepage": "", "owner": "holochain", "repo": "holonix", - "rev": "251987d1e5d5e943eb96e5849125a2fcc212fe6d", - "sha256": "0lnydk200x4r3yh3z23r4rmw825cdg7aiq7l4jc0aq4mwpkxqj8j", + "rev": "21f339a295d28e559371b805e489b973db6d769d", + "sha256": "140f0snqv9dlinpjdjjxhm1yynd8xkv58gjvpwqhzjxs7gna8z38", "type": "tarball", - "url": "https://github.com/holochain/holonix/archive/251987d1e5d5e943eb96e5849125a2fcc212fe6d.tar.gz", + "url": "https://github.com/holochain/holonix/archive/21f339a295d28e559371b805e489b973db6d769d.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } diff --git a/ui/public/icons.svg b/ui/public/icons.svg index 9994b552..2e3f0ca4 100644 --- a/ui/public/icons.svg +++ b/ui/public/icons.svg @@ -1,6 +1,10 @@ + d="m 20.16199,5.7182363 c -0.844039,0.4378809 -1.217109,1.415541 -2.024326,1.8744476 -0.37867,0.215325 -1.01417,-0.066833 -1.424905,-0.094835 C 16.189501,7.4619939 15.434678,7.79181 14.958687,7.6160932 14.321602,7.3808085 13.816718,6.0760271 13.449976,5.5318914 c -0.804417,0.4179516 -1.019935,1.7839883 -1.11401,2.6102299 -0.261674,2.2982077 0.321343,5.1330087 2.88524,5.8730147 v 0.0932 C 14.459952,13.960611 13.68397,13.823551 12.983867,13.473492 10.024986,11.994058 10.211343,8.8508052 10.746529,6.0912174 9.1648268,5.5767311 7.0813669,5.2697907 5.8057457,6.6505556 3.885883,4.4361695 6.7994086,1.8707912 9.0685288,2.0985478 10.214884,2.2136783 10.848516,3.3133887 11.864731,3.4732969 12.396006,3.5568665 12.480094,2.931858 12.38547,2.5487715 12.118582,1.4680421 10.725371,0.61426938 9.7210833,0.35603347 7.2523289,-0.2787842 4.2161606,0.7641315 3.0441714,3.108095 2.4743425,4.2477675 2.4440115,5.9369397 2.9090377,7.1166635 3.0796885,7.54961 3.6904131,8.1121486 3.7032301,8.5545638 3.7278271,9.406395 3.0530025,10.394176 3.0127588,11.311663 c -0.1268361,2.892232 0.665682,5.972571 1.3598428,8.762907 0.2688747,1.08073 0.4270494,2.480742 1.0058872,3.443732 0.6320912,1.051643 1.137539,-0.352562 1.1697369,-0.926733 0.100165,-1.785767 0.1186862,-3.641826 0.4335394,-5.406891 0.079717,-0.446816 0.2742978,-1.611529 0.9647251,-1.412223 0.5704355,0.164724 0.7181204,1.011089 0.8018235,1.505452 0.2607534,1.540408 0.3714094,3.112597 0.5877715,4.661108 0.064598,0.462389 0.1019466,1.742425 0.6707348,1.887577 0.564835,0.144172 0.721543,-1.072996 0.800327,-1.421454 0.279661,-1.23557 0.384449,-2.513756 0.752393,-3.728907 0.126096,-0.416321 0.346413,-1.06935 0.866307,-1.114275 0.598397,-0.05171 0.792296,0.663739 0.873495,1.114275 0.211621,1.173397 -0.03586,2.530158 -0.03586,3.728907 0,0.389296 -0.09113,1.51541 0.563071,1.448108 0.514027,-0.05289 0.755282,-0.761993 0.907145,-1.168446 0.499387,-1.336535 0.777478,-2.804218 1.086316,-4.195015 0.21451,-0.965865 0.454549,-1.929983 0.694412,-2.889892 0.09631,-0.384997 0.124021,-0.957108 0.371396,-1.276865 0.288255,-0.372418 1.007651,-0.437112 1.411673,-0.669609 0.739443,-0.425376 1.299152,-1.105342 1.648914,-1.875634 0.82316,-1.8131777 0.366373,-4.1476276 0.215532,-6.0594597 z" /> + + + \ No newline at end of file diff --git a/ui/src/components/BaseDialog.vue b/ui/src/components/BaseDialog.vue deleted file mode 100644 index 8520f2fe..00000000 --- a/ui/src/components/BaseDialog.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - - - diff --git a/ui/src/components/ButtonFollow.vue b/ui/src/components/ButtonFollow.vue index ad2aad9b..afb308a2 100644 --- a/ui/src/components/ButtonFollow.vue +++ b/ui/src/components/ButtonFollow.vue @@ -19,7 +19,7 @@ import { follow, myFollowing, unfollow } from "@/services/clutter-dna"; import { useProfilesStore } from "@/services/profiles-store"; import { PROFILE_FIELDS } from "@/types/types"; -import { isSameAgentPubKey } from "@/utils/hash"; +import { isSameHash } from "@/utils/hash"; import { showError, showMessage } from "@/utils/notification"; import { Profile } from "@holochain-open-dev/profiles"; import { AgentPubKey } from "@holochain/client"; @@ -42,7 +42,7 @@ onMounted(async () => { loading.value = true; const currentMyFollowing = await myFollowing(); following.value = currentMyFollowing.some((agent) => - isSameAgentPubKey(agent, props.agentPubKey) + isSameHash(agent, props.agentPubKey) ); } catch (error) { showError(error); diff --git a/ui/src/components/CreateMewDialog.vue b/ui/src/components/CreateMewDialog.vue index 7958afbb..ef97a14e 100644 --- a/ui/src/components/CreateMewDialog.vue +++ b/ui/src/components/CreateMewDialog.vue @@ -1,68 +1,82 @@ - diff --git a/ui/src/components/CreateMewField.vue b/ui/src/components/CreateMewField.vue index 490a80a8..993fbb1b 100644 --- a/ui/src/components/CreateMewField.vue +++ b/ui/src/components/CreateMewField.vue @@ -3,7 +3,7 @@
+ + + You can mention people with @ and use #hashtags and $cashtags in a + mew. + + + +
+ Ctrl/Cmd + Enter to publish +
+ + + + + diff --git a/ui/src/components/MewList.vue b/ui/src/components/MewList.vue index 91d645f2..b9ca0e46 100644 --- a/ui/src/components/MewList.vue +++ b/ui/src/components/MewList.vue @@ -1,32 +1,37 @@ diff --git a/ui/src/components/MewListItem.vue b/ui/src/components/MewListItem.vue index 79a9b862..d795a755 100644 --- a/ui/src/components/MewListItem.vue +++ b/ui/src/components/MewListItem.vue @@ -1,139 +1,95 @@ diff --git a/ui/src/components/MewTimestamp.vue b/ui/src/components/MewTimestamp.vue new file mode 100644 index 00000000..7877a225 --- /dev/null +++ b/ui/src/components/MewTimestamp.vue @@ -0,0 +1,29 @@ + + + diff --git a/ui/src/components/MewYarnListItem.vue b/ui/src/components/MewYarnListItem.vue new file mode 100644 index 00000000..6d823701 --- /dev/null +++ b/ui/src/components/MewYarnListItem.vue @@ -0,0 +1,234 @@ + + + diff --git a/ui/src/components/ProfilePopup.vue b/ui/src/components/ProfilePopup.vue index 5afbd471..f96b3b59 100644 --- a/ui/src/components/ProfilePopup.vue +++ b/ui/src/components/ProfilePopup.vue @@ -35,7 +35,7 @@ diff --git a/ui/src/css/quasar.variables.sass b/ui/src/css/quasar.variables.sass index b6011e71..b3c52206 100644 --- a/ui/src/css/quasar.variables.sass +++ b/ui/src/css/quasar.variables.sass @@ -1,10 +1,19 @@ $primary: #e68702 -$secondary: #5983a0d7 +$secondary: #5983a0 $accent: #9C27B0 $dark: #1D1D1D $positive: #21BA45 $negative: #C10015 -$info: #31CCEC +$info: #5978a0 $warning: #F2C037 + +$h1: (size: 3rem, line-height: 3rem, letter-spacing: -.01562em, weight: 300) !default +$h2: (size: 2.75rem, line-height: 2.75rem, letter-spacing: -.00833em, weight: 300) !default +$h3: (size: 2.5rem, line-height: 2.625rem, letter-spacing: normal, weight: 400) !default +$h4: (size: 2.125rem, line-height: 2.5rem, letter-spacing: .00735em, weight: 400) !default +$h5: (size: 1.5rem, line-height: 2rem, letter-spacing: normal, weight: 400) !default +$h6: (size: 1.25rem, line-height: 2rem, letter-spacing: .0125em, weight: 500) !default + +$tooltip-fontsize: 0.75rem diff --git a/ui/src/layouts/MainLayout.vue b/ui/src/layouts/MainLayout.vue index ae3926e7..dcbfad38 100644 --- a/ui/src/layouts/MainLayout.vue +++ b/ui/src/layouts/MainLayout.vue @@ -1,10 +1,11 @@