Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Migrate to vue-query #2567

Merged
merged 227 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
227 commits
Select commit Hold shift + click to select a range
dc849cd
Clearer name for offer queries
nicksellen Jul 18, 2022
5766ab6
Initial version of vue-query for activities
nicksellen Jul 20, 2022
eb6b899
Add instrumentation for some enrich getters
nicksellen Jul 20, 2022
b2099e8
WIP Experimentation/exploration about getters
nicksellen Jul 20, 2022
7d088da
SHOW_PERFORMANCE_INFO also enable instrumentation
nicksellen Jul 20, 2022
db88a54
Refine activity users
nicksellen Jul 20, 2022
94b3c40
Work in progress queries/mutations/services
nicksellen Jul 22, 2022
2acfbd8
Ongoing vue-query work
nicksellen Jul 23, 2022
62a00cb
Don't require services to have an id
nicksellen Jul 28, 2022
9ba05c6
Switch from useRouteParam to useQueryParams
nicksellen Jul 28, 2022
f8cd059
Less activity query caching
nicksellen Jul 28, 2022
6cceb7d
Improved group activities page
nicksellen Jul 29, 2022
fcc09dd
Use vue-query for place activities
nicksellen Jul 29, 2022
3417890
Continuing with vue-query for places
nicksellen Jul 29, 2022
62d4243
Ongoing vue-query work
nicksellen Jul 29, 2022
9ed3e85
Implement status in vue-query
nicksellen Jul 29, 2022
7d7c274
More vue-query ongoing work
nicksellen Jul 30, 2022
4de9771
Remove status datastore
nicksellen Aug 1, 2022
f677c1d
More places/feedback into vue-query
nicksellen Aug 1, 2022
0979cba
A lot more vue-query...
nicksellen Aug 2, 2022
564d401
Remove unneeded code
nicksellen Aug 2, 2022
8be7962
Vue-query mutations for activity editing
nicksellen Aug 2, 2022
02f2d3e
Remove unused code
nicksellen Aug 2, 2022
54082a5
Ongoing
nicksellen Aug 2, 2022
c8134b3
Vue-query for history
nicksellen Aug 3, 2022
f6448e5
Remove unused history datastore
nicksellen Aug 3, 2022
626a7fa
Use vue-query for activity type editing
nicksellen Aug 3, 2022
ae8b51c
Some cleanup, and more implementation
nicksellen Aug 3, 2022
f22c94e
Clear data on login, minor tweaks
nicksellen Aug 3, 2022
ead8f9d
Initial vue-query for messages
nicksellen Aug 3, 2022
2e4c8ec
indexById for feedback
nicksellen Aug 3, 2022
bed6b64
Cleanup
nicksellen Aug 3, 2022
61dc017
Adding detail threads to vue-query
nicksellen Aug 4, 2022
2a69ce8
Working thread detail view :)
nicksellen Aug 8, 2022
283ca24
Only current group users mentionable
nicksellen Aug 8, 2022
a0551ae
Faked threadMeta for new threads
nicksellen Aug 8, 2022
4057f2c
20 messages per page
nicksellen Aug 8, 2022
84d59f1
Make place wall work again
nicksellen Aug 8, 2022
32da234
Add state docs
nicksellen Aug 8, 2022
b0c1f16
Don't refetch messages on window focus
nicksellen Aug 8, 2022
6dedf15
Add more state/query/mutation/enrichment docs
nicksellen Aug 8, 2022
c4d0f10
vue-query for application list
tiltec Aug 8, 2022
b897060
Convert activity enrichers to helpers
nicksellen Aug 9, 2022
f9b0074
Fix is-unread for walls
nicksellen Aug 9, 2022
9dc1587
Fixup user list and add trust/revoke mutations
nicksellen Aug 9, 2022
46b9e71
Fixup unread/continuation logic
nicksellen Aug 9, 2022
9b28f46
Implement detail view for activities
nicksellen Aug 9, 2022
ace78fb
Slightly improvement to detail
nicksellen Aug 9, 2022
9bb88f5
Implement user chat detail view
nicksellen Aug 9, 2022
dfc5f28
remove enriching for applications list
tiltec Aug 9, 2022
bb236e9
show application in detail view
tiltec Aug 9, 2022
8a2a84f
Add explicit ordering and button to load older
nicksellen Aug 9, 2022
261d0b8
Specify ordering for application messages
nicksellen Aug 9, 2022
62bd744
Add more sensible page size
nicksellen Aug 9, 2022
f36a469
Fix place display
nicksellen Aug 9, 2022
6ba731f
Convert remaining enrichers to helpers
nicksellen Aug 10, 2022
cff681d
Fix sidenav group map
nicksellen Aug 10, 2022
b33d1c0
Refactor sidenavboxes
nicksellen Aug 10, 2022
655dd2b
Use more bootstrap data
nicksellen Aug 10, 2022
06a9059
A few bits and bobs
nicksellen Aug 10, 2022
a759681
Don't fetch users/group-info in vuex...
nicksellen Aug 10, 2022
01c59d7
Move more breadcrumb logic to component
nicksellen Aug 10, 2022
cfe3b38
Remove some route store actions
nicksellen Aug 10, 2022
4bfe494
Fix activity history statistics
nicksellen Aug 10, 2022
8940839
Convert breadcrumb datastore
nicksellen Aug 10, 2022
460c323
Remove loadingprogress datastore
nicksellen Aug 10, 2022
2113fe2
Implement search without vuex
nicksellen Aug 10, 2022
7f04d01
Add back esc key to close search
nicksellen Aug 10, 2022
36ddca4
Fixup offers chat
nicksellen Aug 10, 2022
c7140fe
applications: create and withdraw
tiltec Aug 10, 2022
6e4b688
Remove debug <pre>
nicksellen Aug 11, 2022
ad8b095
Implement user-not-found logic
nicksellen Aug 11, 2022
d4020b9
Close detail service when using detail route
nicksellen Aug 11, 2022
085812d
Save detail notification options via vue-query
nicksellen Aug 11, 2022
ef63df2
Remove unused actions
nicksellen Aug 11, 2022
73841eb
Move home of current group to service from vuex
nicksellen Aug 11, 2022
b4dd860
Add TODO
nicksellen Aug 11, 2022
252ac71
fix applications in group gallery
tiltec Aug 11, 2022
59ed8ea
remove deprecated group join feature
tiltec Aug 11, 2022
398866f
add application accept/decline, cleanup
tiltec Aug 11, 2022
4188204
add applications updater, remove applications datastore
tiltec Aug 12, 2022
07ce7ee
convert notifications, first try
tiltec Aug 12, 2022
96b916c
application api cleanup
tiltec Aug 12, 2022
ef9f681
fix notification routes
tiltec Aug 13, 2022
d19e255
Move markUserActive to service
nicksellen Aug 15, 2022
a9fa7b8
Use composition API for performance tool
nicksellen Aug 15, 2022
71b7cac
Remove unused code
nicksellen Aug 15, 2022
5e5676a
Group socket updaters
nicksellen Aug 15, 2022
c02557c
Move banners out of store and implement toasts
nicksellen Aug 15, 2022
95620ce
Move geo out of datastore
nicksellen Aug 15, 2022
6b1a01d
Remove agreements
nicksellen Aug 15, 2022
bb76531
Less currentStore stuff
nicksellen Aug 15, 2022
323120f
Merge branch 'add/more-vue-query' of github.com:karrot-dev/karrot-fro…
nicksellen Aug 15, 2022
7085152
Migrate out more currentGroup.js
nicksellen Aug 15, 2022
7c75153
And more away from currentGroup store
nicksellen Aug 15, 2022
4fe2df5
Fix groups in a couple of places
nicksellen Aug 15, 2022
f104335
A whole bunch of vue-query progress
nicksellen Aug 15, 2022
e8608da
latestMessages, first steps
tiltec Aug 15, 2022
c4da15c
add todo
tiltec Aug 15, 2022
5aab389
disable calls to latestMessages datastore
tiltec Aug 15, 2022
b580512
Moved filtered places into current group service
nicksellen Aug 15, 2022
15e4f2a
Add artifical response delay for local dev
nicksellen Aug 15, 2022
07a2a7c
Better wall loading status
nicksellen Aug 15, 2022
e62d1b6
Add in-memory infinite scroll for member list
nicksellen Aug 15, 2022
70d19a6
Fixup signup
nicksellen Aug 15, 2022
99d01e4
Fixup history detail page
nicksellen Aug 15, 2022
24650ea
Migrate i18n
nicksellen Aug 15, 2022
be185eb
Remove currentGroup module :)
nicksellen Aug 16, 2022
fefb70e
Remove timezones module
nicksellen Aug 16, 2022
e6c79c3
Migrate community feed vuex store
nicksellen Aug 16, 2022
9ef2428
Remove invitations (they are unused now)
nicksellen Aug 16, 2022
7f14b2f
Remove unused file
nicksellen Aug 16, 2022
37b615f
Remove refresh (and pull to refresh)
nicksellen Aug 16, 2022
2c3a9b3
Close detail view on logout
nicksellen Aug 16, 2022
a5c007e
Don't hijack '/' from input/textareas
nicksellen Aug 16, 2022
9c6c4d0
Fixup groupId param for link
nicksellen Aug 16, 2022
19abc19
Implement mobile views for some detail pages
nicksellen Aug 16, 2022
13638dd
Nicer activity filter wrapping
nicksellen Aug 16, 2022
0c92734
Filter out less useful stuff for search
nicksellen Aug 16, 2022
5fb01c5
latestMessages: make it mostly work!
tiltec Aug 16, 2022
e70189f
Fancier dev sleep feature, not automatically on
nicksellen Aug 16, 2022
78cf9cd
Fix user chat mobile view
nicksellen Aug 16, 2022
9c80aae
Fixup latest messages opening things
nicksellen Aug 16, 2022
47c0839
Show detail sidebar over detail router view
nicksellen Aug 16, 2022
0de3ea1
Prevent overflowing slots
nicksellen Aug 16, 2022
ac167c9
Allow to dismiss community banner
nicksellen Aug 17, 2022
84ed927
Add application mobile route
nicksellen Aug 17, 2022
a7bf234
Migrate issues
nicksellen Aug 17, 2022
fe5af23
Fix query update helper
nicksellen Aug 17, 2022
47f9979
Remove issues store
nicksellen Aug 17, 2022
7302b80
Fix bread for active issue
nicksellen Aug 17, 2022
a6a4ad6
Almost removed groups datastore
nicksellen Aug 17, 2022
d75f477
Don't use stuff from >/helpers
nicksellen Aug 17, 2022
9407622
Only worry about query order meta when needed
nicksellen Aug 17, 2022
d25a282
Better activities view with no activities
nicksellen Aug 17, 2022
098dd23
Minor improvements to application detail UI
nicksellen Aug 17, 2022
dc7cf1f
Adding missing .value
nicksellen Aug 17, 2022
1c9099a
Remove calls to removed functions
nicksellen Aug 18, 2022
6f7aa6a
Fix missing order meta param, coding error
nicksellen Aug 18, 2022
d4f7c55
Fixup group create
nicksellen Aug 18, 2022
8cfebab
Reimplement and remove groups store module
nicksellen Aug 18, 2022
220eff6
Disable vuex stores!
nicksellen Aug 18, 2022
2594ce1
Fix axios handling of nulls
nicksellen Aug 18, 2022
d55b351
Remove .catch() calls from router push add debug
nicksellen Aug 18, 2022
a55bc18
Attempt to resolve router issue
nicksellen Aug 18, 2022
97f7200
Fix reactivity bug, must pass refs to query keys
nicksellen Aug 18, 2022
e063f43
Reorder imports and enforce with eslint
nicksellen Aug 19, 2022
1bbc6e9
Reimplement password reset
nicksellen Aug 19, 2022
abd2c60
Reimplement unsubscribe all for group
nicksellen Aug 19, 2022
d31b62d
Remove unused $store usage
nicksellen Aug 19, 2022
75cd76f
A little auth isLogged in refinement
nicksellen Aug 19, 2022
c5b6476
Convert push and pwa stuff
nicksellen Aug 19, 2022
f6771dd
Push tweaks and blind cordova implementations
nicksellen Aug 19, 2022
b36f28d
A bit more push token fiddling
nicksellen Aug 20, 2022
44800e6
Fixup multicroppa
nicksellen Aug 22, 2022
f8b6379
Send x-forwarded-for headers in dev proxy
nicksellen Aug 22, 2022
c2c2ed0
Only load cordova stuff if needed
nicksellen Aug 22, 2022
0121ba9
Fix up profile image edit
nicksellen Aug 22, 2022
642d95b
Remove away logging
nicksellen Aug 22, 2022
f95c420
Activity type editing remove vuex calls
nicksellen Aug 22, 2022
eaf6aac
Remove vuex from feedback list
nicksellen Aug 22, 2022
c1f0ae4
Remove vuex!
nicksellen Aug 22, 2022
a406cc8
Update vuex -> vue-query in readme
nicksellen Aug 22, 2022
ece5358
Remove unused datastore helpers
nicksellen Aug 22, 2022
c4b1d41
Initialize router plugin inside detail service
nicksellen Aug 22, 2022
a4eceb8
Linting fix
nicksellen Aug 22, 2022
89f58ef
Remove old datastore helpers tests
nicksellen Aug 22, 2022
de29d75
Refine eslint import order config
nicksellen Aug 22, 2022
60c52e3
Fixup offer query tests
nicksellen Aug 22, 2022
01fd94b
Fixup changephoto test
nicksellen Aug 22, 2022
d14aaad
Make tests pass, upgrade to jest 28
nicksellen Aug 22, 2022
0c34f0a
Enhance mock backend a little
nicksellen Aug 22, 2022
0c9aa78
Fixup linting
nicksellen Aug 22, 2022
0896578
Nicer "your application is pending" alignment
nicksellen Aug 22, 2022
4199da9
Slightly more refined application pending UI
nicksellen Aug 22, 2022
31fe337
Merge branch 'master' into add/more-vue-query
tiltec Aug 24, 2022
6124ae1
remove notice
tiltec Aug 24, 2022
62575e5
TODO is done
tiltec Aug 24, 2022
9f97820
Fix message reaction user names
nicksellen Aug 24, 2022
d447738
Fix chat conversation messages spilling out
nicksellen Aug 24, 2022
3e27778
Fix mobile reaction list dialog
nicksellen Aug 25, 2022
55c833a
Don't log ECONNABORTED query errors
nicksellen Aug 25, 2022
96195b3
Use native isArray method
nicksellen Aug 25, 2022
9038b17
Use object format for input-style
nicksellen Aug 25, 2022
c45e874
Use overflow: hidden for autogrow inputs
nicksellen Aug 25, 2022
68ad4fa
Remove unused class, use object shorthand notation
nicksellen Aug 25, 2022
821c6cc
Set groupId in link explicitly
nicksellen Aug 25, 2022
1a486fb
Refine note about archived activity type filtering
nicksellen Aug 25, 2022
d3c7099
Remove getPreviousPage from state docs
nicksellen Aug 25, 2022
9e08b46
Make sure activityTypeIconProps are present
nicksellen Aug 25, 2022
dbcb168
Remove unused mutationOptions configuration
nicksellen Aug 25, 2022
02f66bb
Remove unused listMore methods
nicksellen Aug 25, 2022
08a1503
Remove console log
nicksellen Aug 25, 2022
7d9db66
Remove console logging
nicksellen Aug 25, 2022
c59c4f4
Remove outdated comment
nicksellen Aug 25, 2022
cdafbb3
Remove unused createInstrument
nicksellen Aug 25, 2022
667d4b9
A little rejig of boot files
nicksellen Aug 25, 2022
5385b30
Add more groupIds to router links
nicksellen Aug 25, 2022
da664fd
Safer ref access
nicksellen Aug 25, 2022
7ba589e
Better function naming
nicksellen Aug 25, 2022
53d9d05
Add back leave group toast
nicksellen Aug 25, 2022
5f8870f
Use maybeUpdateDataWith more and document
nicksellen Aug 25, 2022
6b48740
Add TODO
nicksellen Aug 25, 2022
e806f45
Remove unneeded comments/logs
nicksellen Aug 25, 2022
fde597c
Remove empty file
nicksellen Aug 25, 2022
92f9e0b
Remove logging, add TODO detail
nicksellen Aug 25, 2022
b2acabc
Add "Load earlier messages" to translations
nicksellen Aug 25, 2022
a0fbce2
Re-enable eslint
nicksellen Aug 25, 2022
152343d
Use maybeUpdateDataWith for message detail
nicksellen Aug 25, 2022
35f7c40
Remove unneeded getPreviousPageParam
nicksellen Aug 25, 2022
e919c4b
Alter comments
nicksellen Aug 25, 2022
cd98e05
Remove commented out code
nicksellen Aug 25, 2022
5e8039a
Add comment
nicksellen Aug 25, 2022
04b11a6
Remove dev/debug code
nicksellen Aug 25, 2022
98a0d6d
Remove enrichment related code
nicksellen Aug 25, 2022
3b0ac23
Remove commented out code
nicksellen Aug 25, 2022
b0e555b
Add comment
nicksellen Aug 25, 2022
1cce976
Remove unused test file
nicksellen Aug 25, 2022
345e59f
Remove commented out line
nicksellen Aug 25, 2022
e08d4a8
Only use lodash random if we need it in dev
nicksellen Aug 23, 2022
d548585
fix feedback pagination
tiltec Aug 25, 2022
cd49bec
fix activity statistics periodFilter
tiltec Aug 25, 2022
6d86039
remove clearIssueMeta comment
tiltec Aug 25, 2022
4954e7c
enable period user refresh
tiltec Aug 25, 2022
5ff9f5e
remove notification meta
tiltec Aug 25, 2022
64297ff
remove WallConversation TODO
tiltec Aug 25, 2022
614ae1e
remove old code
tiltec Aug 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ import LoadingProgress from '@/topbar/components/LoadingProgress'

