Skip to content

Commit 700417a

Browse files
committed
[#109] Introduce a notifications tab to see interactions and follows
Changelog: feature
1 parent 34448c6 commit 700417a

65 files changed

Lines changed: 2911 additions & 197 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitlab/ci/build_services.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -162,56 +162,56 @@ moderation-image:
162162
# notifications
163163
########################################################################
164164

165-
.notifications-workflow:
165+
.push-notifications-workflow:
166166
image: gitlab.futo.org:5050/devops/manifest-repo/library/docker:latest
167167
rules:
168-
- if: $CI_COMMIT_TAG =~ /^notifications-/
168+
- if: $CI_COMMIT_TAG =~ /^push-notifications-/
169169
when: always
170170
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
171171
changes:
172172
- Cargo.toml
173173
- Cargo.lock
174-
- services/notifications/**/*
174+
- services/push-notifications/**/*
175175
- services/common/**/*
176176
- .gitlab/ci/build_services.yml
177177
- .gitlab/ci/deploy_services.yml
178178
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
179179
when: never
180180
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
181181
changes:
182-
- services/notifications/**/*
182+
- services/push-notifications/**/*
183183
- services/common/**/*
184184
- .gitlab/ci/build_services.yml
185185
- .gitlab/ci/deploy_services.yml
186186
variables:
187187
RUNNER_SCRIPT_TIMEOUT: 179m
188-
SERVICE_NAME: notifications-service
189-
SERVICE_DIR: notifications
188+
SERVICE_NAME: push-notifications-service
189+
SERVICE_DIR: push-notifications
190190

191-
notifications-format-check:
191+
push-notifications-format-check:
192192
extends:
193-
- .notifications-workflow
193+
- .push-notifications-workflow
194194
- .service-format-check
195195

196-
notifications-clippy:
196+
push-notifications-clippy:
197197
extends:
198-
- .notifications-workflow
198+
- .push-notifications-workflow
199199
- .service-clippy
200200

201-
notifications-test:
201+
push-notifications-test:
202202
extends:
203-
- .notifications-workflow
203+
- .push-notifications-workflow
204204
- .service-test
205205

206-
notifications-build:
206+
push-notifications-build:
207207
extends:
208-
- .notifications-workflow
208+
- .push-notifications-workflow
209209
- .service-build
210210

211-
notifications-image:
211+
push-notifications-image:
212212
extends:
213-
- .notifications-workflow
213+
- .push-notifications-workflow
214214
- .service-image
215215
rules:
216-
- !reference [.notifications-workflow, rules]
216+
- !reference [.push-notifications-workflow, rules]
217217
- !reference [.release-workflow, rules]

.gitlab/ci/deploy_services.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,41 +125,41 @@ moderation-deploy-manifest-production:
125125
# notifications
126126
########################################################################
127127

128-
.notifications-deploy-workflow:
128+
.push-notifications-deploy-workflow:
129129
rules:
130130
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
131131
changes:
132-
- services/notifications/**/*
132+
- services/push-notifications/**/*
133133
- services/common/**/*
134134
- .gitlab/ci/build_services.yml
135135
- .gitlab/ci/deploy_services.yml
136136
variables:
137-
SERVICE_NAME: notifications-service
137+
SERVICE_NAME: push-notifications-service
138138

139139
########################################
140140
# Tag the image with environment label #
141141
########################################
142142

143-
notifications-deploy-image-production:
143+
push-notifications-deploy-image-production:
144144
extends:
145-
- .notifications-deploy-workflow
145+
- .push-notifications-deploy-workflow
146146
- .service-deploy-image
147147
when: manual
148148
environment:
149-
name: production/notifications-service
149+
name: production/push-notifications-service
150150
needs:
151-
- job: notifications-image
151+
- job: push-notifications-image
152152
artifacts: false
153153

154154
###############################
155155
# Rolling restart on Manifest #
156156
###############################
157157

158-
notifications-deploy-manifest-production:
158+
push-notifications-deploy-manifest-production:
159159
extends:
160-
- .notifications-deploy-workflow
160+
- .push-notifications-deploy-workflow
161161
- .service-deploy-manifest
162162
variables:
163163
MANIFEST_QUICK_TARGETS: inventory/polycentric-east/notifications.yml:polycentriceast
164164
needs:
165-
- notifications-deploy-image-production
165+
- push-notifications-deploy-image-production

Cargo.lock

Lines changed: 45 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ members = [
55
"services/server",
66
"services/server/tests",
77
"services/moderation",
8-
"services/notifications",
8+
"services/push-notifications",
99
"services/common/*",
1010
"tools/identity",
1111
]

apps/polycentric/app/(tabs)/_layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export default function TabsLayout() {
3030
<NativeTabs.Trigger.Icon sf="magnifyingglass" md="search" />
3131
</NativeTabs.Trigger>
3232

33-
<NativeTabs.Trigger name="activity">
34-
<NativeTabs.Trigger.Label>Activity</NativeTabs.Trigger.Label>
33+
<NativeTabs.Trigger name="notifications">
34+
<NativeTabs.Trigger.Label>Notifications</NativeTabs.Trigger.Label>
3535
<NativeTabs.Trigger.Icon sf="bell" md="notifications" />
3636
</NativeTabs.Trigger>
3737

apps/polycentric/app/(tabs)/activity.tsx

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@/src/features/notifications/NotificationsScreen';

apps/polycentric/src/common/components/Icon.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const IconsMap = {
4242
image: defineIcon(Ionicons, 'image-outline'),
4343
images: defineIcon(Ionicons, 'images-outline'),
4444
more: defineIcon(Ionicons, 'ellipsis-horizontal'),
45+
notification: defineIcon(MaterialCommunityIcons, 'bell-outline'),
4546
personAdd: defineIcon(Ionicons, 'person-add'),
4647
personAddOutline: defineIcon(Ionicons, 'person-add-outline'),
4748
personOutline: defineIcon(Ionicons, 'person-outline'),

apps/polycentric/src/common/components/List.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { PostData } from '@/src/common/lib/polycentric-hooks';
21
import { isWeb } from '@/src/common/util/platform';
32
import {
43
FlashList,
@@ -41,7 +40,7 @@ export type ListProps<T> = FlashListProps<T> & {
4140
/** Imperative handle exposed by `List` (and `FeedList`). */
4241
export type ListRef = { scrollToTop: () => void };
4342

44-
export const List = forwardRef(function List<T extends PostData = PostData>(
43+
export const List = forwardRef(function List<T>(
4544
props: ListProps<T>,
4645
ref: React.Ref<ListRef>,
4746
) {
@@ -50,7 +49,7 @@ export const List = forwardRef(function List<T extends PostData = PostData>(
5049
}
5150

5251
return <NativeList<T> {...props} listRef={ref} />;
53-
}) as <T extends PostData = PostData>(
52+
}) as <T>(
5453
props: ListProps<T> & { ref?: React.Ref<ListRef> },
5554
) => React.ReactElement;
5655

apps/polycentric/src/common/components/layout/nav/VerticalNav.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ export function VerticalNav({ style }: VerticalNavProps) {
3131
icon={<Icon name="searchOutline" size={24} />}
3232
href="/explore"
3333
/>
34+
<NavItem
35+
label="Notifications"
36+
icon={<Icon name="notification" size={24} />}
37+
href="/notifications"
38+
/>
3439
{identity?.identityKey && (
3540
<NavItem
3641
label="Profile"

0 commit comments

Comments
 (0)