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

[framework] add ember support #4237

Merged
merged 4 commits into from Oct 3, 2018

Conversation

@gabrielcsapo
Contributor

gabrielcsapo commented Sep 27, 2018

Issue: #2877

What I did

Added ember framework support

ember-example

How to test

Is this testable with Jest or Chromatic screenshots?
Does this need a new example in the kitchen sink apps? yes
Does this need an update to the documentation? yes

@ndelangen

This comment has been minimized.

Show comment
Hide comment
@ndelangen

ndelangen Sep 27, 2018

Member

This is super exciting!

Member

ndelangen commented Sep 27, 2018

This is super exciting!

@storybook-safe-bot

This comment has been minimized.

Show comment
Hide comment
@storybook-safe-bot

storybook-safe-bot Sep 27, 2018

Contributor
Fails
🚫

PR is not labeled with one of: ["cleanup","BREAKING CHANGE","feature request","bug","documentation","maintenance","dependencies:update","dependencies","other"]

Generated by 🚫 dangerJS

Contributor

storybook-safe-bot commented Sep 27, 2018

Fails
🚫

PR is not labeled with one of: ["cleanup","BREAKING CHANGE","feature request","bug","documentation","maintenance","dependencies:update","dependencies","other"]

Generated by 🚫 dangerJS

