Code Monkey home page Code Monkey logo

ember-hook's People

Contributors

baukereg avatar bl4ckm0r3 avatar briarsweetbriar avatar ember-tomster avatar foo-pzu avatar ianstarz avatar jasonmit avatar job13er avatar juwara0 avatar melissaroman avatar null-null-null avatar pzuraq avatar twokul avatar yethon avatar zhujy8833 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ember-hook's Issues

hook=(hook 'a' b='c') works, not documented

The README talks about two ways of adding hooks:

{{!-- for elements, use the `hook` helper --}}
<div data-test={{hook 'a' b='c'}}>

{{!-- for components, use the `hook` and `hookQualifiers` attributes --}}
{{my-component
  hook='a'
  hookQualifiers=(hash b='c')
}}

This also works, but is not documented:

{{my-component hook=(hook 'a' b='c')}}

It adds an additional &^%^& to the end:

<div class='my-component data-test='a&^%^&b=c&^%^&&^%^&'>

but the hook and $hook test helpers don't seem to care about that.

If this is something we should expect to work, let's document and test it. If it's not supposed to work, perhaps we should assert that the hook attribute's value doesn't itself contain &^%^&.

Broken with ember 2.8 stable

You cannot use attributeBindings on tagless components, which this reopens component and therefore does if you use any tagless components.

My solution only works in > 2.0.0 so I need to explore other options..

attributeBindings on tag-less component

I've been using ember-hook successfully, but today I tried installing ember-attacher and as soon as I add a tooltip to the page, I get an error message in the console:
You cannot use attributeBindings on a tag-less component :ember-popper

Looking at the ember-popper component, it has a tagName of '' (empty-string) so it makes sense this error is thrown. However, is there any workaround for this scenario? The ember-popper component has an elementId, so the hooked mixin tries to apply the binding

Proposal: Add the "development" environment to the default enabled state

Issue:

Currently, the default enabled state of ember-hook is when the environment is set to "test" which works fine if one is running ember test or ember test --server.

If one is running ember serve and navigating to http://localhost:4200/tests then the environment is "development" and ember-hook is not enabled by default and requires the environments to be set.

emberHook: {
  enabled: environment === 'development' || environment === 'test'
},

Request for Change:

Have ember-hook recognize both the "test" and "development" environments as defaults.

possible breaking version change and documentation for usage with {{input}} and {{textarea}}

Hi,
I've been using ember-hook 1.3.1 with {{input}} helpers by following
http://emberjs.com/api/classes/Ember.Templates.helpers.html#toc_extending-code-ember-textfield-code,
i.e. doing

Ember.TextField.reopen({
  attributeBindings: ['data-test'],
});

in an initializer, and then doing {{input data-helper=(hook "myTextField")}} in my templates.

This does not work in 1.3.2 any longer, so maybe the version bump should indicate a breaking change (i.e. version 2.0.0)?

The workaround that is maybe worth documenting in your README is now to simply use {{input hook=(hook "myTextField")}} in templates without any need to reopen the Ember.TextField component.

Use `hook` instead of `testHook` for components?

Currently, we bind data-test to a component's testHook property. This runs counter to our helper method, which is simply named hook. Perhaps we should have a consistent name hook throughout?

On the other hand, I'm worried about using such a generic property name. There's a greater chance that it'll conflict with other addons or pre-existing apps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.