Binaryify / OneDark-Pro

Atom's iconic One Dark theme for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme
MIT License
1.53k stars 290 forks source link

JS difference for namespaced classes #538

Open mcanepa opened 3 years ago

mcanepa commented 3 years ago

One one hand, there are differences between this theme and Atoms' (we previously agreed that they could be kind of different) but there also differences between the theme itself

Here's a sample image... js_atom_vs

I think that BaseObject shoud be yellowish, ALLCAPS redish and Some.Path.ToClass in line 23 redish as the declaration

As a bonus, constructor() and super() should be that two shades of blueish

What do you think?

mcanepa commented 3 years ago

This is the test file...

BaseObject.Some.Path.ToClass = {}
BaseObject.Some.Path.ALLCAPS = {}

BaseObject.Some.Path.ToClass = class extends SomeParentClass
{
    constructor(parameter)
    {
        super();

        this.param = parameter;

        var my_var = true;

        if($(parameter).hasClass("my_class"))
        {
            $("some_selector").data("my_data", 123);

            my_var = !my_var;
        }
    }
}

class MyClass extends BaseObject.Some.Path.ToClass
{
    constructor()
    {
        super("div");
    }
}

var objInstance = new MyClass();
Binaryify commented 3 years ago

how about this image

and I can't let Some.Path become redish because they had same scope image image constructor neither image image

andreyjamer commented 3 years ago

With this change chains of objects inside class became yellowish. For example: image Previously this was yellowish, _subscriptionDestroy$ was redish. The last items were blueish as it is right now. Now the whole chain is yellowish except the last item, so for long chains like environment.urls.backoffice.default it is too much yellow )

BTW, all items in environment.urls.backoffice.default were redish previously.