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

Dojo Templating #525

Open
6 tasks
agubler opened this issue Sep 10, 2019 · 0 comments
Open
6 tasks

Dojo Templating #525

agubler opened this issue Sep 10, 2019 · 0 comments
Labels
area: core Core enhancement New feature or request next Issue/Pull Request for the next major version

Comments

@agubler
Copy link
Member

agubler commented Sep 10, 2019

Enhancement

Defining the view of Dojo widgets has two distinct approaches, using the functional API (v(), w()) and TSX. These approaches work well, however it would be nice if we could offer a templating syntax for users that are more familiar with writing HTML or for using existing HTML structures within a Dojo Application.

Proposal

Full reactive templating system for working with Dojo built on the existing VDOM rendering engine and middleware pattern. Supporting conditional logic such as if, loops and custom API injected via a templating middleware.

Example Template:

<d:template name="hello">
  <section class="root">
    <div>
      <article>
        <h2>Dojo Templating</h2>
        <div>{ $.widgetProperty }</div>
        <d:widget src="../Bar" />
      </article>
   </div>
  </section>
</d:template>

A proof of concept the demonstrates templating that could be possible with Dojo: https://codesandbox.io/s/my-first-blog-0dlvc

Changes Required

  • Dojo templating syntax design
  • Dojo templating implementation
  • CSS module and theming support
  • Typing support for templates
  • Build support for templates
  • Testing support for templates

Package Version: Dojo 7

@agubler agubler added area: core Core enhancement New feature or request next Issue/Pull Request for the next major version labels Sep 10, 2019
@agubler agubler mentioned this issue Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Core enhancement New feature or request next Issue/Pull Request for the next major version
Projects
None yet
Development

No branches or pull requests

1 participant