[PR #95] [MERGED] Namespaced template functions #42

Closed
opened 2025-12-29 07:19:02 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/95
Author: @gschier
Created: 9/18/2024
Status: Merged
Merged: 9/18/2024
Merged by: @gschier

Base: masterHead: namespaced-autocomplete


📝 Commits (3)

  • 3f516ef Support namespaced template functions in parser and autocomplete
  • 9f5f53a Remove commented code
  • 92d11d4 Remove duplicate var

📊 Changes

5 files changed (+98 additions, -26 deletions)

View changed files

📝 src-tauri/yaak_templates/src/parser.rs (+44 -1)
📝 src-web/components/core/Editor/Editor.css (+5 -4)
📝 src-web/components/core/Editor/twig/completion.ts (+39 -16)
📝 src-web/components/core/Editor/twig/templateTags.ts (+9 -5)
📝 src-web/hooks/useRenderTemplate.ts (+1 -0)

📄 Description

This PR adds support for template tags with multi-level APIs like Faker (eg. faker.animal.dog().

  • Update template parser to handle namespaced function names
  • Update Codemirror completion logic to handle namespace segments

https://github.com/user-attachments/assets/38eb9c79-1d84-4ed2-ad82-68eacab2c63d


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/95 **Author:** [@gschier](https://github.com/gschier) **Created:** 9/18/2024 **Status:** ✅ Merged **Merged:** 9/18/2024 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `master` ← **Head:** `namespaced-autocomplete` --- ### 📝 Commits (3) - [`3f516ef`](https://github.com/mountain-loop/yaak/commit/3f516ef012317845ecc3c82bab6e30c36ff44b99) Support namespaced template functions in parser and autocomplete - [`9f5f53a`](https://github.com/mountain-loop/yaak/commit/9f5f53a71cf5c038c70ca4f749bfc21a3a4f4c66) Remove commented code - [`92d11d4`](https://github.com/mountain-loop/yaak/commit/92d11d4d6132e55921dc34879a165ec7a6bdd27b) Remove duplicate var ### 📊 Changes **5 files changed** (+98 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/yaak_templates/src/parser.rs` (+44 -1) 📝 `src-web/components/core/Editor/Editor.css` (+5 -4) 📝 `src-web/components/core/Editor/twig/completion.ts` (+39 -16) 📝 `src-web/components/core/Editor/twig/templateTags.ts` (+9 -5) 📝 `src-web/hooks/useRenderTemplate.ts` (+1 -0) </details> ### 📄 Description This PR adds support for template tags with multi-level APIs like Faker (eg. `faker.animal.dog()`. - [x] Update template parser to handle namespaced function names - [x] Update Codemirror completion logic to handle namespace segments https://github.com/user-attachments/assets/38eb9c79-1d84-4ed2-ad82-68eacab2c63d --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 07:19:02 +01:00
adam closed this issue 2025-12-29 07:19:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/yaak#42