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.

Jump to code in mixins

See original GitHub issue

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

When editing a mixin, it’s frustrating not to be able to jump to code which is referenced within the require-config.js like it’s possible within the layout xml files.

var config = {
    config: {
        mixins: {
            'Magento_Checkout/js/view/shipping': {
                'MyPlugin_Checkout/js/Magento_Checkout/view/shipping-mixin': true
            },

Describe the solution you’d like (*)

When hitting F4 or CTRL + click on a line like 'MyPlugin_Checkout/js/Magento_Checkout/view/shipping-mixin' it would be ideal that the plugin would try to locate the the Plugin folder for MyPlugin, then go to the relative folder for frontend or adminhtml when the web folder then open the relative js/Magento_Checkout/view/shipping-mixin.js file. If it can’t be found in app/code it will check the vendor folder for the given plugin.

The same should occur for the parent module mixin that is referenced 'Magento_Checkout/js/view/shipping' so it becomes easy to jump from one to the other.

Describe alternatives you’ve considered

Javascript phpdoc automatic annotiation to make a @link to the given file when needed.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
doninAtwixcommented, Feb 1, 2022

@magento I am working on this

0reactions
tschallackacommented, Mar 24, 2022

Nice! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use Mixins in Sass and Pass Arguments – With Code ...
First we define a mixin using the @mixin at-rule. · Then we give it a name – choose whatever you think will fit...
Read more >
How to pass a code block to a function or mixin in Stylus
I want to convert the above code into Stylus, but my main problem so far as been how I pass a code block...
Read more >
4. Functions and Mixins - Jump Start Sass [Book] - O'Reilly
It's an ideal way to extract repeated pieces of code into a single reusable pattern. As a consequence, functions exist in almost all...
Read more >
Write composable, reusable Python classes using Mixins
We've seen how using Python mixins in our classes helps make our code more modular. The resulting code is shorter, simpler to understand...
Read more >
Mixins - The Modern JavaScript Tutorial
The simplest way to implement a mixin in JavaScript is to make an object with useful methods, so that we can easily merge...
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