Skip to content

Improve User tag snippet completion #784

@angelozerr

Description

@angelozerr

Take a sample with #form renarde user tag which have this content:

<form action="{it}" method="{method ?: 'POST'}" {#if class??}class="{class}"{/if} {#if id??}id="{id}"{/if}>
 {#authenticityToken/}
 {nested-content}
</form>

In a Qute template, when completion is opened it provide #form and when completion is applied it generates:

{#form /}

although #form expects some HTML content like <input, it should generate

{#form it }

{/form}

and better replace it with all uri, uriabs.

To do that we need to load the user tag content and

  • check if there is {nested-content}
  • check if there is {it}

Another improvement which should be nice is to provide completion for parameters declared in user tag. Given this completion:

{#form uri.Login.manualLogin() | }

{/form}

It should show

  • method
  • class
  • id

//cc @FroMage

Metadata

Metadata

Assignees

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions