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.

macroMaybeModifier needed?

See original GitHub issue

I just came across a use case where I wanted to use @embroider/macros to conditionally apply a modifier. As we are in element space, we cannot simply use {{#if}} here.

The same applied for setting attributes conditionally, but this is explicitly covered by macroMaybeAttrs. Do we eventually need an equivalent for this, macroMaybeModifier?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, Feb 15, 2021

As we are in element space, we cannot simply use {{#if}} here.

In Ember 3.25 and higher, you should be able to do:

<div {{(if something on) 'click' this.foo}}></div>
0reactions
simonihmigcommented, Mar 7, 2021

Oh, but I should add: maybe instead the solution is to make sure macroCondition works inside this position.

PR: #712

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to do modifier macros? : r/ffxiv - Reddit
You need three 1x12 setup by max level. At max level job kills range from 25-33. PLD actually has the most number of...
Read more >
What are the best ways to remap modifier keys? - UI and Macro
Basically, i want to change my modifier keys (shift, ctrl, and alt) to something more comfortable so I don't have to use my...
Read more >
Macro Modifier // Statamic 3 Docs
Macro is a very special modifier. It performs no modifications of its own, but rather lets you create reusable groups of modifiers and...
Read more >
c++ - Restoring access modifiers after a macro - Stack Overflow
Perhaps a public [virtual] "interface" base class that includes the required declarations would be a better option than a macro... There other ...
Read more >
Clickable macro with modifiers : need help - Wowhead
Maybe the mods need to be before the default actions so it can check for mods before deciding which ability must be cast....
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