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

feature: "onView" middleware handler #890

Open
jonschlinkert opened this issue Aug 10, 2016 · 2 comments
Open

feature: "onView" middleware handler #890

jonschlinkert opened this issue Aug 10, 2016 · 2 comments
Labels

Comments

@jonschlinkert
Copy link
Member

Since .onLoad is triggered when a view is "loaded" onto a collection, we don't currently have a catchall middleware handler that would be triggered when a collectionless view is created.

I propose we call this onView, but suggestions are welcome (fwiw, onCreate isn't good since it would cause ambiguity with the .create method)

@assemblebot
Copy link

@jonschlinkert Thanks for the issue! If you're reporting a bug, please be sure to include:

  • The version of assemble you are using.
  • Your assemblefile.js (This can be in a gist)
  • The commandline output. (Screenshot or gist is fine)
  • What you expected to happen instead.

If your issue is related to one of the following, please open an issue there:

  • grunt-assemble Issues with using assemble in grunt or the grunt-assemble library.
  • handlebars-helpers Issues with using handlebars helpers from the handlebars-helpers library.

@itlackey
Copy link

My $0.02 would be onViewCreate but I like long descriptive naming. ;)

And this would require many changes so probably not a good idea (and my .Net may be showing here), I personally prefer including tense with handlers / events (ie. onLoading, onLoaded, onViewCreating, onViewCreated). Again, just throwing it out there and realize that may be a .Net convention not used in the node world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants