Skip to content

Commit 31bb542

Browse files
authoredMar 13, 2025··
Merge pull request #1397 from line/fix/minor-bugs
feat: update column sizes and integrate js-base64 for encoding/decoding in feedback and issue components
2 parents 5cee9b6 + abe0580 commit 31bb542

File tree

13 files changed

+25
-26
lines changed

13 files changed

+25
-26
lines changed
 

‎apps/web/src/entities/dashboard/ui/issue-rank.ui.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const getColumns = (t: TFunction) => [
5353
columnHelper.accessor('no', {
5454
header: 'No',
5555
enableSorting: false,
56-
size: 100,
56+
size: 30,
5757
}),
5858
columnHelper.accessor('name', {
5959
header: 'Issue',

‎apps/web/src/entities/feedback/lib/use-feedback-query-converter.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import { useCallback, useMemo, useState } from 'react';
1818
import dayjs from 'dayjs';
19+
import { decode, encode } from 'js-base64';
1920
import { createParser, useQueryState } from 'nuqs';
2021

2122
import type {
@@ -72,10 +73,10 @@ const useFeedbackQueryConverter = (input: {
7273
'queries',
7374
createParser({
7475
parse: (value) => {
75-
return JSON.parse(atob(value)) as Record<string, unknown>[];
76+
return JSON.parse(decode(value)) as Record<string, unknown>[];
7677
},
7778
serialize: (value) => {
78-
return btoa(JSON.stringify(value));
79+
return encode(JSON.stringify(value));
7980
},
8081
}).withDefault([{ createdAt: DEFAULT_DATE_RANGE, condition: 'IS' }]),
8182
);

‎apps/web/src/entities/feedback/ui/feedback-detail-sheet.ui.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import { useState } from 'react';
1818
import { useOverlay } from '@toss/use-overlay';
1919
import dayjs from 'dayjs';
20+
import { encode } from 'js-base64';
2021
import { useTranslation } from 'next-i18next';
2122

2223
import {
@@ -147,7 +148,7 @@ const FeedbackDetailSheet = (props: Props) => {
147148
className="cursor-pointer"
148149
onClick={async () => {
149150
await navigator.clipboard.writeText(
150-
`${window.location.origin}/${window.location.pathname}?queries=${btoa(JSON.stringify([{ id: feedback.id, condition: 'IS' }]))}&channelId=${channelId}`,
151+
`${window.location.origin}/${window.location.pathname}?queries=${encode(JSON.stringify([{ id: feedback.id, condition: 'IS' }]))}&channelId=${channelId}`,
151152
);
152153
toast(t('v2.toast.copy'), {
153154
icon: <Icon name="RiCheckboxMultipleFill" />,

‎apps/web/src/entities/field/field-columns.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const getFieldColumns = (reorder?: (data: FieldInfo[]) => void) =>
3636
columnHelper.display({
3737
id: 'drag-handle',
3838
cell: ({ row }) => <RowDragHandleCell rowId={row.id} />,
39-
size: 10,
39+
size: 30,
4040
enableSorting: false,
4141
})
4242
: null,

‎apps/web/src/entities/member/member-columns.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const memberColumns = [
4343
onCheckedChange={(checked) => row.toggleSelected(checked)}
4444
/>
4545
),
46-
size: 50,
46+
size: 30,
4747
enableSorting: false,
4848
}),
4949
columnHelper.accessor('user.email', {

‎apps/web/src/entities/user/ui/user-management-table.ui.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const UserManagementTable: React.FC<IProps> = ({ createButton }) => {
152152
useEffect(() => {
153153
table.setPageIndex(0);
154154
table.resetRowSelection();
155-
}, [pagination.pageSize]);
155+
}, [pagination.pageSize, queries]);
156156

157157
const selectedRowIds = useMemo(() => {
158158
return Object.entries(table.getState().rowSelection).reduce(

‎apps/web/src/pages/main/project/[projectId]/feedback.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ const FeedbackManagementPage: NextPageWithLayout<IProps> = (props) => {
167167
format: 'issue',
168168
name: field.name,
169169
matchType: ['IS'],
170+
visible: true,
170171
};
171172
}
172173
if (field.format === 'select') {

‎apps/web/src/shared/ui/table-filter-popover/table-filter-popover.type.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export type TableFilterOperator = 'AND' | 'OR';
2121
export type TableFilterField = {
2222
key: string;
2323
name: string;
24+
visible?: boolean;
2425
} & (
2526
| TableFilterFieldString
2627
| TableFilterFieldNumber

‎apps/web/src/shared/ui/table-filter-popover/table-filter-popover.ui.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ const TableFilterPopover = (props: Props) => {
206206
options={filterFields
207207
.filter(
208208
(v) =>
209-
v.key === 'issueIds' ||
209+
!!v.visible ||
210210
(table ?
211211
table
212212
.getVisibleFlatColumns()

‎apps/web/src/shared/ui/tables/basic-table.ui.tsx

-13
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ import {
4545

4646
import { cn } from '@/shared/utils';
4747

48-
import InfiniteScrollArea from '../infinite-scroll-area.ui';
4948
import SortingTableHead from '../sorting-table-head.ui';
5049
import DraggableRow from './draggable-row.ui';
5150
import TableLoadingRow from './table-loading-row';
@@ -62,7 +61,6 @@ interface IProps<T> {
6261
onClickRow?: (index: number, row: T) => void;
6362
reorder?: (data: T[]) => void;
6463
disableRound?: boolean;
65-
isInfiniteScroll?: boolean;
6664
}
6765

6866
const BasicTable = <T,>(props: IProps<T>) => {
@@ -75,7 +73,6 @@ const BasicTable = <T,>(props: IProps<T>) => {
7573
onClickRow,
7674
reorder,
7775
disableRound,
78-
isInfiniteScroll,
7976
} = props;
8077

8178
// reorder rows after drag & drop
@@ -195,16 +192,6 @@ const BasicTable = <T,>(props: IProps<T>) => {
195192
}
196193
/>
197194
))}
198-
{isInfiniteScroll && (
199-
<tr>
200-
<td>
201-
<InfiniteScrollArea
202-
fetchNextPage={table.nextPage}
203-
hasNextPage={table.getCanNextPage()}
204-
/>
205-
</td>
206-
</tr>
207-
)}
208195
</SortableContext>
209196
}
210197
</TableBody>

‎apps/web/src/shared/ui/tables/row-drag-handle-cell.ui.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ const RowDragHandleCell: React.FC<Props> = (props) => {
2727
const { attributes, listeners } = useSortable({ id: rowId });
2828

2929
return (
30-
<button {...attributes} {...listeners}>
31-
<Icon name="RiDraggable" className="text-neutral-tertiary" size={16} />
32-
</button>
30+
<div>
31+
<button {...attributes} {...listeners}>
32+
<Icon name="RiDraggable" className="text-neutral-tertiary" size={16} />
33+
</button>
34+
</div>
3335
);
3436
};
3537

‎apps/web/src/widgets/issue-table/ui/issue-detail-sheet.ui.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ const IssueDetailSheet = (props: Props) => {
218218
query: {
219219
projectId,
220220
channelId: v.id,
221-
queries: btoa(
221+
queries: encode(
222222
JSON.stringify([
223223
{ issueIds: [data.id], condition: 'IS' },
224224
]),

‎apps/web/src/widgets/project-settings/ui/member-setting.ui.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const MemberSetting: React.FC<IProps> = (props) => {
111111
useEffect(() => {
112112
table.setPageIndex(0);
113113
table.resetRowSelection();
114-
}, [pagination.pageSize]);
114+
}, [pagination.pageSize, queries]);
115115

116116
const rowSelectionIds = useMemo(
117117
() =>
@@ -229,24 +229,28 @@ const MemberSetting: React.FC<IProps> = (props) => {
229229
/>
230230
));
231231
};
232+
232233
const filterFields: TableFilterField[] = [
233234
{
234235
key: 'email',
235236
format: 'string',
236237
name: 'Email',
237238
matchType: ['CONTAINS', 'IS'],
239+
visible: true,
238240
},
239241
{
240242
key: 'name',
241243
format: 'string',
242244
name: 'Name',
243245
matchType: ['CONTAINS', 'IS'],
246+
visible: true,
244247
},
245248
{
246249
key: 'department',
247250
format: 'string',
248251
name: 'Department',
249252
matchType: ['CONTAINS', 'IS'],
253+
visible: true,
250254
},
251255
{
252256
key: 'role',
@@ -258,12 +262,14 @@ const MemberSetting: React.FC<IProps> = (props) => {
258262
name: role.name,
259263
})) ?? [],
260264
matchType: ['IS'],
265+
visible: true,
261266
},
262267
{
263268
key: 'createdAt',
264269
format: 'date',
265270
name: 'Joined',
266271
matchType: ['IS', 'BETWEEN'],
272+
visible: true,
267273
},
268274
];
269275

0 commit comments

Comments
 (0)
Please sign in to comment.