Skip to content

Handlebars README and tooltip incorrectly state the available helpers #39573

@sfirke

Description

@sfirke

Bug description

What's wrong in the "docs" + UI

The misleading documentation is at: https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-handlebars/README.md and in the UI, seen in the screenshot from this PR: #31998 (comment)

It lists only four helpers. But Superset imports a bunch more from just-handlebars-helpers. In particular I used eq extensively today. I think this matters because when I had Claude Code write code for the Handlebars Template, it avoided eq because of this README.md. But then I had it check the codebase, it found that it can use eq and others.

Some AI opinion (all the rest of this is me, a human)

Claude notes in diagnosing this issue:

🤖: PR #20648 (merged July 2022) added the just-handlebars-helpers module to the plugin. Then PR #21143 partially reverted it away from just-handlebars-helpers but registered helpers from [math, html, strings, conditionals] modules inline. The just-handlebars-helpers library includes eq (strict equality ===), eqw(weak equality==), neq, neqw, lt, lte, gt, gte, not, ifx, and, or, coalesce, and includes` among others.

Proposed fix

  • This does not belong in a README.md buried deep in the repo. Realistically no one is going to find it there (except Claude, I guess). Let's move guidance about the Handlebars chart out to the user-facing section of the docs.
  • Update the docs to describe all of the helpers available, at whatever level of detail we think is appropriate.
  • Then remove the info tooltip? Or change it to be a link out to the new Handlebars Chart docs page you make

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

Not applicable

Node version

Not applicable

Browser

Not applicable

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Labels

docNamespace | Anything related to documentationdoc:userUser / Superset documentationgood first issueGood first issues for new contributorsviz:charts:handlebars

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions