Comments (3)
Hi @TheFirstAvenger is the idea to implement something similar to page events? For eg:
page =
Pages.create_page!(%{
path: "home",
site: "my_site",
layout_id: layout.id,
template: """
<main>
<%= hello_upcase(%{name: "something"}) %>
</main>
"""
})
Pages.create_page_helper!(%{
page_id: page.id,
helper_name: "hello_upcase",
code: """
String.upcase(args.name)
"""
})
And then inject def hello_upcase(args)
in the generated LiveView for the end user. I'm just not sure about args
, we need a way to make sure we're expanding all args passed from the template so I'm thinking we can force it to be a map to mimic how assigns works.
Does it make sense?
from beacon.
@leandrocp Yeah, that is exactly the idea. We could let them specify the arg string so they can build it how they want it (e.g. with pattern matching).
from beacon.
Gotcha I'm gonna work on it.
from beacon.
Related Issues (20)
- Core & Admin -> Webfiles and Metatags: Upload and serve avatar images HOT 1
- Admin -> Webfiles and Metatags: Structured Schema UI builder HOT 1
- Core -> General Improvements: `generate_path` lifecycle
- Core -> Components and Pages: Component editing
- Maybe interesting for front end generation? https://github.com/teleporthq/teleport-code-generators HOT 1
- Core -> General Improvements: Supporting OTP 26 and Elixir 1.15
- Scoping: Q3
- Scoping: Q4
- Admin -> Editor: Button to generate the path
- Core -> Components and Pages: Atom feed
- Admin -> Components and Pages: Layouts
- Admin -> Components and Pages: Snippets
- Admin -> Editor: Editing URL after publishing
- Admin -> Media Library Page: Upload form UX adjustments
- Add support for user-defined client JS hooks HOT 1
- Admin -> General Improvements: a/b/c/d/e/f/etc... testing spec HOT 4
- Core -> General Improvements: Content API
- Proposal: Plausible integration as a plugin HOT 1
- Add `after_render_template` lifecycle stage HOT 1
- Page Builder -> HEEx support on JSON API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beacon.