Git Product home page Git Product logo

ninjascript's People

Contributors

hannahhoward avatar idahoev avatar nyarly 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ninjascript's Issues

Watermark should be renamed 'placeholder' to match HTML5 attribute

An input with an attribute of placeholder="whatever" will Do The Right Thing™ in modern browsers worth a damn. NinjaScript should respect that and let the browser do its thing when it can.

For older browsers that don't support the placeholder attribute, NinjaScript should do its jam like Watermark currently does.

With regards to detecting placeholder browser support, Mark Pilgrim supplies this code on the Dive Into HTML5 site. http://diveintohtml5.org/detect.html

function supports_input_placeholder() {
var i = document.createElement('input');
return 'placeholder' in i;
}

Also, placeholder/watermark should not be used in place of a label. Nor should it stomp on the label. Maybe if there is no placeholder attribute, but there is a label, then watermark/placeholder could use the label's text as the ghosted text in the input.

Logging config

WOuld be really nice to have a configuration that turned logging on and off.

makeHandlersRemove

A) WTF? Why is this here?

B) If it has a legit motivation, it needs to live in Behavior.base, I think, not EventScribe.

stopDefault behavior

stopDefault should return "false" (force not default) if it's set, but not "true" when it's false - if "andDoDefault", then examine the event record after return and see if it's "isDefaultPrevented"

Advanced optimization with CC

Right now, ADVANCED_OPTIMIZATION fails - looks like Sizzle is doing something that leads to a skew of property names (it looks like something about the Expr object). It'd be great to get AO to work because:

It's a lot more aggressive - much smaller result.

More important: the exported methods and objects would have to be explicitly listed, which makes the documentation process more straightforward.

Get report of all registered handlers by key

Feature request for useful debugging tool: ask NinjaScript to output all symbols for which there are registered handlers.

For example, if I have:

    Ninja.respondToJson({ alert: function(msg) { ..stuff ..},  notice: function(msg) { .. stuff .. }}) 

defined in one file, and

    Ninja.respondToJson({  recommendation: function(recco) {.. stuff ..} })

in a second file, it would be nice to have NS be able to say:

Registered JSON Handlers: 'alert', 'notice', 'recommendation'.

Consider migration wholesale to GCL

At least for the engine, it might be worthwhile to use GCL for most of the browser interaction we're looking for. Still torn about behaviors, but it probably wouldn't hurt to use that too.

Worst case, could use GCL base for modules etc instead of require.js

Tool packaging

Akin to behavior packaging: it'd be handy to be able to package a new Ninja.tool and have it used anywhere. Then all the existing tools get packaged, and anything not a behavior or a tool is made so that it doesn't depend on anything outside of NS. Result: much easier to use NS with frameworks other than jQuery.

Behavior: linked fields

It'd be nice to be able to have fields in a form be related: automatically update (or clear) results when they change. For instance:

[1] + [1] = [2] - changing the '1' might delete or update [2].

triggerOn replacement

triggerOn needs to be decomposed into:

submitParentOnSelect
hasPlaceholder for select nodes
removeRelated (to remove the submit button)
and submitAsAjax (exists)

jQuery .trigger data

jQuery allows clients to call a .trigger method on $() objects with ('event.type', {more: data}) - in which case, the event handler is expected to accept extra arguments.

NS should probably have some facility to handle this kind of binding? Or completely abandon jQuery.

Events generated for NS lifecycle

At least: element transformed (with start and end attrs, for when an element is completely replaced), event handled, json handled.

Revisit the behavior definition API

with Ninja.orders do we need to defer behavior defs?

If we do, ninja.does needs to do something about not being called as a constructor - fail, fix it, something.

Log transforms of elements

"Transforming element - "
Selector <> matched ...
Applying behavior transform, priority X

Names/selectors embedded in behaviors for logging?

Hangs Firefox and Chrome

Hangs on string 25:

return list.forEach(callback, thisArg)

and all I can do is close the page.

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.