From 679dd430620eeadba455bfdbc64cecaa98e3099b Mon Sep 17 00:00:00 2001 From: Ionut-Cristian Florescu Date: Wed, 1 Nov 2023 20:24:24 +0200 Subject: [PATCH 1/2] Docs: improve nested tables examples layout --- ...NestedTablesAsyncSortingExample.module.css | 9 +++---- .../NestedTablesAsyncSortingExample.tsx | 25 ++++++++++-------- .../NestedTablesAsyncExample.module.css | 9 +++---- .../NestedTablesAsyncExample.tsx | 25 ++++++++++-------- .../NestedTablesExample.module.css | 9 +++---- .../nested-tables/NestedTablesExample.tsx | 26 ++++++++++--------- 6 files changed, 51 insertions(+), 52 deletions(-) diff --git a/app/examples/nested-tables-with-async-data-loading-and-sorting/NestedTablesAsyncSortingExample.module.css b/app/examples/nested-tables-with-async-data-loading-and-sorting/NestedTablesAsyncSortingExample.module.css index 707ebdb3f..d942ba560 100644 --- a/app/examples/nested-tables-with-async-data-loading-and-sorting/NestedTablesAsyncSortingExample.module.css +++ b/app/examples/nested-tables-with-async-data-loading-and-sorting/NestedTablesAsyncSortingExample.module.css @@ -1,7 +1,8 @@ .icon { - margin-top: rem(-2px); - width: rem(14px); + width: rem(13px); height: auto; + vertical-align: rem(-1px); + margin-right: rem(8px); } .expandIcon { @@ -11,7 +12,3 @@ .expandIconRotated { transform: rotate(90deg); } - -.employeeName { - margin-left: calc(var(--mantine-spacing-xl) * 2); -} diff --git a/app/examples/nested-tables-with-async-data-loading-and-sorting/NestedTablesAsyncSortingExample.tsx b/app/examples/nested-tables-with-async-data-loading-and-sorting/NestedTablesAsyncSortingExample.tsx index efae7028b..304feabe4 100644 --- a/app/examples/nested-tables-with-async-data-loading-and-sorting/NestedTablesAsyncSortingExample.tsx +++ b/app/examples/nested-tables-with-async-data-loading-and-sorting/NestedTablesAsyncSortingExample.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Group } from '@mantine/core'; +import { Box } from '@mantine/core'; import { IconBuilding, IconChevronRight, IconUser, IconUsers } from '@tabler/icons-react'; import { DataTable, DataTableSortStatus } from '__PACKAGE__'; import clsx from 'clsx'; @@ -25,13 +25,14 @@ function EmployeesTable({ departmentId, sortStatus }: { departmentId: string; so columns={[ { accessor: 'name', + noWrap: true, render: ({ firstName, lastName }) => ( - + -
+ {firstName} {lastName} -
-
+ + ), }, { @@ -59,16 +60,17 @@ function DepartmentsTable({ companyId, sortStatus }: { companyId: string; sortSt columns={[ { accessor: 'name', + noWrap: true, render: ({ id, name }) => ( - + -
{name}
-
+ {name} + ), }, { accessor: 'employees', textAlign: 'right', width: 200 }, @@ -104,16 +106,17 @@ export function NestedTablesAsyncSortingExample() { accessor: 'name', sortable: true, title: 'Company / Department / Employee', + noWrap: true, render: ({ id, name }) => ( - + <> -
{name}
-
+ {name} + ), }, { diff --git a/app/examples/nested-tables-with-async-data-loading/NestedTablesAsyncExample.module.css b/app/examples/nested-tables-with-async-data-loading/NestedTablesAsyncExample.module.css index 707ebdb3f..d942ba560 100644 --- a/app/examples/nested-tables-with-async-data-loading/NestedTablesAsyncExample.module.css +++ b/app/examples/nested-tables-with-async-data-loading/NestedTablesAsyncExample.module.css @@ -1,7 +1,8 @@ .icon { - margin-top: rem(-2px); - width: rem(14px); + width: rem(13px); height: auto; + vertical-align: rem(-1px); + margin-right: rem(8px); } .expandIcon { @@ -11,7 +12,3 @@ .expandIconRotated { transform: rotate(90deg); } - -.employeeName { - margin-left: calc(var(--mantine-spacing-xl) * 2); -} diff --git a/app/examples/nested-tables-with-async-data-loading/NestedTablesAsyncExample.tsx b/app/examples/nested-tables-with-async-data-loading/NestedTablesAsyncExample.tsx index a0a3021ab..2a3e52b60 100644 --- a/app/examples/nested-tables-with-async-data-loading/NestedTablesAsyncExample.tsx +++ b/app/examples/nested-tables-with-async-data-loading/NestedTablesAsyncExample.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Group } from '@mantine/core'; +import { Box } from '@mantine/core'; import { IconBuilding, IconChevronRight, IconUser, IconUsers } from '@tabler/icons-react'; import { DataTable } from '__PACKAGE__'; import clsx from 'clsx'; @@ -21,13 +21,14 @@ function EmployeesTable({ departmentId }: { departmentId: string }) { columns={[ { accessor: 'name', + noWrap: true, render: ({ firstName, lastName }) => ( - + -
+ {firstName} {lastName} -
-
+ + ), }, { @@ -55,16 +56,17 @@ function DepartmentsTable({ companyId }: { companyId: string }) { columns={[ { accessor: 'name', + noWrap: true, render: ({ id, name }) => ( - + -
{name}
-
+ {name} + ), }, { accessor: 'employees', textAlign: 'right', width: 200 }, @@ -92,16 +94,17 @@ export function NestedTablesAsyncExample() { { accessor: 'name', title: 'Company / Department / Employee', + noWrap: true, render: ({ id, name }) => ( - + <> -
{name}
-
+ {name} + ), }, { accessor: 'employees', title: 'Employees / Birth date', textAlign: 'right', width: 200 }, diff --git a/app/examples/nested-tables/NestedTablesExample.module.css b/app/examples/nested-tables/NestedTablesExample.module.css index 707ebdb3f..d942ba560 100644 --- a/app/examples/nested-tables/NestedTablesExample.module.css +++ b/app/examples/nested-tables/NestedTablesExample.module.css @@ -1,7 +1,8 @@ .icon { - margin-top: rem(-2px); - width: rem(14px); + width: rem(13px); height: auto; + vertical-align: rem(-1px); + margin-right: rem(8px); } .expandIcon { @@ -11,7 +12,3 @@ .expandIconRotated { transform: rotate(90deg); } - -.employeeName { - margin-left: calc(var(--mantine-spacing-xl) * 2); -} diff --git a/app/examples/nested-tables/NestedTablesExample.tsx b/app/examples/nested-tables/NestedTablesExample.tsx index e1b5e558d..8f393fd12 100644 --- a/app/examples/nested-tables/NestedTablesExample.tsx +++ b/app/examples/nested-tables/NestedTablesExample.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Group } from '@mantine/core'; +import { Box } from '@mantine/core'; import { IconBuilding, IconChevronRight, IconUser, IconUsers } from '@tabler/icons-react'; import { DataTable } from '__PACKAGE__'; import clsx from 'clsx'; @@ -23,16 +23,17 @@ export function NestedTablesExample() { { accessor: 'name', title: 'Company / Department / Employee', + noWrap: true, render: ({ id, name }) => ( - + <> -
{name}
-
+ {name} + ), }, { accessor: 'employees', title: 'Employees / Birth date', textAlign: 'right', width: 200 }, @@ -48,16 +49,17 @@ export function NestedTablesExample() { columns={[ { accessor: 'name', + noWrap: true, render: ({ id, name }) => ( - + - -
{name}
-
+ + {name} + ), }, { accessor: 'employees', textAlign: 'right', width: 200 }, @@ -74,12 +76,12 @@ export function NestedTablesExample() { { accessor: 'name', render: ({ firstName, lastName }) => ( - + -
+ {firstName} {lastName} -
-
+ + ), }, { From fb1df68e807065de53caf0e5e23a89637f500404 Mon Sep 17 00:00:00 2001 From: Ionut-Cristian Florescu Date: Wed, 1 Nov 2023 20:45:54 +0200 Subject: [PATCH 2/2] Docs: improve app icons --- app/manifest.webmanifest/route.ts | 20 +++++++------------- public/icon-maskable-192.png | Bin 0 -> 1748 bytes public/icon-maskable-512.png | Bin 0 -> 3963 bytes 3 files changed, 7 insertions(+), 13 deletions(-) create mode 100644 public/icon-maskable-192.png create mode 100644 public/icon-maskable-512.png diff --git a/app/manifest.webmanifest/route.ts b/app/manifest.webmanifest/route.ts index 3486a545a..0d2e31fa9 100644 --- a/app/manifest.webmanifest/route.ts +++ b/app/manifest.webmanifest/route.ts @@ -25,24 +25,12 @@ const data: MetadataRoute.Manifest = { sizes: 'any', purpose: 'any', }, - { - src: `${urlPrefix}/icon.svg`, - type: 'image/svg+xml', - sizes: 'any', - purpose: 'maskable', - }, { src: `${urlPrefix}/icon-192.png`, type: 'image/png', sizes: '192x192', purpose: 'any', }, - { - src: `${urlPrefix}/icon-192.png`, - type: 'image/png', - sizes: '192x192', - purpose: 'maskable', - }, { src: `${urlPrefix}/icon-512.png`, type: 'image/png', @@ -50,7 +38,13 @@ const data: MetadataRoute.Manifest = { purpose: 'any', }, { - src: `${urlPrefix}/icon-512.png`, + src: `${urlPrefix}/icon-maskable-192.png`, + type: 'image/png', + sizes: '192x192', + purpose: 'maskable', + }, + { + src: `${urlPrefix}/icon-maskable-512.png`, type: 'image/png', sizes: '512x512', purpose: 'maskable', diff --git a/public/icon-maskable-192.png b/public/icon-maskable-192.png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