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

feat(auto-complete): add from-view / to-view to data binding suggests #53

Closed
eriklieben opened this issue Oct 7, 2017 · 5 comments
Closed

Comments

@eriklieben
Copy link
Contributor

  • from-view bindings - This is a one-way binding that only pushes from the view to the model. To create symmetry, we've also added the to-view binding as an alias to our standard one-time binding.

Add from-view binding to data binding suggestions.

Add config option to configure the usage of:

  • from-view / to-view / one-time
  • from-view / to-view
  • from-view / one-time

And figure out what would be the best default setting

@eriklieben
Copy link
Contributor Author

eriklieben commented Dec 29, 2017

Changed it to a configurable setting for the user, which can be set for all or per workspace/project (default functionality of VSCode).

see: https://youtu.be/_zziyhlPwfs

Remaining question to answer: What would be a proper default setting for this configuration?

  1. add all (bind / one-way / two-way / one-time / to-view / from-view)
    feels like it adds a lot of noise to the list and might be confusing for new users because one-way and to-view are the same, which one should they use?

  2. bind / one-way / two-way / one-time and add new from-view
    Adds the most recent addition (from-view) to the data binding set. It allows a user that is used to one-way to adopt the change without thinking twice.

  3. bind / to-view / from-view / two-way / one-time
    removes the one-way by default and advises you to use to-view from-view, might not have a good adoption/ acceptance if you have a code base containing a lot of one-way data binding commands.

I currently think 2 would for now be the best option as a default.

@bigopon
Copy link
Member

bigopon commented Dec 29, 2017

If it's easy to make the list configurable, then I think it should be 2 with an option to be either 1/ 3. Otherwise it's should be 3. one-way is now deprecated, prolonging it usage would conflict with intention in the core.

@eriklieben
Copy link
Contributor Author

Thanks!

An idea based on your suggestion; this might be a good option for now:

one-way-deprecated

It's a bit more cloudy in the autocomplete, but the user can remove one-way in the configuration settings. Existing users can continue using one-way for now but get a signal that it is deprecated, new users/users starting a new solution will know that they need to use to-view instead.

Then at a later moment in time, we can remove one-way as a default option (and users need to manually add it to the configuration if they still want to use it).

@bigopon
Copy link
Member

bigopon commented Dec 30, 2017

That's awesome. Won't alienate existing user, and promote to-view 👍

@zewa666
Copy link
Member

zewa666 commented Dec 30, 2017

Lol I didnt get that either but the deprication warning does a perfect job 👍

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

No branches or pull requests

3 participants