Skip to content

Commit fd87c68

Browse files
vetalcorerenanvalentinDominikGuzeiLucas Araujotomislavhoracek
authored
Additional tooling (#957)
* feat: migration script * feat: replace Nami ui with migration tool LW-10492 * feat: add migration components * feat: wire-up migration logic [LW-10704] * fix: allow Lace migration to retry in Nami completed state [LW-10492] * fix: check for Lace installation more granularily [LW-10492] * fix: adjust button and bg colors LW-10492 * feat: add migration analytics LW-10650 * feat: migrate color theme [LW-10673] * chore(extension): adjust migration dark theme elements * chore(extension): code cleanup * feat: handle no-wallet migration case * chore: add missing files * chore: remove unused prop * chore: noWallet fetch improvement * chore: noWallet fetch improvement * chore: code cleanup * chore: add know more faq link * feat: update nami migration copy [LW-10801] * chore: update no-wallet copy * chore: update Slide component padding * feat: make migration flow dimissible * feat: extract nami-migration-tool * feat: revert package.lock file * fix(nami): [lw-11651] update tou and pp links * fix(nami): [lw-11652] fix blinking legal & analytics popup * fix(nami): [lw-11435] resolve sdet comments * fix: init posthog even if consent === false * chore: fix readme typo * chore: remove nami migration tool tgz * chore: update copy * ci: use env over with in ci.yml as with syntax not available in bash execution * fix: remove duplicated prop def and console log * fix: adjust migration container width * feat: clear existing dismissed migration when enabling migration * feat: add nami migration dormant state for beta enrolment program * feat: update settings to show beta program and upgrade wallet conditions * feat: update migration flow additional conditions * feat: add end state for migration * chore: update switch to nami mode copies * chore: update terms content copies * send noWallet property to posthog when beginning migration * feat: make nami upgrade wallet button visible during lifecycle of migration period * fix: enable injection in all frames * chore: update terms content copies breakdown --------- Co-authored-by: Renan Ferreira <renan.ferreira@iohk.io> Co-authored-by: Dominik Guzei <dominik.guzei@gmail.com> Co-authored-by: Lucas Araujo <lucas.araujo@iohk.io> Co-authored-by: Tomislav Horaček <tomislav@tt-media.hr> Co-authored-by: Michael Chappell <7581002+mchappell@users.noreply.github.com>
1 parent c291e70 commit fd87c68

File tree

75 files changed

+13267
-5226
lines changed

Some content is hidden

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

75 files changed

+13267
-5226
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
run: npm test
2525
- name: Generates Secrets File
2626
run: |
27-
echo "export default { PROJECT_ID_MAINNET: '${{ secrets.PROJECT_ID_MAINNET }}', PROJECT_ID_PREVIEW: '${{ secrets.PROJECT_ID_PREVIEW }}', PROJECT_ID_PREPROD: '${{ secrets.PROJECT_ID_PREPROD }}'};" > secrets.production.js
27+
echo "export default { PROJECT_ID_MAINNET: '${{ secrets.PROJECT_ID_MAINNET }}', PROJECT_ID_PREVIEW: '${{ secrets.PROJECT_ID_PREVIEW }}', PROJECT_ID_PREPROD: '${{ secrets.PROJECT_ID_PREPROD }}', POSTHOG_API_KEY:'${{ secrets.POSTHOG_API_KEY_PRODUCTION }}', POSTHOG_PROJECT_ID: '${{ secrets.POSTHOG_PROJECT_ID_PRODUCTION }}'};" > secrets.production.js
2828
- name: Build
2929
run: npm run build
30-
with:
30+
env:
3131
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
3232
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
3333
SENTRY_ORG: ${{ vars.SENTRY_ORG }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ secrets.development.js
2424

2525
# IDEs
2626
.idea
27+
28+
*storybook.log

.storybook/main.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
const path = require('path');
2+
const { NormalModuleReplacementPlugin } = require('webpack');
3+
4+
const config = {
5+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
6+
addons: [
7+
'@storybook/addon-webpack5-compiler-swc',
8+
'@storybook/addon-onboarding',
9+
'@storybook/addon-links',
10+
'@storybook/addon-essentials',
11+
'@chromatic-com/storybook',
12+
'@storybook/addon-interactions',
13+
],
14+
framework: {
15+
name: '@storybook/react-webpack5',
16+
options: {},
17+
},
18+
webpackFinal: webPackconfig => {
19+
const fileLoaderRule = webPackconfig.module.rules.find(rule =>
20+
rule.test?.test('.svg'),
21+
);
22+
fileLoaderRule.exclude = /\.svg$/;
23+
webPackconfig.module.rules.push({
24+
test: /\.svg$/i,
25+
issuer: /\.[jt]sx?$/,
26+
use: [
27+
{
28+
loader: '@svgr/webpack',
29+
options: {
30+
icon: true,
31+
exportType: 'named',
32+
},
33+
},
34+
],
35+
});
36+
webPackconfig.resolve.extensions.push('.svg');
37+
if (webPackconfig.plugins) {
38+
webPackconfig.plugins.push(
39+
new NormalModuleReplacementPlugin(
40+
/^webextension-polyfill$/,
41+
path.join(__dirname, './mocks/webextension-polyfill.mock.ts'),
42+
),
43+
);
44+
}
45+
46+
return webPackconfig;
47+
},
48+
};
49+
export default config;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const runtime = {};
2+
export const storage = {};

.storybook/preview.jsx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from 'react';
2+
import { Box, DarkMode, Flex, LightMode } from '@chakra-ui/react';
3+
import Theme from '../src/ui/theme';
4+
5+
const preview = {
6+
parameters: {
7+
controls: {
8+
matchers: {
9+
color: /(background|color)$/i,
10+
date: /Date$/i,
11+
},
12+
},
13+
},
14+
};
15+
16+
export const decorators = [
17+
(Story) => {
18+
return (
19+
<Theme>
20+
<Flex>
21+
<LightMode>
22+
<Box p="50px">
23+
<Story />
24+
</Box>
25+
</LightMode>
26+
<DarkMode>
27+
<Box p="50px" backgroundColor="#2E2E2E">
28+
<Story />
29+
</Box>
30+
</DarkMode>
31+
</Flex>
32+
</Theme>
33+
);
34+
},
35+
];
36+
37+
export default preview;

0 commit comments

Comments
 (0)