From 39ae948f249517a828dc259dd0870cb7a3093061 Mon Sep 17 00:00:00 2001 From: garronej Date: Sat, 18 Mar 2023 18:16:41 +0100 Subject: [PATCH] Disable storybook, for now --- .github/workflows/ci.yaml | 28 +-- src/keycloak-theme/Template.stories.tsx | 32 --- src/keycloak-theme/pages/Error.stories.tsx | 16 -- src/keycloak-theme/pages/Error.tsx | 34 --- .../pages/IdpReviewUserProfile.stories.tsx | 17 -- .../pages/IdpReviewUserProfile.tsx | 47 ----- src/keycloak-theme/pages/Info.stories.tsx | 38 ---- src/keycloak-theme/pages/Info.tsx | 49 ----- src/keycloak-theme/pages/Login.stories.tsx | 27 --- .../pages/LoginConfigTotp.stories.tsx | 27 --- src/keycloak-theme/pages/LoginConfigTotp.tsx | 186 ----------------- .../pages/LoginIdpLinkConfirm.stories.tsx | 17 -- .../pages/LoginIdpLinkConfirm.tsx | 54 ----- .../pages/LoginIdpLinkEmail.stories.tsx | 17 -- .../pages/LoginIdpLinkEmail.tsx | 32 --- src/keycloak-theme/pages/LoginOtp.stories.tsx | 16 -- src/keycloak-theme/pages/LoginOtp.tsx | 114 ----------- .../pages/LoginPageExpired.stories.tsx | 16 -- src/keycloak-theme/pages/LoginPageExpired.tsx | 36 ---- .../pages/LoginPassword.stories.tsx | 16 -- src/keycloak-theme/pages/LoginPassword.tsx | 86 -------- .../pages/LoginResetPassword.stories.tsx | 17 -- .../pages/LoginResetPassword.tsx | 69 ------- .../pages/LoginUpdatePassword.stories.tsx | 16 -- .../pages/LoginUpdatePassword.tsx | 117 ----------- .../pages/LoginUsername.stories.tsx | 17 -- src/keycloak-theme/pages/LoginUsername.tsx | 158 -------------- .../pages/LoginVerifyEmail.stories.tsx | 16 -- src/keycloak-theme/pages/LoginVerifyEmail.tsx | 32 --- .../pages/LogoutConfirm.stories.tsx | 16 -- src/keycloak-theme/pages/LogoutConfirm.tsx | 58 ------ .../pages/MyExtraPage1.stories.tsx | 16 -- .../pages/MyExtraPage2.stories.tsx | 18 -- src/keycloak-theme/pages/Register.stories.tsx | 54 ----- .../pages/RegisterUserProfile.stories.tsx | 82 -------- src/keycloak-theme/pages/Terms.stories.tsx | 16 -- .../pages/UpdateUserProfile.stories.tsx | 16 -- .../pages/UpdateUserProfile.tsx | 67 ------ .../pages/WebauthnAuthenticate.stories.tsx | 16 -- .../pages/WebauthnAuthenticate.tsx | 193 ------------------ 40 files changed, 14 insertions(+), 1885 deletions(-) delete mode 100644 src/keycloak-theme/Template.stories.tsx delete mode 100644 src/keycloak-theme/pages/Error.stories.tsx delete mode 100644 src/keycloak-theme/pages/Error.tsx delete mode 100644 src/keycloak-theme/pages/IdpReviewUserProfile.stories.tsx delete mode 100644 src/keycloak-theme/pages/IdpReviewUserProfile.tsx delete mode 100644 src/keycloak-theme/pages/Info.stories.tsx delete mode 100644 src/keycloak-theme/pages/Info.tsx delete mode 100644 src/keycloak-theme/pages/Login.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginConfigTotp.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginConfigTotp.tsx delete mode 100644 src/keycloak-theme/pages/LoginIdpLinkConfirm.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginIdpLinkConfirm.tsx delete mode 100644 src/keycloak-theme/pages/LoginIdpLinkEmail.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginIdpLinkEmail.tsx delete mode 100644 src/keycloak-theme/pages/LoginOtp.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginOtp.tsx delete mode 100644 src/keycloak-theme/pages/LoginPageExpired.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginPageExpired.tsx delete mode 100644 src/keycloak-theme/pages/LoginPassword.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginPassword.tsx delete mode 100644 src/keycloak-theme/pages/LoginResetPassword.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginResetPassword.tsx delete mode 100644 src/keycloak-theme/pages/LoginUpdatePassword.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginUpdatePassword.tsx delete mode 100644 src/keycloak-theme/pages/LoginUsername.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginUsername.tsx delete mode 100644 src/keycloak-theme/pages/LoginVerifyEmail.stories.tsx delete mode 100644 src/keycloak-theme/pages/LoginVerifyEmail.tsx delete mode 100644 src/keycloak-theme/pages/LogoutConfirm.stories.tsx delete mode 100644 src/keycloak-theme/pages/LogoutConfirm.tsx delete mode 100644 src/keycloak-theme/pages/MyExtraPage1.stories.tsx delete mode 100644 src/keycloak-theme/pages/MyExtraPage2.stories.tsx delete mode 100644 src/keycloak-theme/pages/Register.stories.tsx delete mode 100644 src/keycloak-theme/pages/RegisterUserProfile.stories.tsx delete mode 100644 src/keycloak-theme/pages/Terms.stories.tsx delete mode 100644 src/keycloak-theme/pages/UpdateUserProfile.stories.tsx delete mode 100644 src/keycloak-theme/pages/UpdateUserProfile.tsx delete mode 100644 src/keycloak-theme/pages/WebauthnAuthenticate.stories.tsx delete mode 100644 src/keycloak-theme/pages/WebauthnAuthenticate.tsx diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6d8ed83..9c66784 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -130,18 +130,18 @@ jobs: - uses: actions/setup-node@v3.6.0 - run: npx -y -p gh-pages@3.0.0 gh-pages -u "github-actions-bot " -d build - github_pages_storybook: - runs-on: ubuntu-latest - needs: - - create_github_release - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v3.6.0 - - uses: bahmutov/npm-install@v1 - - run: yarn build-keycloak-theme # Only for the assets in public - - run: yarn build-storybook - - run: git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${{github.repository}}.git - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: npx -y -p gh-pages@3.0.0 gh-pages -u "github-actions-bot " -d storybook-static --dest storybook --add +# github_pages_storybook: +# runs-on: ubuntu-latest +# needs: +# - create_github_release +# steps: +# - uses: actions/checkout@v2 +# - uses: actions/setup-node@v3.6.0 +# - uses: bahmutov/npm-install@v1 +# - run: yarn build-keycloak-theme # Only for the assets in public +# - run: yarn build-storybook +# - run: git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${{github.repository}}.git +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# - run: npx -y -p gh-pages@3.0.0 gh-pages -u "github-actions-bot " -d storybook-static --dest storybook --add diff --git a/src/keycloak-theme/Template.stories.tsx b/src/keycloak-theme/Template.stories.tsx deleted file mode 100644 index d8660ed..0000000 --- a/src/keycloak-theme/Template.stories.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import type {ComponentMeta} from '@storybook/react'; -import KcApp from './KcApp'; -import {template} from '../../.storybook/util' - -const bind = template('my-extra-page-1.ftl'); - -export default { - title: 'Theme/Template', - component: KcApp, - parameters: { - layout: 'fullscreen', - }, -} as ComponentMeta; - - -export const Default = bind({}) -export const InFrench = bind({locale: {currentLanguageTag: 'fr'}}) -export const RealmDisplayNameIsHtml = bind({ - realm: { - displayNameHtml: 'my realm' - } -}) - -export const NoInternationalization = bind({ - realm: { - internationalizationEnabled: false, - } -}) - -export const WithGlobalError = bind({ - message: {type: "error", summary: "This is an error"} -}) diff --git a/src/keycloak-theme/pages/Error.stories.tsx b/src/keycloak-theme/pages/Error.stories.tsx deleted file mode 100644 index 768a6d1..0000000 --- a/src/keycloak-theme/pages/Error.stories.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import {ComponentMeta} from '@storybook/react'; -import KcApp from '../KcApp'; -import {template} from '../../../.storybook/util' - -const bind = template('error.ftl'); - -export default { - kind: 'Page', - title: 'Theme/Pages/Notification/Error', - component: KcApp, - parameters: { - layout: 'fullscreen', - }, -} as ComponentMeta; - -export const Default = bind({message: {type: 'error', summary: 'Something went wrong'}}) diff --git a/src/keycloak-theme/pages/Error.tsx b/src/keycloak-theme/pages/Error.tsx deleted file mode 100644 index b28ff06..0000000 --- a/src/keycloak-theme/pages/Error.tsx +++ /dev/null @@ -1,34 +0,0 @@ -// copied and adapted from https://github.com/InseeFrLab/keycloakify/blob/main/src/lib/pages/Error.tsx -import React from "react"; -import type { PageProps } from "keycloakify" -import type { KcContext } from "../kcContext"; -import type { I18n } from "../i18n"; - - -export default function Error(props: PageProps, I18n>) { - const { kcContext, i18n, doFetchDefaultThemeResources = true, Template, ...kcProps } = props; - - const { message, client } = kcContext; - - const { msg } = i18n; - - return ( -