Skip to content
Merged
55 changes: 55 additions & 0 deletions .github/workflows/linear-releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Linear releases

on:
deployment_status:

concurrency:
group: ${{ github.workflow }}-${{ github.event.deployment.environment }}-${{ github.event.deployment.sha }}
cancel-in-progress: false

jobs:
staging:
name: staging
if: >-
github.event.deployment_status.state == 'success' &&
github.event.deployment.creator.login == 'railway-app[bot]' &&
github.event.deployment.environment == 'ePDS / pr-base'
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.deployment.sha }}
fetch-depth: 0

# This reports what reached staging to Linear. Release-note generation
# stays in the existing Changesets/GitHub Release flow.
- uses: linear/linear-release-action@0917777589db006387af296dde440385f88d6ac4 # v0.10.0
with:
access_key: ${{ secrets.LINEAR_STAGING_ACCESS_KEY }}
name: staging-${{ github.event.deployment.sha }}
version: staging-${{ github.event.deployment.sha }}

production:
name: production
if: >-
github.event.deployment_status.state == 'success' &&
github.event.deployment.creator.login == 'railway-app[bot]' &&
github.event.deployment.environment == 'ePDS / production'
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.deployment.sha }}
fetch-depth: 0

# This reports what reached production to Linear. Release-note generation
# stays in the existing Changesets/GitHub Release flow.
- uses: linear/linear-release-action@0917777589db006387af296dde440385f88d6ac4 # v0.10.0
with:
access_key: ${{ secrets.LINEAR_PRODUCTION_ACCESS_KEY }}
name: production-${{ github.event.deployment.sha }}
version: production-${{ github.event.deployment.sha }}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# ePDS

## 0.6.3

### Who should read this release

- **End users:**
- [The final sign-in screen now lines up its message card with the page title.](#v0.6.3-the-final-sign-in-screen-now-lines-up-its-message-card-with)

### Patch Changes

- <a id="v0.6.3-the-final-sign-in-screen-now-lines-up-its-message-card-with"></a> [#169](https://github.com/hypercerts-org/ePDS/pull/169) [`cc65707`](https://github.com/hypercerts-org/ePDS/commit/cc65707ef4e0cfc7d4442bbb57ccd2c8639ec589) Thanks [@Kzoeps](https://github.com/Kzoeps)! - The final sign-in screen now lines up its message card with the page title.

**Affects:** End users

**End users:** After approving an app sign-in, the "Login complete" screen now keeps the "You are being redirected..." card visually aligned with the title instead of sitting slightly lower on the page.

## 0.6.2

### Who should read this release
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ePDS",
"version": "0.6.2",
"version": "0.6.3",
"private": true,
"description": "ePDS — extended Personal Data Server for AT Protocol with passwordless OTP authentication",
"license": "MIT",
Expand Down
53 changes: 53 additions & 0 deletions packages/demo/src/__tests__/theme.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { afterEach, describe, expect, it } from 'vitest'

import { getPageTheme, getTheme } from '../lib/theme'

const originalTheme = process.env.EPDS_CLIENT_THEME

afterEach(() => {
if (originalTheme === undefined) {
delete process.env.EPDS_CLIENT_THEME
return
}

process.env.EPDS_CLIENT_THEME = originalTheme
})

describe('getTheme', () => {
it('returns null when no theme is configured', () => {
delete process.env.EPDS_CLIENT_THEME

expect(getTheme()).toBeNull()
})

it('returns null for an unknown theme', () => {
process.env.EPDS_CLIENT_THEME = 'forest'

expect(getTheme()).toBeNull()
})

it('returns the ocean theme with page values and injected CSS', () => {
process.env.EPDS_CLIENT_THEME = 'ocean'

const theme = getTheme()

expect(theme?.page.primary).toBe('#8b5cf6')
expect(theme?.injectedCss).toContain(
':root { --branding-color-primary: 139 92 246; --branding-color-primary-contrast: 26 16 51; }',
)
expect(theme?.injectedCss).toContain(String.raw`.md\:bg-slate-100`)
expect(theme?.injectedCss).toContain(
'.account-info { background: #2d1a4f; color: #c4b5fd; }',
)
})

it('returns the amber page theme', () => {
process.env.EPDS_CLIENT_THEME = 'amber'

expect(getPageTheme()).toMatchObject({
bg: '#1a1208',
primary: '#f59e0b',
primaryText: '#1a1208',
})
})
})
2 changes: 1 addition & 1 deletion packages/demo/src/app/components/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export function LoginForm() {
padding: '14px 28px',
fontSize: '16px',
fontWeight: 500,
color: '#ffffff',
color: 'var(--theme-primary-text, #ffffff)',
background: submitting
? '#4a4a4a'
: 'var(--theme-primary, #2563eb)',
Expand Down
1 change: 1 addition & 0 deletions packages/demo/src/app/components/PageShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function PageShell({ children }: PageShellProps) {
'--theme-text-muted': t.textMuted,
'--theme-text-hint': t.textHint,
'--theme-primary': t.primary,
'--theme-primary-text': t.primaryText,
'--theme-primary-hover': t.primaryHover,
'--theme-input-bg': t.inputBg,
'--theme-input-border': t.inputBorder,
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/app/components/SignInButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function SignInButton({
padding: '14px 28px',
fontSize: '16px',
fontWeight: 500,
color: '#ffffff',
color: 'var(--theme-primary-text, #ffffff)',
background: submitting ? '#4a4a4a' : 'var(--theme-primary, #2563eb)',
border: 'none',
borderRadius: '8px',
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/app/welcome/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default async function Welcome() {
padding: '14px 28px',
fontSize: '16px',
fontWeight: 500,
color: '#ffffff',
color: t?.primaryText ?? '#ffffff',
background: t?.primary ?? '#2563eb',
border: 'none',
borderRadius: '8px',
Expand Down
Loading
Loading