From a2a452b86b72f7639227f5e304c641f946f33216 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 13:29:18 +0000 Subject: [PATCH 1/2] chore(deps): update pulumi/actions action to v5 --- .github/workflows/infra-deploy_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/infra-deploy_reusable.yml b/.github/workflows/infra-deploy_reusable.yml index 1124115b5b..e9723c406c 100644 --- a/.github/workflows/infra-deploy_reusable.yml +++ b/.github/workflows/infra-deploy_reusable.yml @@ -78,7 +78,7 @@ jobs: run: pnpm build --filter=${{ inputs.project }} - name: ⚡ Preview Deploy Infrastructure - uses: pulumi/actions@v4 + uses: pulumi/actions@v5 with: command: ${{ inputs.command }} stack-name: signalco/${{ inputs.project }}/${{ steps.extract_branch.outputs.stack }} From dec739f8d91cbdc7f44215050d03ae726e55dbf3 Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Wed, 3 Jan 2024 01:25:19 +0100 Subject: [PATCH 2/2] feat(app): App font and widget size adjustments to better fit smaller screens --- .../components/dashboards/DashboardView.tsx | 13 +++++----- .../components/widgets/parts/WidgetCard.tsx | 4 ++-- .../components/widgets/parts/WidgetShades.tsx | 2 +- .../components/widgets/parts/WidgetState.tsx | 4 ++-- web/apps/app/tailwind.config.cjs | 4 ++-- .../tailwindcss-config-signalco/index.js | 24 +++++++++++++++++++ web/packages/ui/src/index.css | 4 ++++ 7 files changed, 42 insertions(+), 13 deletions(-) diff --git a/web/apps/app/components/dashboards/DashboardView.tsx b/web/apps/app/components/dashboards/DashboardView.tsx index 9479cf8413..af7eff30b2 100644 --- a/web/apps/app/components/dashboards/DashboardView.tsx +++ b/web/apps/app/components/dashboards/DashboardView.tsx @@ -66,18 +66,19 @@ function DashboardView(props: { dashboard: IDashboardModel, isEditing: boolean, } const WidgetComponent = isEditing ? DragableWidget : DisplayWidget; - const widgetSize = 1 + 76 + 1 + 8; // Default widget is 76x76 + 2px for border + 8 spacing between widgets (2x4px) - const numberOfColumns = Math.max(4, Math.floor(windowInnerWidth / widgetSize)); // When width is less than 400, set to quad column - const dynamicWidgetSize = windowInnerWidth / numberOfColumns; + const widgetSize = 1 + 64 + 1 + 4; // Default widget is 64x64 + 2px for border + 8 spacing between widgets (2x4px) + const dashboardWidth = windowInnerWidth; + const numberOfColumns = Math.max(2, Math.floor(dashboardWidth / widgetSize)); + const dynamicWidgetSize = `calc((${dashboardWidth}px - ${(numberOfColumns - 1) * 0.5}rem) / ${numberOfColumns})`; return (
diff --git a/web/apps/app/components/widgets/parts/WidgetCard.tsx b/web/apps/app/components/widgets/parts/WidgetCard.tsx index 2cbc9e5f72..fea99dcda3 100644 --- a/web/apps/app/components/widgets/parts/WidgetCard.tsx +++ b/web/apps/app/components/widgets/parts/WidgetCard.tsx @@ -63,8 +63,8 @@ export default function WidgetCard(props: IWidgetCardProps) { <> {(!isLoading && needsConfiguration) ? ( diff --git a/web/apps/app/components/widgets/parts/WidgetShades.tsx b/web/apps/app/components/widgets/parts/WidgetShades.tsx index 962264ea45..f6b6a33b91 100644 --- a/web/apps/app/components/widgets/parts/WidgetShades.tsx +++ b/web/apps/app/components/widgets/parts/WidgetShades.tsx @@ -104,7 +104,7 @@ function WidgetShades({ config, onOptions }: WidgetSharedProps) { {columns > 1 && (
2 ? 'space-between' : 'center'}> {columns > 2 && {label}} diff --git a/web/apps/app/components/widgets/parts/WidgetState.tsx b/web/apps/app/components/widgets/parts/WidgetState.tsx index 764dd09f36..98e840ce7b 100644 --- a/web/apps/app/components/widgets/parts/WidgetState.tsx +++ b/web/apps/app/components/widgets/parts/WidgetState.tsx @@ -152,8 +152,8 @@ function WidgetState(props: WidgetSharedProps) {