question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add option to expand template tags in plugins and UI when exporting

See original GitHub issue

Is your feature request related to a problem? Please describe.

Template tags are not been expanded when exporting data, I need it the most in a plugin (https://insomnia.rest/plugins/insomnia-plugin-documenter) when using context.data.export.insomnia or context.data.export.har and also it will be nice to have in the UI export too.

Describe the solution you’d like

For the plugin system, there can be a boolean option to enable expanding template tags before exporting so developers can do something like:

const data = await context.data.export.insomnia({
  workspace,
  format: 'json',
  includePrivate: false,
  expandTemplateTags: true,
})

And for the UI, it can simply be a checkbox when exporting.

Describe alternatives you’ve considered

I feel the above solution is the simplest we can ever get.

Additional context

Screenshot from 2020-10-05 12-37-58

This is what is currently happening when exporting with template tags and it doesn’t look good at all.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
nijikokuncommented, Oct 6, 2020

Ah, I understand now, by expansion you mean evaluate? So on export the evaluated result replaces the template tag expression? This definitely could be a good feature 👍

1reaction
develohpandacommented, Oct 6, 2020

Interesting, I can totally see the use case for it. Sometimes template tag expansion can also send requests, which I suppose is okay, but something to keep in mind. Provided expansion is added, perhaps you could prompt for the user to check/uncheck the option through your plugin (using a modal, for instance).

I’m not sure off the top of my head how tricky it may be to add expansion, though. I do not think it would be trivial.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Export WordPress Categories and Tags - WP All Import
To export WordPress categories and tags, go to WP All Export › New Export and select the type of taxonomies to export. Then,...
Read more >
Creating new themes using the Site Editor
An alternative to creating themes from scratch using code is to make updates to an existing theme in the Site Editor and export...
Read more >
Using Templates - OpenAPI Generator
OpenAPI Generator applies user-defined templates via options: CLI: -t/--template CLI options; Maven Plugin: templateDirectory ...
Read more >
Export plugin | Docs - TinyMCE
From the File menu, click Export and select PDF. · Click the Export toolbar button ( Export icon: A page with an arrow...
Read more >
Custom templates quick start guide | Google Tag Manager ...
On this page · The Template Editor · Create your first custom tag template · Use your new tag · Create your first...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found