Show resolved Hide resolved lib/cli/bin/generate.js Outdated
let appInstance;
function render(options, el) {

This comment has been minimized.

@rwjblue

rwjblue Sep 27, 2018

This is essentially the same as how component tests are setup and ran. I'd like to extract a primitive library that can be shared between the main @ember/test-helpers and this project so that we can more easily support broad ranges of Ember applications (and reduce specific coupling in storybook itself).

Thoughts?

@rwjblue

rwjblue Sep 27, 2018

This is essentially the same as how component tests are setup and ran. I'd like to extract a primitive library that can be shared between the main @ember/test-helpers and this project so that we can more easily support broad ranges of Ember applications (and reduce specific coupling in storybook itself).

Thoughts?

This comment has been minimized.

@gabrielcsapo

gabrielcsapo Sep 27, 2018

Contributor

I totally think this would be something we could decouple. Something like @ember/setup that would just handle setting up and exposing a booted application

@gabrielcsapo

gabrielcsapo Sep 27, 2018

Contributor

I totally think this would be something we could decouple. Something like @ember/setup that would just handle setting up and exposing a booted application

Show resolved Hide resolved app/ember/src/client/preview/render.js Outdated
Show resolved Hide resolved app/ember/src/client/preview/utils.js Outdated
@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Sep 27, 2018

Codecov Report

Merging #4237 into master will decrease coverage by 0.49%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #4237     +/-   ##
=========================================
- Coverage   40.64%   40.15%   -0.5%     
=========================================
  Files         498      507      +9     
  Lines        5875     5942     +67     
  Branches      785      791      +6     
=========================================
- Hits         2388     2386      -2     
- Misses       3109     3171     +62     
- Partials      378      385      +7
Impacted Files Coverage Δ
app/ember/src/server/build.js 0% <0%> (ø)
app/ember/src/client/index.js 0% <0%> (ø)
addons/centered/ember.js 0% <0%> (ø)
app/ember/src/server/index.js 0% <0%> (ø)
app/ember/bin/index.js 0% <0%> (ø)
addons/centered/src/ember.js 0% <0%> (ø)
app/ember/src/client/preview/globals.js 0% <0%> (ø)
lib/cli/lib/detect.js 0% <0%> (ø) ⬆️
app/ember/src/server/options.js 0% <0%> (ø)
app/ember/src/client/preview/render.js 0% <0%> (ø)
... and 23 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 e8bd830...7af2fc4. Read the comment docs.

codecov bot commented Sep 27, 2018

Codecov Report

Merging #4237 into master will decrease coverage by 0.49%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #4237     +/-   ##
=========================================
- Coverage   40.64%   40.15%   -0.5%     
=========================================
  Files         498      507      +9     
  Lines        5875     5942     +67     
  Branches      785      791      +6     
=========================================
- Hits         2388     2386      -2     
- Misses       3109     3171     +62     
- Partials      378      385      +7
Impacted Files Coverage Δ
app/ember/src/server/build.js 0% <0%> (ø)
app/ember/src/client/index.js 0% <0%> (ø)
addons/centered/ember.js 0% <0%> (ø)
app/ember/src/server/index.js 0% <0%> (ø)
app/ember/bin/index.js 0% <0%> (ø)
addons/centered/src/ember.js 0% <0%> (ø)
app/ember/src/client/preview/globals.js 0% <0%> (ø)
lib/cli/lib/detect.js 0% <0%> (ø) ⬆️
app/ember/src/server/options.js 0% <0%> (ø)
app/ember/src/client/preview/render.js 0% <0%> (ø)
... and 23 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 e8bd830...7af2fc4. Read the comment docs.

@gabrielcsapo

This comment has been minimized.

Show comment
Hide comment
@gabrielcsapo

gabrielcsapo Sep 28, 2018

Contributor

@Keraito @ndelangen thoughts on the current state?

Contributor

gabrielcsapo commented Sep 28, 2018

@Keraito @ndelangen thoughts on the current state?

Show resolved Hide resolved app/ember/README.md Outdated
Show resolved Hide resolved app/ember/package.json Outdated
Show resolved Hide resolved app/ember/src/server/framework-preset-babel-ember.js
Show resolved Hide resolved examples/ember-cli/.storybook/addons.js
Show resolved Hide resolved examples/ember-cli/package.json Outdated
Show resolved Hide resolved examples/ember-cli/package.json Outdated
Show resolved Hide resolved app/ember/package.json Outdated
Show resolved Hide resolved .eslintignore Outdated

@tylerturdenpants tylerturdenpants referenced this pull request Sep 28, 2018

Merged

Ember Times Issue 67 #3590

4 of 7 tasks complete

Changed were applied

Show outdated Hide outdated .circleci/config.yml Outdated
Show resolved Hide resolved ADDONS_SUPPORT.md Outdated
@Hypnosphi

This comment has been minimized.

Show comment
Hide comment
@Hypnosphi

Hypnosphi Sep 30, 2018

Member

Please add a minimal Ember project fixture (probably just the output of ember init) here: https://github.com/storybooks/storybook/tree/2891e5d4035cb7c5c09656cb19688edf78722490/lib/cli/test/fixtures

Member

Hypnosphi commented Sep 30, 2018

Please add a minimal Ember project fixture (probably just the output of ember init) here: https://github.com/storybooks/storybook/tree/2891e5d4035cb7c5c09656cb19688edf78722490/lib/cli/test/fixtures

Show resolved Hide resolved scripts/netlify-build.sh Outdated
Show resolved Hide resolved ADDONS_SUPPORT.md Outdated

@gabrielcsapo gabrielcsapo requested review from alterx and tmeasday as code owners Sep 30, 2018

@gabrielcsapo

This comment has been minimized.

Show comment
Hide comment
@gabrielcsapo

gabrielcsapo Oct 1, 2018

Contributor

I updated the example gif and made the stories and intro make more sense in its context. (It used to say go to button and edit, now makes more sense for ember and the welcome-banner example)

Contributor

gabrielcsapo commented Oct 1, 2018

I updated the example gif and made the stories and intro make more sense in its context. (It used to say go to button and edit, now makes more sense for ember and the welcome-banner example)

@Hypnosphi

This comment has been minimized.

Show comment
Hide comment
Member

Hypnosphi commented Oct 1, 2018

@Hypnosphi

This comment has been minimized.

Show comment
Hide comment
@Hypnosphi

Hypnosphi Oct 1, 2018

Member

Can you please add separate commits instead of squashing them each time? Right now it's impossible to review the new diff

Member

Hypnosphi commented Oct 1, 2018

Can you please add separate commits instead of squashing them each time? Right now it's impossible to review the new diff

@gabrielcsapo

This comment has been minimized.

Show comment
Hide comment
@gabrielcsapo

gabrielcsapo Oct 1, 2018

Contributor

@Hypnosphi yes I can do that in the future

Contributor

gabrielcsapo commented Oct 1, 2018

@Hypnosphi yes I can do that in the future

"build": "ember build",
"build-storybook": "yarn build && cp -r public/* dist; build-storybook -s dist",
"dev": "ember serve",
"storybook": "yarn build && cp -r public/* dist; start-storybook -p 9009 -s dist"

This comment has been minimized.

@igor-dv

igor-dv Oct 2, 2018

Member

why should it be built before using with dev mode?

@igor-dv

igor-dv Oct 2, 2018

Member

why should it be built before using with dev mode?

This comment has been minimized.

@gabrielcsapo

gabrielcsapo Oct 2, 2018

Contributor

In order to build a storybook you need an ember app to introspect on. It is because of the dynamic nature of ember where as react has an implicit import structure, you can build a component standalone, ember needs to register all components beforehand. Which is why we have the build before dev necessity.

@gabrielcsapo

gabrielcsapo Oct 2, 2018

Contributor

In order to build a storybook you need an ember app to introspect on. It is because of the dynamic nature of ember where as react has an implicit import structure, you can build a component standalone, ember needs to register all components beforehand. Which is why we have the build before dev necessity.

@gabrielcsapo

This comment has been minimized.

Show comment
Hide comment
@gabrielcsapo

gabrielcsapo Oct 2, 2018

Contributor

@igor-dv added the needed links to #supported-frameworks and live-examples

Contributor

gabrielcsapo commented Oct 2, 2018

@igor-dv added the needed links to #supported-frameworks and live-examples

@igor-dv

igor-dv approved these changes Oct 3, 2018

@igor-dv igor-dv merged commit e529cd9 into storybooks:master Oct 3, 2018

33 of 35 checks passed

CodeFactor 1 issue fixed. 3 issues found.
Details
ci/circleci: cli-latest-cra Your tests failed on CircleCI
Details
Angular (Storybook) TeamCity build finished
Details
Build (Storybook) TeamCity build finished
Details
CLI test (Storybook) TeamCity build finished
Details
CLI test, latest CRA (Storybook) TeamCity build finished
Details
CRA (Storybook) TeamCity build finished
Details
Chromatic (Storybook) TeamCity build finished
Details
Danger (Storybook) TeamCity build finished
Details
Docs (Storybook) TeamCity build finished
Details
Examples (Storybook) TeamCity build finished
Details
HTML (Storybook) TeamCity build finished
Details
Lint (Storybook) TeamCity build finished
Details
Lint Warnings (Storybook) TeamCity build finished
Details
Marko (Storybook) TeamCity build finished
Details
Mithril (Storybook) TeamCity build finished
Details
Node Security No known vulnerabilities found
Details
Polymer (Storybook) TeamCity build finished
Details
React Native (Storybook) TeamCity build finished
Details
Riot (Storybook) TeamCity build finished
Details
Smoke tests (Storybook) TeamCity build finished
Details
Svelte (Storybook) TeamCity build finished
Details
Test (Storybook) TeamCity build finished
Details
Vue (Storybook) TeamCity build finished
Details
ci/chromatic 172 specs unchanged.
Details
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: cli Your tests passed on CircleCI!
Details
ci/circleci: coverage Your tests passed on CircleCI!
Details
ci/circleci: docs Your tests passed on CircleCI!
Details
ci/circleci: example-kitchen-sinks Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: react-native Your tests passed on CircleCI!
Details
ci/circleci: smoke-tests Your tests passed on CircleCI!
Details
ci/circleci: unit-test Your tests passed on CircleCI!
Details
deploy/netlify Deploy preview ready!
Details

@gabrielcsapo gabrielcsapo deleted the gabrielcsapo:storybook-emberjs branch Oct 3, 2018

@igor-dv igor-dv referenced this pull request Oct 8, 2018

Open

how add a new app? #4320

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