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

App for Mithril #3244

Merged
merged 31 commits into from Mar 28, 2018
Merged

App for Mithril #3244

merged 31 commits into from Mar 28, 2018

Conversation

sixmen
Copy link
Member

@sixmen sixmen commented Mar 20, 2018

Issue:

What I did

Add a new storybook app for Mithril framework

How to test

Is this testable with jest or storyshots?

  • I think so, but I'm not sure.

Does this need a new example in the kitchen sink apps?

  • I included a new example in this PR.

Does this need an update to the documentation?

  • Maybe, yes.

If your answer is yes to any of these, please make sure to include it in your PR.

  • Please tell me documents which I should modify. (I'm not a native English speaker.)

@codecov
Copy link

codecov bot commented Mar 20, 2018

Codecov Report

Merging #3244 into master will decrease coverage by 0.71%.
The diff coverage is 9.9%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3244      +/-   ##
==========================================
- Coverage   36.05%   35.33%   -0.72%     
==========================================
  Files         445      470      +25     
  Lines        9793    10018     +225     
  Branches      908      954      +46     
==========================================
+ Hits         3531     3540       +9     
- Misses       5707     5863     +156     
- Partials      555      615      +60
Impacted Files Coverage Δ
lib/cli/lib/project_types.js 0% <ø> (ø) ⬆️
app/mithril/bin/build.js 0% <ø> (ø)
app/mithril/bin/index.js 0% <ø> (ø)
lib/cli/lib/detect.js 0% <ø> (ø) ⬆️
...p/mithril/src/server/config/webpack.config.prod.js 0% <0%> (ø)
app/mithril/src/client/preview/error_display.js 0% <0%> (ø)
lib/cli/bin/generate.js 0% <0%> (ø) ⬆️
app/mithril/src/server/config/utils.js 0% <0%> (ø)
app/mithril/src/server/index.js 0% <0%> (ø)
app/mithril/src/server/config/globals.js 0% <0%> (ø)
... and 123 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 108af01...36379bb. Read the comment docs.

@igor-dv igor-dv added this to the v4.0.0 milestone Mar 20, 2018
Copy link
Member

@igor-dv igor-dv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addon-links": "3.4.0-rc.3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need to be dependant on specific addons. Every addon example should be in a dedicated example-app.

/** @jsx m */

import m from 'mithril';
import { linkTo, hrefTo } from '@storybook/addon-links';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be used in the example-app.

@@ -0,0 +1,7 @@
import deprecate from 'util-deprecate';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's deprecated, I think you don't need to add it.

<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<base target="_parent">
<script>
if (window.parent !== window) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it's redundant

@@ -0,0 +1,3 @@
# Storybook Demo

This is a demo app to test Mithril integration with Storybook. Run `npm install` to sync Storybook module with the source code and run `npm run storybook` to start the Storybook.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why "npm install", doesn't it bootstrapped with yarn workspace?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied it from the vue-kitchen-sink. I'm glad to tell me a good readme since I'm not good at English.

@sixmen
Copy link
Member Author

sixmen commented Mar 21, 2018

I'm done as much as I could. But I don't know how to setup netlify, so I skipped a live example.

@igor-dv
Copy link
Member

igor-dv commented Mar 21, 2018

@ndelangen , maybe you can help with it?

README.md Outdated
@@ -72,6 +72,7 @@ For additional help, join us [in our Slack](https://now-examples-slackin-rrirkqo
- [Vue](app/vue)
- [Angular](app/angular)
- [Polymer](app/polymer) <sup>alpha</sup>
- [Mithril](app/mithril)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make it alpha as well?

/** @jsx m */

import m from 'mithril';
import { linkTo, hrefTo } from '@storybook/addon-links';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant in my previous comment, is that we don't want our (demo) components to be dependant on any storybook addons. Think about the real world app. Probably you will expose some callbacks and will use them inside a stories.js file with bindings to the particular addon.

@ndelangen
Copy link
Member

Sorry for the late reply. Yeah I can setup a netlify deploy for the mythril example no problem 🎉

@Hypnosphi
Copy link
Member

#3297 should fix the CLI tests failure

@sixmen sixmen requested a review from usulpro as a code owner March 28, 2018 01:06
@Hypnosphi
Copy link
Member

Hypnosphi commented Mar 28, 2018

Netlify + live examples section

Done

Copy link
Member

@Hypnosphi Hypnosphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @sixmen

@Hypnosphi Hypnosphi merged commit 239edfb into storybookjs:master Mar 28, 2018
@Hypnosphi
Copy link
Member

Released as 4.0.0-alpha.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants