@ helper's don't work
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 461
- PR merge metrics
- No merged PRs in 30d
Description
Is this nested structure supposed to work?
feed.dust
```
{#activities}
{@select key=category}
{@eq value="event"}{>"views/snapshot/event"/}{/eq}
{/select}
{/activities}
```
event.dust
```
{@gt key=counter value="1" type="number"}{strings.last_time} {/gt}{formatted_datetime}
```
Inside the partial `event` none of the @ helpers function correctly. If I output {counter} or do a context dump the correct value appears. In case it was a type issue I added a string property with a static value and did an @eq test on it which also failed to produce output. {:else} blocks are also not displayed it's as if the entire condition is stripped somehow.
Is this a bug? If I change the @select in the parent view to @eq checks the @ helpers inside `event` do function as you'd expect them to. The reason it's an @select is because there are about 10 different views depending on the value of category.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the nested @select in feed.dust, the event partial in event.dust, and the comparison where direct @eq checks work. Compare helper and {:else} behavior inside the partial with the parent view, using the shown counter and static string cases. Done means helpers and else blocks render correctly when the partial is selected through @select, with tests covering the nested structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100