-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
CLI: Add Ember stories and components #12304
Conversation
Just looked roughly at the code. The code you used is one of the oldest ones in ember nowadays and nobody would do that any more. Please search for "Ember Octane" or go through the super rentals tutorial, you wanna use glimmer components with regular javascript classes. Please don't prefix components with Also there is this one PR to link here: chromaui/learnstorybook.com#306 which kinda does something similar to here. I think this enough for you to move into the right direction. Sorry if this is not more and precise. Atm my time just allows you to point at resources. |
lib/cli/src/frameworks/ember/app/templates/components/storybook-button.hbs
Outdated
Show resolved
Hide resolved
lib/cli/src/frameworks/ember/app/templates/components/storybook-button.hbs
Outdated
Show resolved
Hide resolved
lib/cli/src/frameworks/ember/app/templates/components/storybook-button.hbs
Outdated
Show resolved
Hide resolved
If you need to, I will be happy to help you on this merge request, either by doing the requested changes or while pairing on it! Let me know :) |
Hey ! Sorry, quite busy at work at the moment, if you can help that would be awesome !! Feel free to commit on this branch, I'm available on Discord if needed :) I can't say when I'll be able to spend some time on this :( |
Ok I'll try to work on this by the end of next week :) I'll keep you posted |
FYI I've started to work on this I should be able to have a PR ready by Friday hopefully |
Hey @tooppaaa, I've the PR in draft, how can I test/see that I didn't break anything of thoses files has it's not related to the |
@dbendaou Hey ! Thanks for your PR.
That will build your CLI and use it to create a sample project in a siblings folder to your storybook folder. The idea is for you to initialize the project using this command, do your changes and test them using cypress with re-running the above command, it's smart enough to skip initialization. Last bit is for you to check that the components are good looking :) |
Adding a comment here so stalebot stops bothering. Any updates on this? |
Yes I'll finish my MR to update this one in the following days I didn't have any time so far unfortunately |
I know the feeling @dbendaou... Thanks for taking this one ! |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Working on this today @dbendaou! |
45b6570
to
358c3cd
Compare
…and cleans up addon examples.
@dbendaou updated the example app and the shipped default code. How do I test the changes located in cli/src/frameworks? Running;
fails with a typescript error. |
"storybook": "yarn build && start-storybook -p 9009 -s ember-output", | ||
"storybook-prebuild": "yarn build && shx cp -r public/* ember-output", | ||
"storybook:dev": "yarn dev & start-storybook -p 9009 -s ember-output" | ||
"storybook:dev": "echo 'run `yarn dev` in another terminal' && start-storybook -p 9009 -s ember-output" |
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.
Should be first ember to start then running start-storybook
in another terminal WDYT? To avoid concurrency issues btw ember not ready and storybook consuming ember output
@gabrielcsapo I didn't achieve to run e2e neither with
Maybe @tooppaaa could help on this |
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.
what's the difference between these folders:
lib/cli/src/frameworks/ember
examples/ember-cli
I only see the PR diff, haven't looked deeply into storybook code for this. Just wondering why there are two similar things in two different folders?
/** | ||
* The hex-formatted color code for the background. | ||
* @argument backgroundColor | ||
* @type {string} | ||
* @default null | ||
*/ | ||
backgroundColor: null, | ||
backgroundColor = null; | ||
|
||
/** | ||
* The hex-formatted color code for the subtitle. | ||
* @argument subTitleColor | ||
* @type {string} | ||
*/ | ||
subTitleColor: null, | ||
subTitleColor = null; | ||
|
||
/** | ||
* The title of the banner. | ||
* @argument title | ||
* @type {string} | ||
*/ | ||
title: null, | ||
title = null; | ||
|
||
/** | ||
* The subtitle of the banner. | ||
* @argument subtitle | ||
* @type {string} | ||
*/ | ||
subtitle: null, | ||
}); | ||
subtitle = null; |
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 is no longer valid code for glimmer components. In typescript you would put this into an WelcomeBannerArgs
interface and then do export default class WelcomeBanner extends Component<WelcomeBannerArgs>
.
}, | ||
"dependencies": { | ||
"@glimmer/component": "^1.0.0", |
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.
"@glimmer/component": "^1.0.0", | |
"@glimmer/component": "^1.0.4", |
as of today we are at 1.0.4
subtitle=subtitle | ||
click=(action onClick) | ||
}} | ||
<WelcomeBanner |
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.
shall we add a "deprecated" text here? With a link to use controls over knobs?
|
@gabrielcsapo @dbendaou, the issue in the e2e is related to yarn2. I'll follow up with our expert: @gaetanmaisse
|
@tooppaaa I've fixed the lockfile:
|
Will update this this weekend. Sorry for the lag, had work priorities. |
Hey @gabrielcsapo! I was wondering if you are still planning to continue with the PR? |
Thanks everyone. I am closing this as it has been stale for some time. If you would like to further pursue this, just reopen the PR. |
Issue: #12173
What I did
How to test
I only did not manage to have components using the .css, I include them directly in *.stories.js with a comment
I have a feeling this is a fragile implementation as we rely on a folder structure with ember-cli, it may be acceptable.
@gossi I'll do whatever feedback you might have on this :)