Discussion Summary: Is it just me, or is Hyperscript hideous?
The discussion revolves around the difficulties and frustrations of working with Hyperscript, a templating language used in Discourse. edL expresses their dislike for Hyperscript, citing issues with code portability, syntax highlighting, and code completion. awesomerobot agrees, sharing their experience of using virtual-dom/virtual-hyperscript for performance improvements.
Alternatives and Solutions
justin suggests using raw HTML via widgets as an alternative, providing an example code snippet. edL appreciates the tip and explores options for converting HTML to Hyperscript.
joffreyjaffeux mentions ongoing brainstorming to rationalize templating systems, with a goal of using full Handlebars (HBS) templates. edL cautions about the complexity of transitioning existing code, suggesting deprecation rather than immediate removal of Hyperscript support.
Technical Discussions and Examples
merefield shares their experience with using templates within widgets, highlighting limitations with helper support. joffreyjaffeux provides a detailed example of using HBS templates with widgets, and david clarifies the importance of defining widgets in separate modules.
joffreyjaffeux showcases a component using widgets and HBS, and merefield inquires about using existing helpers in widget templates. joffreyjaffeux explains that some helpers are available, and PRs for adding more are welcome.
Overall, the discussion highlights the challenges of working with Hyperscript and explores alternatives, solutions, and technical examples for improving templating in Discourse.