-
Notifications
You must be signed in to change notification settings - Fork 1
Add contract templates and onboarding functionality #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e981bc1
feat: add contract templates and onboarding functionality
Starefossen e03bdd0
feat: implement contract readiness checks and indicators in sponsor CRM
Starefossen 3cdce2d
feat: add onboarding URL builder tests and enhance contract readiness…
Starefossen e18c823
feat: add Hero Sections and Speaker Components stories to design syst…
Starefossen fbd72e5
feat: add Storybook deployment workflow and ESLint configuration for …
Starefossen 0fb6c2a
feat: update Storybook imports to use '@storybook/nextjs-vite' and en…
Starefossen 2c06395
refactor: standardize class order and formatting in HeroSections and …
Starefossen 580db61
refactor: streamline onEdit and onDelete functions in SponsorCard sto…
Starefossen ba999dc
feat: initialize MSW in Chromatic, Storybook deployment, and PR check…
Starefossen d5ee6c0
feat: add Storybook stories for SponsorOnboardingForm
Starefossen 44c80cf
fix: address PR review comments
Starefossen cc1e876
refactor: clean up formatting and streamline HTTP request handlers in…
Starefossen 18a3cfc
feat: add Storybook stories for SponsorGlobalInfoFields, SponsorEmail…
Starefossen ec63035
Remove Typography stories and add Conference Landing Page example wit…
Starefossen 35ee6f5
feat: add Storybook stories for admin components related to proposals…
Starefossen 0116959
fix: update story title for ProposalsFilter component in Storybook
Starefossen 6de2ba9
fix: update story titles for CompactProposalList and SpeakerDetailsFo…
Starefossen 73c08aa
refactor: reorganize admin documentation and component stories
Starefossen fcc94ec
fix: update title for EmailTemplates story to reflect correct categor…
Starefossen ac12e59
feat: add Storybook stories for Program and Proposals systems with de…
Starefossen af602da
refactor: rename story exports for consistency and clarity
Starefossen 6db1f81
refactor(Welcome.stories.tsx): enhance documentation layout and navig…
Starefossen a2af74f
fix(Tip component): correct template string formatting for class names
Starefossen 24e8a3d
fix: update minimum height values for various components to improve l…
Starefossen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Chromatic | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: ['**'] | ||
| push: | ||
| branches: ['main'] | ||
|
|
||
| jobs: | ||
| chromatic: | ||
| name: Visual Regression Tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # Required for Chromatic to detect changes | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '24' | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10.24.0 | ||
|
|
||
| - name: Get pnpm store directory | ||
| shell: bash | ||
| run: | | ||
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
|
|
||
| - name: Setup pnpm cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ env.STORE_PATH }} | ||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pnpm-store- | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Initialize MSW | ||
| run: pnpm msw init public --save=false | ||
|
|
||
| - name: Publish to Chromatic | ||
| uses: chromaui/action@latest | ||
| with: | ||
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
| buildScriptName: build-storybook | ||
| onlyChanged: true | ||
| autoAcceptChanges: main | ||
| exitOnceUploaded: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| name: Deploy Storybook | ||
|
|
||
| on: | ||
| push: | ||
| branches: ['main'] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: 'pages' | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build Storybook | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '24' | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10.24.0 | ||
|
|
||
| - name: Get pnpm store directory | ||
| shell: bash | ||
| run: | | ||
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
|
|
||
| - name: Setup pnpm cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ env.STORE_PATH }} | ||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pnpm-store- | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Initialize MSW | ||
| run: pnpm msw init public --save=false | ||
|
|
||
| - name: Build Storybook | ||
| run: pnpm build-storybook | ||
|
|
||
| - name: Add CNAME file | ||
| run: echo "design.cloudnativedays.no" > storybook-static/CNAME | ||
|
|
||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v5 | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: storybook-static | ||
|
|
||
| deploy: | ||
| name: Deploy to GitHub Pages | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
|
|
||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Storybook Environment Variables (Example Template) | ||
| # --------------------------------------------------------------------------- | ||
| # This file is an example/template only. Do NOT put real secrets or production | ||
| # configuration in this committed file. | ||
| # | ||
| # Recommended usage: | ||
| # 1. Copy this file to `.storybook/.env` (which should be gitignored). | ||
| # 2. Replace the example values in that copy with your real local values. | ||
| # | ||
| # The variables below are commented out so this example file does not define | ||
| # any active environment variables when loaded. | ||
| # --------------------------------------------------------------------------- | ||
|
|
||
| # Sanity CMS | ||
| # NEXT_PUBLIC_SANITY_PROJECT_ID=your_project_id | ||
| # NEXT_PUBLIC_SANITY_DATASET=production | ||
| # NEXT_PUBLIC_SANITY_API_VERSION=2024-01-01 | ||
|
|
||
| # Base URL for stories | ||
| # NEXT_PUBLIC_BASE_URL=http://localhost:6006 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import React from 'react' | ||
| import { QueryClient, QueryClientProvider } from '@tanstack/react-query' | ||
| import { httpBatchLink } from '@trpc/client' | ||
| import { api } from '@/lib/trpc/client' | ||
| import type { Decorator } from '@storybook/nextjs-vite' | ||
|
|
||
| // Create these outside the decorator to avoid recreating on every render | ||
| const queryClient = new QueryClient({ | ||
| defaultOptions: { | ||
| queries: { | ||
| retry: false, | ||
| refetchOnWindowFocus: false, | ||
| staleTime: Infinity, | ||
| }, | ||
| }, | ||
| }) | ||
|
|
||
| const trpcClient = api.createClient({ | ||
| links: [ | ||
| httpBatchLink({ | ||
| url: '/api/trpc', | ||
| // MSW will intercept these requests (relative URL for cross-origin compatibility) | ||
| }), | ||
| ], | ||
| }) | ||
|
|
||
| export const TRPCDecorator: Decorator = (Story) => { | ||
| return ( | ||
| <api.Provider client={trpcClient} queryClient={queryClient}> | ||
| <QueryClientProvider client={queryClient}> | ||
| <Story /> | ||
| </QueryClientProvider> | ||
| </api.Provider> | ||
| ) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import type { StorybookConfig } from '@storybook/nextjs-vite' | ||
| import { dirname, join } from 'node:path' | ||
| import { fileURLToPath } from 'node:url' | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url) | ||
| const __dirname = dirname(__filename) | ||
|
|
||
| const config: StorybookConfig = { | ||
| stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
| addons: ['@storybook/addon-docs'], | ||
| framework: { | ||
| name: '@storybook/nextjs-vite', | ||
| options: { | ||
| nextConfigPath: join(__dirname, '../next.config.ts'), | ||
| }, | ||
| }, | ||
| staticDirs: ['../public'], | ||
| typescript: { | ||
| check: false, | ||
| reactDocgen: 'react-docgen-typescript', | ||
| reactDocgenTypescriptOptions: { | ||
| shouldExtractLiteralValuesFromEnum: true, | ||
| propFilter: (prop) => | ||
| prop.parent ? !/node_modules/.test(prop.parent.fileName) : true, | ||
| }, | ||
| }, | ||
| core: { | ||
| disableTelemetry: true, | ||
| }, | ||
| docs: {}, | ||
| features: { | ||
| sidebarOnboardingChecklist: false, | ||
| }, | ||
| } | ||
|
|
||
| export default config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <!-- Load Google Fonts for Storybook --> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=IBM+Plex+Mono:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap" | ||
| rel="stylesheet" | ||
| /> | ||
|
|
||
| <style> | ||
| :root { | ||
| --font-inter: 'Inter', sans-serif; | ||
| --font-jetbrains: 'JetBrains Mono', monospace; | ||
| --font-space-grotesk: 'Space Grotesk', sans-serif; | ||
| --font-ibm-plex-sans: 'IBM Plex Sans', sans-serif; | ||
| --font-ibm-plex-mono: 'IBM Plex Mono', monospace; | ||
| --font-bricolage: 'Bricolage Grotesque', sans-serif; | ||
| --font-atkinson: 'Atkinson Hyperlegible', sans-serif; | ||
| } | ||
| </style> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.