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

NativeScript-Vue 3.0 Design Doc #1

Open
17 of 30 tasks
rigor789 opened this issue Feb 17, 2020 · 1 comment
Open
17 of 30 tasks

NativeScript-Vue 3.0 Design Doc #1

rigor789 opened this issue Feb 17, 2020 · 1 comment

Comments

@rigor789
Copy link
Owner

rigor789 commented Feb 17, 2020

NativeScript-Vue Next

Project structure: monorepo using Yarn Workspaces.

  • @nativescript-vue/compiler - template compiler based off of @vue/compiler-dom
  • @nativescript-vue/runtime - runtime based off of @vue/runtime-dom
  • nativescript-vue - package to house both compiler + runtime

         + ------------> ( @nativescript-vue/compiler )
         |
         +
( nativescript-vue )
         +
         |
         + ------------> ( @nativescript-vue/runtime )
         

Tooling to adopt:

  • TypeScript
  • Jest
  • Yarn Workspaces

Todos:

  • runtime
    • registry
      • clean up built-in element registration
      • figure out a clean way to allow mocking for testing
    • nodeOps
      • insert
      • remove
      • setText
      • setElementText (Seems to be used by Portals but not sure what's the difference from setText?)
      • parentNode
      • nextSibling (refactor to use children.indexof + 1)
      • setScopeId
    • patchProp. See patchProp function #5
  • compiler. See Compiler tasks #14
  • nativescript-vue
    • todo...
  • runtime components
    • Transition
    • TransitionGroup
    • ListView
    • v-template
    • ActionBar
    • android/ios
    • others if needed (frame, page, tabs)
  • runtime directives
    • vModel
    • [ ] vOn
    • vShow
  • runtime plugins/extensions
    • modals
    • navigation
@rigor789 rigor789 changed the title Design Doc NativeScript-Vue 3.0 Design Doc Feb 17, 2020
@rigor789
Copy link
Owner Author

rigor789 commented Feb 22, 2020

Idea: Let's implement wix/Detox tests for the built-in elements, where we automatically test they are working as intended. For example, the simplest ones would be:

  • Label
    • it displays text passed into the text property
    • it displays text passed as a direct child
    • it displays dynamically bound text in both versions above
    • FormattedString
      • it renders Span's
      • it displays dynamically bound spans in both syntaxes

There may be overlaps with things like Buttons, as they pretty much have the same tests as a Label, but that just makes our job easier.

I am thinking of making these into a custom .vue file that has the usual <template> <script> and an extra <tests> (or whatever makes sense for editors to propery highlight).

These would then be built by webpack into an app + a test suite dynamically.

Sample of my idea: https://github.com/rigor789/nativescript-vue-next/blob/master/tests/detox/Label.spec.vue

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

1 participant