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

Updates to the cheat sheet for the Octane launch #19

Merged
merged 11 commits into from
Dec 8, 2019
Merged

Conversation

jenweber
Copy link
Collaborator

@jenweber jenweber commented Dec 4, 2019

Closes #18

Please let me know if anything is missing or confusing! The best way to review this is to look at the screenshot below or run this app locally.

Changed:

  • replaced Avatar references 😭
  • Moved "default properties" into the Component Properties section
  • Replaced "Automation" links that went to codemods with links to the upgrade guide instead.

Added

  • Section on mixins
  • Section on generating element ids
  • Link to the upgrade guides in the intro text
  • Section on @model
  • Section on component generators
  • section on template co-location
  • separate section on get and set
  • section on DDAU

@@ -360,6 +391,45 @@ <h4>Octane</h4>
</div>
</section>

<section aria-labelledby="section-default-args">
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This section is just moved from its previous (incorrect) location under Templates

@jenweber
Copy link
Collaborator Author

jenweber commented Dec 4, 2019

Screenshot_2019-12-03 Ember js Classic vs Octane a cheat sheet(1)

<MyComponent @answer=42 />

Choose a reason for hiding this comment

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

This should be @answer={{42}}, right? at least that's what is suggested in ember-template-lint:

Attribute [attribute] should be either quoted or wrapped in mustaches

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, thank you!

@MarcoUmpierrez
Copy link

Also:

 @action
  helloWorld() {
    console.log('Hello, world!');
  }

  @action
  saySomethingElse(message) {
    console.log(message);
  }

these don't need the @action decorator because they aren't using the context of the component (as far as I know).

@pzuraq
Copy link

pzuraq commented Dec 6, 2019

@MarcoUmpierrez it's generally best practice to mark methods used in templates with @action since they will likely use this at some point. I think it's better to keep the @action decorator.

@jenweber
Copy link
Collaborator Author

jenweber commented Dec 8, 2019

Hello everyone, thank you so much for the reviews! If you can think of anything else that will improve this cheat sheet, let me know :)

@jenweber jenweber merged commit 04e3b08 into master Dec 8, 2019
@ijlee2 ijlee2 deleted the octane-launch branch June 21, 2020 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Final cheat sheet updates for Octane
4 participants