From 6c0aee308fb4258fb4053e46fb264fefb719bdb1 Mon Sep 17 00:00:00 2001 From: Daniel Dietrich Date: Mon, 25 Oct 2021 17:54:07 +0200 Subject: [PATCH] Use a TailwindCSS managed class to centralize layout styling and to reduce redundant code --- components/dashboard/src/FromReferrer.tsx | 2 +- components/dashboard/src/Menu.tsx | 2 +- components/dashboard/src/components/Header.tsx | 2 +- components/dashboard/src/components/PageWithSubMenu.tsx | 2 +- components/dashboard/src/index.css | 3 +++ components/dashboard/src/prebuilds/InstallGitHubApp.tsx | 4 ++-- components/dashboard/src/projects/ConfigureProject.tsx | 2 +- components/dashboard/src/projects/Prebuild.tsx | 2 +- components/dashboard/src/projects/Prebuilds.tsx | 2 +- components/dashboard/src/projects/Project.tsx | 2 +- components/dashboard/src/projects/Projects.tsx | 2 +- components/dashboard/src/teams/Members.tsx | 2 +- components/dashboard/src/workspaces/Workspaces.tsx | 6 +++--- 13 files changed, 18 insertions(+), 15 deletions(-) diff --git a/components/dashboard/src/FromReferrer.tsx b/components/dashboard/src/FromReferrer.tsx index fdabe9c29d26d8..0bf42c32961e67 100644 --- a/components/dashboard/src/FromReferrer.tsx +++ b/components/dashboard/src/FromReferrer.tsx @@ -18,7 +18,7 @@ export default function FromReferrer() { return <>; } - return
+ return

No Referrer Found

