From 89d97d20174e7bde3410fb1f4603ce077fc17f57 Mon Sep 17 00:00:00 2001 From: Pavel Laptev Date: Fri, 31 May 2024 16:05:47 +0200 Subject: [PATCH] Refactor: Tailwind remove (#3932) * remove teilwind CSS imports * remove Teilwind package * remove unused CSS --- app/.eslintignore | 1 - app/.prettierrc | 2 +- app/package.json | 2 - app/postcss.config.cjs | 6 - app/src/lib/components/Board.svelte | 22 -- app/src/lib/components/CredentialCheck.svelte | 3 +- app/src/lib/components/HunkLine.svelte | 40 ++- app/src/lib/components/ProjectSelector.svelte | 1 + .../lib/components/ProjectSetupTarget.svelte | 4 - .../lib/components/RemoteBranchPreview.svelte | 6 - app/src/styles/main.postcss | 150 ++++++++-- app/src/styles/themes.postcss | 119 -------- app/tailwind.config.cjs | 175 ----------- pnpm-lock.yaml | 271 ------------------ 14 files changed, 156 insertions(+), 646 deletions(-) delete mode 100644 app/src/styles/themes.postcss delete mode 100644 app/tailwind.config.cjs diff --git a/app/.eslintignore b/app/.eslintignore index 707862912..091140ea5 100644 --- a/app/.eslintignore +++ b/app/.eslintignore @@ -22,7 +22,6 @@ yarn.lock /.eslintrc.cjs /svelte.config.js /postcss.config.cjs -/tailwind.config.cjs /playwright.config.ts # Written to disk when using `act` diff --git a/app/.prettierrc b/app/.prettierrc index 22dbf47c8..4a56f91fa 100644 --- a/app/.prettierrc +++ b/app/.prettierrc @@ -3,7 +3,7 @@ "singleQuote": true, "trailingComma": "none", "printWidth": 100, - "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], + "plugins": ["prettier-plugin-svelte"], "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }], "endOfLine": "auto" } diff --git a/app/package.json b/app/package.json index b150dfa5a..d6ae080ce 100644 --- a/app/package.json +++ b/app/package.json @@ -78,7 +78,6 @@ "posthog-js": "1.135.2", "prettier": "^3.2.5", "prettier-plugin-svelte": "^3.2.3", - "prettier-plugin-tailwindcss": "^0.5.14", "reflect-metadata": "^0.2.2", "rxjs": "^7.8.1", "svelte": "^4.2.16", @@ -88,7 +87,6 @@ "svelte-loadable-store": "^2.0.1", "svelte-outclick": "^3.7.1", "svelte-resize-observer": "^2.0.0", - "tailwindcss": "^3.4.3", "tauri-plugin-context-menu": "^0.7.0", "tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1", "tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store#v1", diff --git a/app/postcss.config.cjs b/app/postcss.config.cjs index 53fd6ad0a..6b3ee1e63 100644 --- a/app/postcss.config.cjs +++ b/app/postcss.config.cjs @@ -1,13 +1,7 @@ -const tailwindcss = require('tailwindcss'); const autoprefixer = require('autoprefixer'); -const nested = require('tailwindcss/nesting'); const config = { plugins: [ - //Makes it easier to define .dark theme classes - nested, - //Some plugins, like tailwindcss/nesting, need to run before Tailwind, - tailwindcss(), //But others, like autoprefixer, need to run after, autoprefixer ] diff --git a/app/src/lib/components/Board.svelte b/app/src/lib/components/Board.svelte index 3ffd1b860..73e005126 100644 --- a/app/src/lib/components/Board.svelte +++ b/app/src/lib/components/Board.svelte @@ -259,28 +259,6 @@ padding-left: var(--size-4); } - .branch-switcher { - margin-top: 8px; - padding: 8px; - background-color: var(--clr-bg-2); - border-width: 1px; - border-color: var(--clr-border-2); - border-radius: 4px; - } - - .branch-display { - display: flex; - flex-direction: row; - align-items: center; - gap: 4px; - margin-bottom: 2px; - } - - .branch-name { - font-weight: 600; - font-family: monospace; - } - .empty-board__image-frame { flex-shrink: 0; position: relative; diff --git a/app/src/lib/components/CredentialCheck.svelte b/app/src/lib/components/CredentialCheck.svelte index 6837b38e7..1784a8c35 100644 --- a/app/src/lib/components/CredentialCheck.svelte +++ b/app/src/lib/components/CredentialCheck.svelte @@ -114,7 +114,7 @@ Re-test credentials {/if} -
+
To test the push command, we create an empty branch and promptly remove it after the check. Read more about authentication methods. @@ -153,7 +153,6 @@ color: var(--clr-scale-ntrl-50); background: var(--clr-bg-2); border-radius: var(--radius-m); - background: var(--clr-bg-2); padding: var(--size-10) var(--size-12); } diff --git a/app/src/lib/components/HunkLine.svelte b/app/src/lib/components/HunkLine.svelte index ac945eeff..3c110bc83 100644 --- a/app/src/lib/components/HunkLine.svelte +++ b/app/src/lib/components/HunkLine.svelte @@ -35,22 +35,15 @@ return tokens; } - $: bgColor = - selectable && selected - ? 'bg-blue-400 border-blue-500 text-white dark:border-blue-700 dark:bg-blue-800' - : 'bg-light-50 border-light-300 dark:bg-dark-700 dark:border-dark-400'; + $: isSelected = selectable && selected; -
+