You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MF2 supports a safe markup syntax and Localize.Message supports parsing that syntax. However at the moment, the markup AST is silently discarded when formatting a message (as happens when you use Gettext).
There is a function called Localize.Message.format_to_safe_list/3 that will emit a list of tokens with the markup AST as well. That should be a good platform for building integration into HEEX and Liveview.
The overall objective, in my mind, is to make adding MF2 messages with markup as natural as any other component in the live view world. Still have to pass bindings somehow - and it would be nice if the bindings could be auto-resolved from assigns so that the component is clean and simple and easy to read.
Then we would benefit from a markup formatter extension that formats the message to make it "pretty". There is already a tree-sitter grammar for MF2 (untested) and some editor extensions which should be able to be leveraged for that purpose.
I'm not a designer, I have very limited experience with HEEX or Liveview. Collaborators are very welcome to help get this done. Even if it's as simple as "to this, then that, make it look like ...., I want a component to ...." - thats all good.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
MF2 supports a safe markup syntax and
Localize.Messagesupports parsing that syntax. However at the moment, the markup AST is silently discarded when formatting a message (as happens when you use Gettext).There is a function called Localize.Message.format_to_safe_list/3 that will emit a list of tokens with the markup AST as well. That should be a good platform for building integration into HEEX and Liveview.
The overall objective, in my mind, is to make adding MF2 messages with markup as natural as any other component in the live view world. Still have to pass bindings somehow - and it would be nice if the bindings could be auto-resolved from assigns so that the component is clean and simple and easy to read.
Then we would benefit from a markup formatter extension that formats the message to make it "pretty". There is already a tree-sitter grammar for MF2 (untested) and some editor extensions which should be able to be leveraged for that purpose.
I'm not a designer, I have very limited experience with HEEX or Liveview. Collaborators are very welcome to help get this done. Even if it's as simple as "to this, then that, make it look like ...., I want a component to ...." - thats all good.
All reactions