Skip to content

Commit de1adcb

Browse files
authored
Merge pull request #1 from ably/refactor/major-ui-overhaul
Refactor/major UI overhaul
2 parents 158331a + 7b2532c commit de1adcb

File tree

194 files changed

+47443
-5334
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+47443
-5334
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_ABLY_API_KEY=

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
labels: [ ] # prevent the default `dependencies` label from being added to pull requests
8+
groups:
9+
simple:
10+
applies-to: version-updates
11+
update-types:
12+
- "minor"
13+
- "patch"
14+
upgrades:
15+
applies-to: version-updates
16+
update-types:
17+
- "major"
18+
securityUpdates:
19+
applies-to: security-updates
20+
update-types:
21+
- "minor"
22+
- "major"
23+
- "patch"

.github/workflows/dev.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Build and test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
env:
10+
BASE_NODE_VERSION: 24
11+
12+
jobs:
13+
audit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
submodules: true
19+
- uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ env.BASE_NODE_VERSION }}
22+
- run: npm ci
23+
- run: npm audit --production
24+
format-check:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v2
28+
with:
29+
submodules: true
30+
- uses: actions/setup-node@v1
31+
with:
32+
node-version: ${{ env.BASE_NODE_VERSION }}
33+
- run: npm ci
34+
- run: npm run format:check
35+
lint:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v2
39+
with:
40+
submodules: true
41+
- uses: actions/setup-node@v1
42+
with:
43+
node-version: ${{ env.BASE_NODE_VERSION }}
44+
- run: npm ci
45+
- run: npm run lint
46+
test-typescript:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v2
50+
with:
51+
submodules: true
52+
- uses: actions/setup-node@v1
53+
with:
54+
node-version: ${{ env.BASE_NODE_VERSION }}
55+
- run: npm ci
56+
- run: npm run test:typescript
57+
test:
58+
runs-on: ubuntu-latest
59+
permissions:
60+
contents: read
61+
pull-requests: write
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
node-version: [18, 20, 22, 24]
66+
name: test node ${{ matrix.node-version }}
67+
steps:
68+
- uses: actions/checkout@v2
69+
with:
70+
submodules: true
71+
- uses: actions/setup-node@v1
72+
with:
73+
node-version: ${{ matrix.node-version }}
74+
- run: npm ci
75+
- run: npm run test
76+
name: test
77+
if: ${{ matrix.node-version != env.BASE_NODE_VERSION }}
78+
build:
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v2
82+
with:
83+
submodules: true
84+
- uses: actions/setup-node@v1
85+
with:
86+
node-version: ${{ env.BASE_NODE_VERSION }}
87+
- run: npm ci
88+
- run: npm run build

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release packages
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: 'write'
12+
id-token: 'write'
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
submodules: true
17+
- uses: actions/setup-node@v3
18+
with:
19+
node-version: '20.10.0'
20+
registry-url: 'https://registry.npmjs.org'
21+
- name: Install dependencies and publish
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
run: |
25+
npm ci
26+
npm run build
27+
npm publish --provenance --access public

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ yarn-debug.log*
77
yarn-error.log*
88
/.pnp
99
.pnp.js
10+
.env
1011

1112
.vscode/*
1213
/.idea/
1314
/dist/
15+
16+
*storybook.log
17+
storybook-static

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "ably-common"]
2+
path = ably-common
3+
url = [email protected]:ably/ably-common.git

.storybook/main.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import type { StorybookConfig } from '@storybook/react-vite';
2+
import * as path from 'node:path';
3+
4+
const config: StorybookConfig = {
5+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
6+
addons: ['@storybook/addon-onboarding', '@storybook/addon-docs'],
7+
framework: {
8+
name: '@storybook/react-vite',
9+
options: {},
10+
},
11+
typescript: {
12+
reactDocgen: 'react-docgen-typescript',
13+
reactDocgenTypescriptOptions: {
14+
shouldExtractLiteralValuesFromEnum: true,
15+
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
16+
},
17+
},
18+
docs: {
19+
docsMode: true,
20+
},
21+
async viteFinal(originalConfig) {
22+
return {
23+
...originalConfig,
24+
resolve: {
25+
...originalConfig.resolve,
26+
alias: {
27+
...(originalConfig.resolve?.alias ?? {}),
28+
'@ably/chat/react': path.resolve(__dirname, 'mocks/mock-ably-chat.ts'),
29+
},
30+
},
31+
};
32+
},
33+
};
34+
export default config;

0 commit comments

Comments
 (0)