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

Improve documentation & searchability for v-on's .native modifier #979

Closed
alexsasharegan opened this issue Jun 30, 2017 · 3 comments
Closed

Comments

@alexsasharegan
Copy link
Contributor

What problem does this feature solve?

TL;DR;

  • Makes understanding native event binding on custom Vue components more accessible.
  • Also reduces downstream issue load on component libraries.

As component libraries of custom components become more prevalent, authors have one of two choice: re-emit all/common events on the component, or educate users to use native binding modifier. I personally think that the .native modifier should become the component lib standard usage pattern because it reduces code size and the mental overhead of manually re-emitting all necessary events on a custom component.

As a contributor to the bootstrap-vue component library, I know we get a decent amount of issues around this. We educate devs about the amazingly useful .native modifier, but ultimately are burdened by the limited searchability of current documentation.

What does the proposed API look like?

The documentation on this is already sufficient, but it is not prominent. I know about this modifier, yet I still have a hard time finding it in the documentation (or google). I think the common use-case would lead a dev to search something like "listen to event on component" or "v-on not working on vue component". Having some valuable results turn up would be a big win for DX.

@chrisvfritz
Copy link
Contributor

Thanks for bringing this up! I'll start by seeing what currently comes up for common searches and trying to add more hints and links to where the feature is documented.

On a related note, you may be interested in this discussion on the core Vue repo.

@alexsasharegan
Copy link
Contributor Author

That discussion is very important! Thank you so much for the heads up. I'll clue in the bootstrap-vue team so they can weigh in any important thoughts from our experience.

@chrisvfritz
Copy link
Contributor

chrisvfritz commented Jul 11, 2017

The API was just improved with vuejs/vue@6118759 and these features will be documented as part of the next release, so I think this is resolved now. 🙂

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

2 participants