Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Format columns width with widthWeightagePercentage #401

Merged
merged 28 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b68ebdd
ref: Update columns resizing logic to better handle columns visibilit…
mayan-000 Jan 4, 2024
671bcff
chore: Add comments to resizing utils
mayan-000 Jan 4, 2024
a87eb3c
chore: add comment to resizing util
mayan-000 Jan 4, 2024
33e71d6
feat: allow adding width of percentage column can take
mayan-000 Jan 5, 2024
1831392
feat: Add logic to use width percentage when all columns are toggled
mayan-000 Jan 5, 2024
8355fb7
feat: Get initial column size when first render happens
mayan-000 Jan 5, 2024
758456a
Update the percentage across columns
mayan-000 Jan 5, 2024
a60ab30
feat: add isToggleAll flag for equal width distribution when hand pic…
mayan-000 Jan 8, 2024
cc7d525
feat: add column width percentage in CLI dashboard
mayan-000 Jan 9, 2024
efe50f4
fix: when toggle-off plus devtool closes, reopen and toggle-on should…
mayan-000 Jan 10, 2024
3dd75af
fix: export empty columns if data is loading
mayan-000 Jan 11, 2024
af2b291
Replace maxWidth in table cell component with minWidth
mayan-000 Jan 9, 2024
4cb9f0d
fix: hide overflow as the container provides one
mayan-000 Jan 10, 2024
376e8fc
fix: increase minHeight for better visibility of columns header
mayan-000 Jan 10, 2024
7f263a7
fix: hide bg color when resizing
mayan-000 Jan 11, 2024
be0fa28
Merge branch 'develop' into table
mayan-000 Jan 16, 2024
331aac1
fix: add overflow to body
mayan-000 Jan 16, 2024
e8b074a
test: update test-cases for cookieTable
mayan-000 Jan 17, 2024
9116a31
Merge branch 'develop' into table
mayan-000 Jan 23, 2024
c764d51
ref: move widthWeighate to useCookieListing
mayan-000 Jan 23, 2024
db6594f
test: update testcases
mayan-000 Jan 24, 2024
a998168
Merge branch 'develop' into table
mayan-000 Jan 24, 2024
4ebf583
ref: update width distribution
mayan-000 Jan 24, 2024
a5c57ef
ref: update width distribution
mayan-000 Jan 25, 2024
1b3fb0c
Merge branch 'develop' into table
mayan-000 Jan 30, 2024
61442b0
fix: early return if no columns available
mayan-000 Jan 30, 2024
2cbd079
fix: stop horizontal scroll for deformed sizing
mayan-000 Jan 30, 2024
1eb6aed
fix: stop horizontal scroll for deformed sizing
mayan-000 Jan 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/cli-dashboard/src/components/affectedCookies/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const AffectedCookies = ({ cookies, selectedSite }: AffectedCookiesProps) => {
accessorKey: 'parsedCookie.name',
cell: (info: InfoType) => info,
enableHiding: false,
widthWeightagePercentage: 15,
},
{
header: 'Scope',
Expand All @@ -57,31 +58,37 @@ const AffectedCookies = ({ cookies, selectedSite }: AffectedCookiesProps) => {
{!info ? 'Third Party' : 'First Party'}
</p>
),
widthWeightagePercentage: 8,
},
{
header: 'Domain',
accessorKey: 'parsedCookie.domain',
cell: (info: InfoType) => info,
widthWeightagePercentage: 9,
},
{
header: 'Partition Key',
accessorKey: 'parsedCookie.partitionKey',
cell: (info: InfoType) => info,
widthWeightagePercentage: 9,
},
{
header: 'SameSite',
accessorKey: 'parsedCookie.samesite',
cell: (info: InfoType) => <span className="capitalize">{info}</span>,
widthWeightagePercentage: 8,
},
{
header: 'Category',
accessorKey: 'analytics.category',
cell: (info: InfoType) => info,
widthWeightagePercentage: 10,
},
{
header: 'Platform',
accessorKey: 'analytics.platform',
cell: (info: InfoType) => info,
widthWeightagePercentage: 10,
},
{
header: 'HttpOnly',
Expand All @@ -91,6 +98,7 @@ const AffectedCookies = ({ cookies, selectedSite }: AffectedCookiesProps) => {
{info ? <span className="font-serif">✓</span> : ''}
</p>
),
widthWeightagePercentage: 5,
},
{
header: 'Secure',
Expand All @@ -100,21 +108,25 @@ const AffectedCookies = ({ cookies, selectedSite }: AffectedCookiesProps) => {
{info ? <span className="font-serif">✓</span> : ''}
</p>
),
widthWeightagePercentage: 5,
},
{
header: 'Value',
accessorKey: 'parsedCookie.value',
cell: (info: InfoType) => info,
widthWeightagePercentage: 10,
},
{
header: 'Path',
accessorKey: 'parsedCookie.path',
cell: (info: InfoType) => info,
widthWeightagePercentage: 4,
},
{
header: 'Expires / Max-Age',
accessorKey: 'parsedCookie.expires',
cell: (info: InfoType) => (info ? info : 'Session'),
widthWeightagePercentage: 7,
},
],
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const useCookieListing = (
accessorKey: 'parsedCookie.name',
cell: (info: InfoType) => info,
enableHiding: false,
widthWeightagePercentage: 15,
},
{
header: 'Scope',
Expand All @@ -62,31 +63,37 @@ const useCookieListing = (
{!info ? 'Third Party' : 'First Party'}
</p>
),
widthWeightagePercentage: 8,
},
{
header: 'Domain',
accessorKey: 'parsedCookie.domain',
cell: (info: InfoType) => info,
widthWeightagePercentage: 9,
},
{
header: 'Partition Key',
accessorKey: 'parsedCookie.partitionKey',
cell: (info: InfoType) => info,
widthWeightagePercentage: 9,
},
{
header: 'SameSite',
accessorKey: 'parsedCookie.samesite',
cell: (info: InfoType) => <span className="capitalize">{info}</span>,
widthWeightagePercentage: 8,
},
{
header: 'Category',
accessorKey: 'analytics.category',
cell: (info: InfoType) => info,
widthWeightagePercentage: 10,
},
{
header: 'Platform',
accessorKey: 'analytics.platform',
cell: (info: InfoType) => info,
widthWeightagePercentage: 10,
},
{
header: 'HttpOnly',
Expand All @@ -96,6 +103,7 @@ const useCookieListing = (
{info ? <span className="font-serif">✓</span> : ''}
</p>
),
widthWeightagePercentage: 5,
},
{
header: 'Secure',
Expand All @@ -105,21 +113,25 @@ const useCookieListing = (
{info ? <span className="font-serif">✓</span> : ''}
</p>
),
widthWeightagePercentage: 5,
},
{
header: 'Value',
accessorKey: 'parsedCookie.value',
cell: (info: InfoType) => info,
widthWeightagePercentage: 10,
},
{
header: 'Path',
accessorKey: 'parsedCookie.path',
cell: (info: InfoType) => info,
widthWeightagePercentage: 4,
},
{
header: 'Expires / Max-Age',
accessorKey: 'parsedCookie.expires',
cell: (info: InfoType) => (info ? info : 'Session'),
widthWeightagePercentage: 7,
},
],
[]
Expand Down
Loading
Loading