From 39dfa8eeae66b8d4a67f76797533edaabd70b51f Mon Sep 17 00:00:00 2001 From: DoubleCookies <12849336+DoubleCookies@users.noreply.github.com> Date: Wed, 14 Sep 2022 15:19:10 +0300 Subject: [PATCH 1/6] outline for tabbed add as text/user buttons --- app/routes/calendar/$id/report-winners.tsx | 7 +++++++ app/styles/calendar-event.css | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/app/routes/calendar/$id/report-winners.tsx b/app/routes/calendar/$id/report-winners.tsx index 46e07686e..51c4cdb46 100644 --- a/app/routes/calendar/$id/report-winners.tsx +++ b/app/routes/calendar/$id/report-winners.tsx @@ -4,6 +4,7 @@ import { type LoaderArgs, json, redirect, + LinksFunction } from "@remix-run/node"; import { Form, useLoaderData } from "@remix-run/react"; import { z } from "zod"; @@ -29,6 +30,11 @@ import { FormErrors } from "~/components/FormErrors"; import type { Unpacked } from "~/utils/types"; import { calendarEventPage } from "~/utils/urls"; import { useTranslation } from "react-i18next"; +import styles from "~/styles/calendar-event.css"; + +export const links: LinksFunction = () => { + return [{ rel: "stylesheet", href: styles }]; +}; const playersSchema = z .array( @@ -402,6 +408,7 @@ function Players({ variant="minimal" onClick={() => handlePlayerInputTypeChange(i)} data-cy="change-input-type-button" + className={"user-type-button"} > {asPlainInput ? t("forms.team.player.addAsUser") diff --git a/app/styles/calendar-event.css b/app/styles/calendar-event.css index eb6d0c311..ec0a13cb5 100644 --- a/app/styles/calendar-event.css +++ b/app/styles/calendar-event.css @@ -44,3 +44,7 @@ color: var(--text-lighter); font-size: var(--fonts-xs); } + +.user-type-button:focus { + outline: 2px solid var(--theme); +} \ No newline at end of file From 8827d633a32aa40718a16d039f28e60421ac2202 Mon Sep 17 00:00:00 2001 From: DoubleCookies <12849336+DoubleCookies@users.noreply.github.com> Date: Wed, 14 Sep 2022 23:07:40 +0300 Subject: [PATCH 2/6] move css to utils --- app/routes/calendar/$id/report-winners.tsx | 2 +- app/styles/calendar-event.css | 4 ---- app/styles/utils.css | 4 ++++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/routes/calendar/$id/report-winners.tsx b/app/routes/calendar/$id/report-winners.tsx index 51c4cdb46..460274d35 100644 --- a/app/routes/calendar/$id/report-winners.tsx +++ b/app/routes/calendar/$id/report-winners.tsx @@ -408,7 +408,7 @@ function Players({ variant="minimal" onClick={() => handlePlayerInputTypeChange(i)} data-cy="change-input-type-button" - className={"user-type-button"} + className={"outline-theme"} > {asPlainInput ? t("forms.team.player.addAsUser") diff --git a/app/styles/calendar-event.css b/app/styles/calendar-event.css index ec0a13cb5..0f4dd6a64 100644 --- a/app/styles/calendar-event.css +++ b/app/styles/calendar-event.css @@ -43,8 +43,4 @@ .event__results-participant-count { color: var(--text-lighter); font-size: var(--fonts-xs); -} - -.user-type-button:focus { - outline: 2px solid var(--theme); } \ No newline at end of file diff --git a/app/styles/utils.css b/app/styles/utils.css index 905c21cc4..3b61424e8 100644 --- a/app/styles/utils.css +++ b/app/styles/utils.css @@ -121,3 +121,7 @@ .all-unset { all: unset; } + +.outline-theme:focus { + outline: 2px solid var(--theme); +} \ No newline at end of file From c97368d8f42416469568334a2c0178606ed72bca Mon Sep 17 00:00:00 2001 From: DoubleCookies <12849336+DoubleCookies@users.noreply.github.com> Date: Thu, 15 Sep 2022 08:07:05 +0300 Subject: [PATCH 3/6] remove unused styles --- app/routes/calendar/$id/report-winners.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/routes/calendar/$id/report-winners.tsx b/app/routes/calendar/$id/report-winners.tsx index 460274d35..70f1e98af 100644 --- a/app/routes/calendar/$id/report-winners.tsx +++ b/app/routes/calendar/$id/report-winners.tsx @@ -3,8 +3,7 @@ import { type ActionFunction, type LoaderArgs, json, - redirect, - LinksFunction + redirect } from "@remix-run/node"; import { Form, useLoaderData } from "@remix-run/react"; import { z } from "zod"; @@ -30,11 +29,6 @@ import { FormErrors } from "~/components/FormErrors"; import type { Unpacked } from "~/utils/types"; import { calendarEventPage } from "~/utils/urls"; import { useTranslation } from "react-i18next"; -import styles from "~/styles/calendar-event.css"; - -export const links: LinksFunction = () => { - return [{ rel: "stylesheet", href: styles }]; -}; const playersSchema = z .array( From aa2f546761e32220a7f3217abe9f2e26ced23c50 Mon Sep 17 00:00:00 2001 From: DoubleCookies <12849336+DoubleCookies@users.noreply.github.com> Date: Thu, 15 Sep 2022 08:07:47 +0300 Subject: [PATCH 4/6] fix --- app/routes/calendar/$id/report-winners.tsx | 2 +- app/styles/calendar-event.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes/calendar/$id/report-winners.tsx b/app/routes/calendar/$id/report-winners.tsx index 70f1e98af..2120cfd05 100644 --- a/app/routes/calendar/$id/report-winners.tsx +++ b/app/routes/calendar/$id/report-winners.tsx @@ -3,7 +3,7 @@ import { type ActionFunction, type LoaderArgs, json, - redirect + redirect, } from "@remix-run/node"; import { Form, useLoaderData } from "@remix-run/react"; import { z } from "zod"; diff --git a/app/styles/calendar-event.css b/app/styles/calendar-event.css index 0f4dd6a64..eb6d0c311 100644 --- a/app/styles/calendar-event.css +++ b/app/styles/calendar-event.css @@ -43,4 +43,4 @@ .event__results-participant-count { color: var(--text-lighter); font-size: var(--fonts-xs); -} \ No newline at end of file +} From fb08ca8426183aaea212813e1cebf701914c1087 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Thu, 15 Sep 2022 10:51:45 +0300 Subject: [PATCH 5/6] Add empy line at EOF --- app/styles/utils.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/styles/utils.css b/app/styles/utils.css index 3b61424e8..9b27e808e 100644 --- a/app/styles/utils.css +++ b/app/styles/utils.css @@ -124,4 +124,4 @@ .outline-theme:focus { outline: 2px solid var(--theme); -} \ No newline at end of file +} From cf5a9de6e59f9d56bc905b28ffd02b17f4b19e24 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Thu, 15 Sep 2022 10:52:28 +0300 Subject: [PATCH 6/6] Remove curly boys --- app/routes/calendar/$id/report-winners.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/calendar/$id/report-winners.tsx b/app/routes/calendar/$id/report-winners.tsx index 2120cfd05..a3c501115 100644 --- a/app/routes/calendar/$id/report-winners.tsx +++ b/app/routes/calendar/$id/report-winners.tsx @@ -402,7 +402,7 @@ function Players({ variant="minimal" onClick={() => handlePlayerInputTypeChange(i)} data-cy="change-input-type-button" - className={"outline-theme"} + className="outline-theme" > {asPlainInput ? t("forms.team.player.addAsUser")