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

Angle Bracket example in readme does not work #453

Closed
ryanlabouve opened this issue Mar 8, 2019 · 3 comments
Closed

Angle Bracket example in readme does not work #453

ryanlabouve opened this issue Mar 8, 2019 · 3 comments

Comments

@ryanlabouve
Copy link
Contributor

The example of using this component provided in the readme does not work.

(I'm happy to help either address this in docs or troubleshoot why it's not working.)

Example from the readme that doesn't work:

<h1>Angle Bracket:</h1>
<BasicDropdown as |dd|>
  <dd.Trigger>Click me</dd.Trigger>
  <dd.Content>Content of the trigger</dd.Content>
</BasicDropdown>

Here is an example that works with moustache hashtag components (not sure what the proper name for these is):

<h1>Moustache Hashtag:</h1>
{{#basic-dropdown as |dd|}}
  {{#dd.trigger}}Click me{{/dd.trigger}}
  {{#dd.content}}Content of the trigger{{/dd.content}}
{{/basic-dropdown}}

Here's a screenshot where you can see the Angle Bracket invocation is not working and the Moustache Hashtag is:

burnerbdd 2019-03-08 09-41-43

I tried to reproduce this in a twiddle, but the site had some issues loading with relevant versions of ember-source and ember-basic-dropdown. Here's a repo I made though: ryanlabouve/basic-dropdown-angle-bracket-demo@809e62c

DEBUG: ------------------------------- index.js:185
DEBUG: Ember      : 3.8.0 index.js:185
DEBUG: Ember Data : 3.7.0 index.js:185
DEBUG: jQuery     : 3.3.1 index.js:185
DEBUG: -------------------------------
@cibernox
Copy link
Owner

cibernox commented Mar 8, 2019

@ryanlabouve sorry for the inconvenience. The readme is for the master branch, which is now part of the 2.0 alpha versions. If you're installed the latest EBD 1.X it doesn't work indeed.

For now I'd recommend using curly braces syntax. I hope to finish the refactor once emberjs/rfcs#435 is implemented. Without it element modifiers are in a weird uncanny valley that are not truly usable.

/cc @rwjblue @pzuraq

@ryanlabouve
Copy link
Contributor Author

Ah, that makes sense.

If it's worth it I've seen other project do something like this to help folks that would assume that README.md is the best source of current documentation:

If you're viewing this at https://github.com/collectiveidea/delayed_job, you're reading the documentation for the master branch. View documentation for the latest release (4.1.5).

(example via https://github.com/collectiveidea/delayed_job/blob/master/README.md)

I'll close this issue for now.

@sohara
Copy link

sohara commented Mar 29, 2019

Personally I don't think this issue should be closed. If a user follows the instructions for the docs site they will simply have a situation where nothing renders, as described in the issue.

@cibernox I wonder if you would consider either publishing the docs that correspond to the currently (non-alpha) released version or alternately updating the installation instructions on master to be something like ember install [email protected] so that the users who follow along have a version installed that corresponds to the rest of published docs?

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

No branches or pull requests

3 participants