diff --git a/components/dashboard/src/Menu.tsx b/components/dashboard/src/Menu.tsx index 42c3c8c39a2b7a..6bf2c67a37ce90 100644 --- a/components/dashboard/src/Menu.tsx +++ b/components/dashboard/src/Menu.tsx @@ -245,7 +245,7 @@ export default function Menu() { } return <> -
+
diff --git a/components/dashboard/src/components/Header.tsx b/components/dashboard/src/components/Header.tsx index 1df0553c6020b0..a98b60baea24a8 100644 --- a/components/dashboard/src/components/Header.tsx +++ b/components/dashboard/src/components/Header.tsx @@ -19,7 +19,7 @@ export default function Header(p: HeaderProps) { } document.title = `${p.title} — Gitpod`; }, []); - return
+ return
{typeof p.title === "string" ? (

{p.title}

) : p.title} diff --git a/components/dashboard/src/components/PageWithSubMenu.tsx b/components/dashboard/src/components/PageWithSubMenu.tsx index 7d36bd2fe9c0d6..c43aa26eb181f0 100644 --- a/components/dashboard/src/components/PageWithSubMenu.tsx +++ b/components/dashboard/src/components/PageWithSubMenu.tsx @@ -22,7 +22,7 @@ export function PageWithSubMenu(p: PageWithSubMenuProps) { const location = useLocation(); return
-
+
    {p.subMenu.map(e => { diff --git a/components/dashboard/src/index.css b/components/dashboard/src/index.css index 08181173cee08d..7e5035bb1b0689 100644 --- a/components/dashboard/src/index.css +++ b/components/dashboard/src/index.css @@ -33,6 +33,9 @@ @apply text-sm text-gray-400 dark:text-gray-600; } + .app-container { + @apply lg:px-28 px-10; + } .btn-login { @apply rounded-md border-none bg-gray-100 hover:bg-gray-200 text-gray-500 dark:text-gray-200 dark:bg-gray-800 dark:hover:bg-gray-600; } diff --git a/components/dashboard/src/prebuilds/InstallGitHubApp.tsx b/components/dashboard/src/prebuilds/InstallGitHubApp.tsx index 35229d61262a3f..13a27c045f61d7 100644 --- a/components/dashboard/src/prebuilds/InstallGitHubApp.tsx +++ b/components/dashboard/src/prebuilds/InstallGitHubApp.tsx @@ -48,7 +48,7 @@ export default function InstallGitHubApp() { const params = new URLSearchParams(location.search); const installationId = params.get("installation_id") || undefined; if (!installationId) { - return
    + return

    No Installation ID Found

    @@ -61,7 +61,7 @@ export default function InstallGitHubApp() { const goToApp = () => window.location.href = gitpodHostUrl.toString(); return <> -
    +

    Install GitHub App

    diff --git a/components/dashboard/src/projects/ConfigureProject.tsx b/components/dashboard/src/projects/ConfigureProject.tsx index 18dae4b2604188..27124d8ff497f8 100644 --- a/components/dashboard/src/projects/ConfigureProject.tsx +++ b/components/dashboard/src/projects/ConfigureProject.tsx @@ -193,7 +193,7 @@ export default function () { return <>
    -
    +
    setSelectedEditor('.gitpod.yml')} /> diff --git a/components/dashboard/src/projects/Prebuild.tsx b/components/dashboard/src/projects/Prebuild.tsx index 0fc935dce08799..c3a29fb7af734c 100644 --- a/components/dashboard/src/projects/Prebuild.tsx +++ b/components/dashboard/src/projects/Prebuild.tsx @@ -99,7 +99,7 @@ export default function () { return <>
    -
    +
    diff --git a/components/dashboard/src/projects/Prebuilds.tsx b/components/dashboard/src/projects/Prebuilds.tsx index 70dcf8164595eb..45dec252ec521e 100644 --- a/components/dashboard/src/projects/Prebuilds.tsx +++ b/components/dashboard/src/projects/Prebuilds.tsx @@ -142,7 +142,7 @@ export default function () { return <>
    -
    +
    diff --git a/components/dashboard/src/projects/Project.tsx b/components/dashboard/src/projects/Project.tsx index fa277fdca85907..3bd883400f5745 100644 --- a/components/dashboard/src/projects/Project.tsx +++ b/components/dashboard/src/projects/Project.tsx @@ -170,7 +170,7 @@ export default function () { return <>
    View recent active branches for {toRemoteURL(project?.cloneUrl || '')}.} /> -
    +
    {showAuthBanner ? (
    diff --git a/components/dashboard/src/projects/Projects.tsx b/components/dashboard/src/projects/Projects.tsx index addf02882b256e..cc521b150d9fd4 100644 --- a/components/dashboard/src/projects/Projects.tsx +++ b/components/dashboard/src/projects/Projects.tsx @@ -100,7 +100,7 @@ export default function () { )} {projects.length > 0 && ( -
    +
    diff --git a/components/dashboard/src/teams/Members.tsx b/components/dashboard/src/teams/Members.tsx index 28c47e02c39c5a..1c1bbab950e5cc 100644 --- a/components/dashboard/src/teams/Members.tsx +++ b/components/dashboard/src/teams/Members.tsx @@ -111,7 +111,7 @@ export default function() { return <>
    -
    +
    diff --git a/components/dashboard/src/workspaces/Workspaces.tsx b/components/dashboard/src/workspaces/Workspaces.tsx index 4b8bf3665e4a1b..2cb426571c31e5 100644 --- a/components/dashboard/src/workspaces/Workspaces.tsx +++ b/components/dashboard/src/workspaces/Workspaces.tsx @@ -143,7 +143,7 @@ export default function () { {workspaceModel?.initialized && ( activeWorkspaces.length > 0 || inactiveWorkspaces.length > 0 || workspaceModel.searchTerm ? <> -
    +
    @@ -167,7 +167,7 @@ export default function () {
    - +
    { teamsWorkspaceModel?.initialized && @@ -191,7 +191,7 @@ export default function () {
    : -
    +
    {teamsWorkspaceModel?.initialized && }