Skip to content
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

chore: update storybook #669

Open
wants to merge 27 commits into
base: unistyles-3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1f08e0d
chore: update next version
jordmccord Feb 11, 2025
3dd255a
chore: add storybook instance
jordmccord Feb 11, 2025
5a72851
chore: add docs components
jordmccord Feb 11, 2025
5ead20c
chore: update docs and deps
jordmccord Feb 11, 2025
bf80bf1
chore: setup native storybook
jordmccord Feb 12, 2025
f1cccb5
chore: add storybook controls
jordmccord Feb 12, 2025
f73fca5
chore: start component migration
jordmccord Feb 12, 2025
f2ee206
fix: preview background
jordmccord Feb 12, 2025
bfc1ded
chore: add button kitchen sink
jordmccord Feb 13, 2025
9852039
chore: migrate docs to native-ui
jordmccord Feb 14, 2025
ee957b9
fix: issues
jordmccord Feb 14, 2025
c1d66f3
chore: organise docs
jordmccord Feb 14, 2025
0e4d372
fix: preview dark mode
jordmccord Feb 14, 2025
443ead3
chore: add switch guidelines
jordmccord Feb 17, 2025
8a2c6f6
chore: update npm ignore
jordmccord Feb 17, 2025
5e6de19
fix: lockfile
jordmccord Feb 17, 2025
771aabc
fix: build issues
jordmccord Feb 17, 2025
2f8a561
fix: install dep
jordmccord Feb 17, 2025
4809132
chore: update ios app config
jordmccord Feb 17, 2025
f14fdd5
chore: update xcode version
jordmccord Feb 17, 2025
1977725
revert: xcode version
jordmccord Feb 17, 2025
c7be126
chor: update mac runner
jordmccord Feb 17, 2025
8d66a83
chore: update ios runner
jordmccord Feb 17, 2025
6f2db91
chore: downgrade version
jordmccord Feb 17, 2025
2010464
fix: issues
jordmccord Feb 20, 2025
19b3756
fix: issues
jordmccord Feb 21, 2025
f10aa14
fix: radio
jordmccord Feb 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ module.exports = {
},
ecmaVersion: 12,
sourceType: 'module',
project: ['./packages/*/tsconfig.json', './apps/*/tsconfig.json'],
project: [
'./packages/*/tsconfig.json',
'./packages/*/*.tsconfig.json',
'./apps/*/tsconfig.json',
],
tsconfigRootDir: __dirname,
},
rules: {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/previews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
jobs:
build-for-android:
name: Build for Android
runs-on: macos-13-large
runs-on: macos-14-large
concurrency:
group: preview-android-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:

build-for-ios:
name: Build for iOS
runs-on: macos-13-xlarge
runs-on: macos-14-xlarge
concurrency:
group: preview-ios-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
uses: maxim-lobanov/setup-xcode@v1
if: steps.check_skip.outputs.skip == 'false'
with:
xcode-version: '15.2.0'
xcode-version: '16.1.0'

- name: 🔧 Setup EAS
uses: expo/expo-github-action@v8
Expand Down
13 changes: 0 additions & 13 deletions apps/native-ui-storybook/.ondevice/main.ts

This file was deleted.

70 changes: 0 additions & 70 deletions apps/native-ui-storybook/.ondevice/preview.tsx

This file was deleted.

63 changes: 0 additions & 63 deletions apps/native-ui-storybook/.ondevice/storybook.requires.ts

This file was deleted.

23 changes: 0 additions & 23 deletions apps/native-ui-storybook/.storybook/.babelrc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AsyncStorage from "@react-native-async-storage/async-storage";
import { view } from "./storybook.requires";
import AsyncStorage from '@react-native-async-storage/async-storage';
import { view } from './storybook.requires';

const StorybookUIRoot = view.getStorybookUI({
storage: {
Expand Down
98 changes: 4 additions & 94 deletions apps/native-ui-storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,98 +1,8 @@
import { dirname, join } from 'path';
/** @type{import("@storybook/react-webpack5").StorybookConfig} */
/** @type{import("@storybook/react-native").StorybookConfig} */
module.exports = {
stories: [
'../docs/**/*.mdx',
'../components/**/*.mdx',
'../components/**/*.stories.@(js|jsx|ts|tsx)',
'../stories/**/*.stories.?(ts|tsx|js|jsx)',
'../../../packages/native-ui/**/*.stories.?(ts|tsx|js|jsx)',
],
addons: [
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-react-native-web'),
getAbsolutePath('@storybook/addon-mdx-gfm'),
getAbsolutePath('storybook-dark-mode'),
getAbsolutePath('@a110/storybook-expand-all'),
getAbsolutePath('@storybook/addon-a11y'),
{
name: '@storybook/addon-react-native-web',
options: {
modulesToTranspile: [
'react-native-reanimated',
'react-native-unistyles',
'@utilitywarehouse/native-ui',
],
babelPlugins: [
[
'react-native-unistyles/plugin',
{
autoProcessImports: ['@utilitywarehouse/native-ui'],
},
],
'@babel/plugin-proposal-export-namespace-from',
'react-native-reanimated/plugin',
],
},
},
],
staticDirs: ['../assets'],
framework: {
name: getAbsolutePath('@storybook/react-webpack5'),
options: { builder: { useSWC: true } },
},
docs: {
autodocs: false,
},
refs: {
// Add any external Storybook refs if needed
},
typescript: {
reactDocgen: 'react-docgen',
},
webpackFinal: async config => {
config.resolve.alias = {
...config.resolve.alias,
'@utilitywarehouse/react-native-icons': '@utilitywarehouse/react-icons',
};

// Remove the previous rule that excludes `node_modules` entirely
// and replace it with a rule that allows @gluestack-ui transpilation.
config.module.rules.push({
test: /\.(js|jsx)$/,
// Transpile files in node_modules only if they are from @gluestack-ui
exclude: /node_modules\/(?!(@gluestack-ui)\/)/,
use: {
loader: 'babel-loader',
options: {
presets: [
['@babel/preset-env', { loose: true }], // Ensure loose: true is consistent
'@babel/preset-react',
],
plugins: [
['@babel/plugin-transform-private-property-in-object', { loose: true }],
['@babel/plugin-transform-private-methods', { loose: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
],
},
},
});

// If you need TypeScript handling:
// config.module.rules.push({
// test: /\.(ts|tsx)$/,
// exclude: /node_modules/,
// use: [
// {
// loader: require.resolve('ts-loader'),
// },
// ],
// });
// config.resolve.extensions.push('.ts', '.tsx');

return config;
},
addons: ['@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-actions'],
};

function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}
Loading
Loading