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
[DDW-675] Fix broken Storybook #1402
Conversation
@@ -2,7 +2,7 @@ | |||
import os from 'os'; | |||
import { uniq, upperFirst, get, includes } from 'lodash'; | |||
import { version } from '../../package.json'; | |||
import { stateDirectoryPath } from './config'; | |||
// import { stateDirectoryPath } from './config'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DeeJayElly we can not use anything from ./config
as this breaks the storybook.
The problem is that within ./config
we use fs
to load the LauncherConfig
which contains all the paths we need (incl. the state path).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import should be removed and we should send the state path to the renderer process through the IPC channel. Similar to how we do for the system locale: https://github.com/input-output-hk/daedalus/blob/develop/source/main/index.js#L142
Network status store should receive this value on app start time and then propagate it to the Network status container and component.
@@ -82,7 +82,7 @@ export const environment: Environment = Object.assign( | |||
isWindows, | |||
isMacOS, | |||
isLinux, | |||
stateDirectoryPath, | |||
stateDirectoryPath: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DeeJayElly I have on purpose used an empty string for the value of state directory. It should be fixed in the scope of this task: https://iohk.myjetbrains.com/youtrack/issue/DDW-676
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stateDirectoryPath
property should be removed from the environment.js
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👍
This PR fixes Storybook issues:
NOTE:
This PR breaks the
stateDirectoryPath
functionality on Network status dialog.It will be restored in the scope of a separate task: https://iohk.myjetbrains.com/youtrack/issue/DDW-676
Testing Checklist
Review Checklist
Basics
feature
/bug
/chore
,release-x.x.x
)yarn test
)yarn dev
)yarn package
/ CI builds)yarn flow:test
)yarn lint
)yarn prettier:check
)yarn manage:translations
produces no changes)yarn storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review
done
column on the YouTrack board