From e1bc825abc1c57140541c0f20f276cd7f35d885e Mon Sep 17 00:00:00 2001
From: Camilo Vega <59750365+camilovegag@users.noreply.github.com>
Date: Tue, 28 May 2024 02:17:44 -0500
Subject: [PATCH] Release 2.5.2 (#576)
* Update back button to recieve a fallback route
* Create a loader to redirect to cycle id if cycle is open (protect /results)
* Add fallback route to cycle back button
* 561 redirect to results when cycle closes (#562)
* Match nav distribution from desktop on mobile
* Redirect to results if cycle is closed
* Add refetch of 5 seconds to cycle
* Change redirect to navigate
* Add toast
* Add fallback route to results page back button
* Show toast with clock emoji
* Update message
* Remove emoji
* fix joining public groups
* 559 change secret to access code at table (#560)
* Change secret to access code at group table
* Hide input number arrows
* Hide spinner at hover
* Fix header ui
* Remove type number input styles as they dont work as expected
* Burning min of 0 and max of 10000 for input fields (funding at the moment)
* Burn a 0 to 10000 validation at number input
* Update min and max checks
* Make public group registration more general (#565)
* Fix query key
* Update min number input value from 0 to 250 & validation messages (#568)
* Fix nav links on mobile (#566)
* 569 update secret groups page (#570)
* Update copy
* Update layout
* Update final question constant (#572)
* Minor fixes (#573)
* Fix long usernames at comments table
* sort by lead if votes are equal
* sort by id if votes are equal
* add sort fallback by id
---------
Co-authored-by: Diego Alzate
* 574 swap usernames to full names on comments page (#575)
* Change group names to voter affiliations
* Update comments response type
* Show full name instead of username
---------
Co-authored-by: Diego Alzate
---
packages/api/src/types/CommentType.ts | 9 +++-
packages/berlin/src/App.tsx | 2 +
.../CommentsColumns.styled.tsx | 2 +-
.../groups-columns/GroupsColumns.styled.tsx | 2 +-
.../columns/groups-columns/GroupsColumns.tsx | 4 +-
.../src/components/header/Header.styled.tsx | 2 +-
.../berlin/src/components/header/Header.tsx | 21 ++++----
.../comment-table/CommentsTable.styled.tsx | 4 +-
.../tables/comment-table/CommentsTable.tsx | 6 ++-
.../tables/results-table/ResultsTable.tsx | 2 +-
packages/berlin/src/data/groups.ts | 30 ++++++-----
packages/berlin/src/pages/Account.tsx | 2 +-
packages/berlin/src/pages/Cycle.tsx | 35 +++++++++++-
.../src/pages/PublicGroupRegistration.tsx | 22 +++-----
packages/berlin/src/pages/Register.tsx | 5 +-
packages/berlin/src/pages/Results.tsx | 4 +-
.../src/pages/SecretGroupRegistration.tsx | 54 +++++++++----------
packages/berlin/src/utils/constants.ts | 2 +-
18 files changed, 126 insertions(+), 82 deletions(-)
diff --git a/packages/api/src/types/CommentType.ts b/packages/api/src/types/CommentType.ts
index df97de20..ae006265 100644
--- a/packages/api/src/types/CommentType.ts
+++ b/packages/api/src/types/CommentType.ts
@@ -11,7 +11,14 @@ export type GetCommentsRequest = {
optionId: string;
};
-export type GetCommentsResponse = (Comment & { user?: { id: string; username: string } })[];
+export type GetCommentsResponse = (Comment & {
+ user?: {
+ id: string;
+ username: string;
+ firstName: string;
+ lastName: string;
+ };
+})[];
export type PostCommentRequest = {
value: string;
diff --git a/packages/berlin/src/App.tsx b/packages/berlin/src/App.tsx
index 8477dd86..603551ca 100644
--- a/packages/berlin/src/App.tsx
+++ b/packages/berlin/src/App.tsx
@@ -251,6 +251,8 @@ const router = (queryClient: QueryClient) =>
loader: ({ params }) =>
redirectToCycleIfOpen(queryClient, params.eventId, params.cycleId),
path: ':cycleId/results',
+ loader: ({ params }) =>
+ redirectToCycleIfOpen(queryClient, params.eventId, params.cycleId),
Component: Results,
},
{
diff --git a/packages/berlin/src/components/columns/comments-columns/CommentsColumns.styled.tsx b/packages/berlin/src/components/columns/comments-columns/CommentsColumns.styled.tsx
index fe08b092..8d3fb671 100644
--- a/packages/berlin/src/components/columns/comments-columns/CommentsColumns.styled.tsx
+++ b/packages/berlin/src/components/columns/comments-columns/CommentsColumns.styled.tsx
@@ -8,7 +8,7 @@ export const Card = styled(Grid)`
grid-template-columns: minmax(200px, 600px) minmax(100px, 150px) 56px;
@media (min-width: 600px) {
- grid-template-columns: minmax(200px, 600px) minmax(100px, 150px) minmax(100px, 150px) 56px;
+ grid-template-columns: minmax(200px, 600px) minmax(100px, 200px) minmax(80px, 100px) 56px;
}
`;
diff --git a/packages/berlin/src/components/columns/groups-columns/GroupsColumns.styled.tsx b/packages/berlin/src/components/columns/groups-columns/GroupsColumns.styled.tsx
index cfa8e7df..287ebac3 100644
--- a/packages/berlin/src/components/columns/groups-columns/GroupsColumns.styled.tsx
+++ b/packages/berlin/src/components/columns/groups-columns/GroupsColumns.styled.tsx
@@ -17,7 +17,7 @@ export const Members = styled(Body)`
font-weight: bold;
`;
-export const Secret = styled(Body)`
+export const AccessCode = styled(Body)`
font-weight: bold;
`;
diff --git a/packages/berlin/src/components/columns/groups-columns/GroupsColumns.tsx b/packages/berlin/src/components/columns/groups-columns/GroupsColumns.tsx
index 1ef1a1e8..cfd42c3b 100644
--- a/packages/berlin/src/components/columns/groups-columns/GroupsColumns.tsx
+++ b/packages/berlin/src/components/columns/groups-columns/GroupsColumns.tsx
@@ -1,11 +1,11 @@
-import { Action, Card, Group, Members, Secret } from './GroupsColumns.styled';
+import { Action, Card, Group, Members, AccessCode } from './GroupsColumns.styled';
function GroupsColumns() {
return (
Group
Members
- Secret
+ Access Code
Action
);
diff --git a/packages/berlin/src/components/header/Header.styled.tsx b/packages/berlin/src/components/header/Header.styled.tsx
index 08609a44..36e34cce 100644
--- a/packages/berlin/src/components/header/Header.styled.tsx
+++ b/packages/berlin/src/components/header/Header.styled.tsx
@@ -108,7 +108,7 @@ export const ThemeButton = styled(Button)`
}
`;
-export const MenuButton = styled.div`
+export const MenuButton = styled.li`
align-items: center;
cursor: pointer;
display: flex;
diff --git a/packages/berlin/src/components/header/Header.tsx b/packages/berlin/src/components/header/Header.tsx
index e5201cb7..79544b75 100644
--- a/packages/berlin/src/components/header/Header.tsx
+++ b/packages/berlin/src/components/header/Header.tsx
@@ -136,19 +136,19 @@ function Header() {
onClick={() => navigate('/account')}
icon={{ src: `/icons/user-${theme}.svg`, alt: 'User' }}
$color="primary"
+ $height={20}
+ $width={20}
/>
>
) : (
Login with Zupass
)}
-
- setIsBurgerMenuOpen(!isBurgerMenuOpen)}>
-
-
-
-
-
+ setIsBurgerMenuOpen(!isBurgerMenuOpen)}>
+
+
+
+
+ My proposals
+
Agenda
>
)}
-
- My proposals
-
+
Account
diff --git a/packages/berlin/src/components/tables/comment-table/CommentsTable.styled.tsx b/packages/berlin/src/components/tables/comment-table/CommentsTable.styled.tsx
index a2a4493f..a1749a50 100644
--- a/packages/berlin/src/components/tables/comment-table/CommentsTable.styled.tsx
+++ b/packages/berlin/src/components/tables/comment-table/CommentsTable.styled.tsx
@@ -11,7 +11,7 @@ export const Card = styled(Grid)`
grid-template-columns: minmax(200px, 600px) minmax(100px, 150px) 56px;
@media (min-width: 600px) {
- grid-template-columns: minmax(200px, 600px) minmax(100px, 150px) minmax(100px, 150px) 56px;
+ grid-template-columns: minmax(200px, 600px) minmax(100px, 200px) minmax(80px, 100px) 56px;
}
`;
@@ -19,6 +19,8 @@ export const Comment = styled(Body)``;
export const Author = styled(Body)`
font-weight: 600;
+ overflow: hidden;
+ text-overflow: ellipsis;
`;
export const FormattedDate = styled(Body)`
diff --git a/packages/berlin/src/components/tables/comment-table/CommentsTable.tsx b/packages/berlin/src/components/tables/comment-table/CommentsTable.tsx
index 34edcac3..6580aac1 100644
--- a/packages/berlin/src/components/tables/comment-table/CommentsTable.tsx
+++ b/packages/berlin/src/components/tables/comment-table/CommentsTable.tsx
@@ -99,11 +99,13 @@ function CommentsTable({ comment }: CommentsTableProps) {
};
return (
-
+
{comment.value}
- @{comment.user?.username}
+
+ {comment.user?.firstName} {comment.user?.lastName}
+
{formattedDate}
Distinct groups: {option.distinctGroups}
- Group names: {option.listOfGroupNames.join(', ')}
+ Voter affiliations: {option.listOfGroupNames.join(', ')}