Can't bind future values outside of HTML tags
Rimmel has spent a great deal of effort focusing on the most advanced use cases for templates with async/observable parts and complex structures.
Some excessively "basic" use cases have been deprioritised. One is the case of a template containing no HTML tags that references any future (promise or observable) value.
The following doesn't work:
const deferredValue = Promise.resolve('world');
document.body.innerHTML = rml`
Hello, ${deferredValue}
`;
It works if it's wrapped in at least an HTML tag. A fix is required in the parser around the correspnding/relevant regular expression.
Link to reproduce
Start a new pull request in StackBlitz Codeflow.
Hi @dariomannu , I will take up this issue can you assign me under the hacktoberfest tag
Hi @dariomannu!!,
I see it was assigned a couple of weeks ago and wanted to check if it's still being worked on. If the issue is now available, I would be happy to take it up.
Hi @Pawankalyan2023 are you actively working on this issue or you'd rather pass it to @the-matrixneo? Thanks.
Yeah , I am working on this
Perfect, thanks, @Pawankalyan2023. It should be like a 1-2 liner fix plus test coverage, I believe. If you're stuck or anything's unclear, don't worry, we're here to help.
@dariomannu can I work on this issue?
Hi @yashraj4 I think @Pawankalyan2023 is not really working on this anymore, so you're welcome to take this over. Please give a shout if you find anything unclear or you're stuck. If you like Rimmel, feel free to leave a star to help others find it more easily 🔍
Do I need to add a test case in parser\parser.test.ts and/or add a relevant button in kitchen-sink\index.ts to test this?
Unit tests, yes, please :)
Kitchen sink is not necessary unless we feel this is an interesting case enough to keep there for playing/experimentation, manual tests...