import { useClearDataOnLogout } from '@/utils/composables'
import { useOffersUpdater } from '@/offers/queries'
import { useActivitiesUpdater } from '@/activities/queries'
import { useUsersUpdater } from '@/users/queries'

export default {
components: {
LoadingProgress,
},
setup () {
// Global kind of things can be registered here
useUsersUpdater()
useOffersUpdater()
useActivitiesUpdater()
useClearDataOnLogout()
},
computed: {
Expand Down
25 changes: 21 additions & 4 deletions src/activities/components/ActivityItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
<div class="q-mt-sm q-mb-none full-width">
<ActivityUsers
:activity="activity"
:is-joining="isJoining"
:is-leaving="isLeaving"
@leave="leave"
@join="join"
/>
Expand Down Expand Up @@ -89,7 +91,7 @@
color="primary"
data-autofocus
:label="$t('BUTTON.OF_COURSE')"
@click="$emit('join', activity.id)"
@click="joinActivity(activity.id)"
/>
</template>
</CustomDialog>
Expand Down Expand Up @@ -118,7 +120,7 @@
color="primary"
data-autofocus
:label="$t('BUTTON.YES')"
@click="$emit('leave', activity.id)"
@click="leaveActivity(activity.id)"
/>
</template>
</CustomDialog>
Expand Down Expand Up @@ -177,6 +179,7 @@ import ActivityUsers from './ActivityUsers'
import CustomDialog from '@/utils/components/CustomDialog'
import { absoluteURL } from '@/utils/absoluteURL'
import Markdown from '@/utils/components/Markdown'
import { useJoinActivityMutation, useLeaveActivityMutation } from '@/activities/mutations'

export default {
components: {
Expand All @@ -203,10 +206,24 @@ export default {
},
},
emits: [
'join',
'leave',
'detail',
],
setup () {
const {
mutate: joinActivity,
isLoading: isJoining,
} = useJoinActivityMutation()
const {
mutate: leaveActivity,
isLoading: isLeaving,
} = useLeaveActivityMutation()
return {
joinActivity,
isJoining,
leaveActivity,
isLeaving,
}
},
data () {
return {
joinDialog: false,
Expand Down