Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments are displayed with a different indentation #100

Closed
luruke opened this issue Apr 5, 2019 · 13 comments · Fixed by #104
Closed

Comments are displayed with a different indentation #100

luruke opened this issue Apr 5, 2019 · 13 comments · Fixed by #104
Assignees
Labels

Comments

@luruke
Copy link
Contributor

luruke commented Apr 5, 2019

Hi there!

When I inspect or edit the following shader:

    precision highp float;
    
    uniform vec3 color; // ms({ value: '#ff0000' })
    uniform float brightness; // ms({ value: 0, range: [0, 0.5], step: 0.1 })
    uniform vec2 dummyValue; // ms({ value: [1024, 768], range: [[0, 2000], [0, 1500]] })
    uniform bool visible; // ms({ value: 1, name: 'Visibility' })
    uniform int test; // ms({ value: 0 })

    void main() {
      gl_FragColor = vec4(color + brightness, 1.0);
    }

is displayed like this:

Screen Shot 2019-04-05 at 11 56 00

and by consequence, after edited, the shader is broken.

@luruke
Copy link
Contributor Author

luruke commented Apr 5, 2019

I guess the problem it's here?

I guess the identation should be avoided if it's a comment

@sebavan
Copy link
Member

sebavan commented Apr 5, 2019

ohhhhh you are totally right, Good catch :-)

I will fix it ASAP.

@sebavan sebavan self-assigned this Apr 5, 2019
@sebavan sebavan added the bug label Apr 5, 2019
@luruke
Copy link
Contributor Author

luruke commented Apr 5, 2019

@sebavan , thanks for the quick reply...who ever thought to put curly brackets in comments, right? 😅

@sebavan
Copy link
Member

sebavan commented Apr 5, 2019

Lol, I have to admit I did not hit this one so far :-)

@sebavan
Copy link
Member

sebavan commented Apr 5, 2019

Do you have a live URL I could validate the fix on ?

@sebavan sebavan closed this as completed in 98d4d62 Apr 5, 2019
@luruke
Copy link
Contributor Author

luruke commented Apr 7, 2019

Hey @sebavan , much better, but comments goes on a new line:
Screen Shot 2019-04-07 at 11 43 11

I do not have a live link..but you can try it on this repo:

git clone git@github.com:luruke/magicshader.git
cd magicshader
npm install
npm run dev

Would it be possible to keep them on the same line as the original shader source?

@sebavan
Copy link
Member

sebavan commented Apr 8, 2019

I can repro locally, do you have a strong deadline on this one ?

It sounds a bit lower priority as it does not break the full edition, and I am trying atm to move the front end to React to ease the contribution. Is a fix by end of week OK ?

@sebavan sebavan reopened this Apr 8, 2019
@luruke
Copy link
Contributor Author

luruke commented Apr 8, 2019

Hey @sebavan , no worries, there is no deadline 👍😊

@sebavan
Copy link
Member

sebavan commented Apr 8, 2019

Sweeet I will redeploy at the end of the week then.

@luruke
Copy link
Contributor Author

luruke commented Apr 15, 2019

Hi @sebavan, Is there any news on this?
Can I help you somehow?

Cheers!

@sebavan
Copy link
Member

sebavan commented Apr 15, 2019

Yup the migration to React is delaying me a bit, but if you want you can definitely help by taking a look at the beautify method :-) cause I won t be able to work on it before at least another week

@luruke
Copy link
Contributor Author

luruke commented Apr 15, 2019

@sebavan ok, thanks. I'll see If I can do a PR :)

@sebavan
Copy link
Member

sebavan commented Apr 15, 2019

Thanks a ton

luruke pushed a commit to luruke/Spector.js that referenced this issue Apr 16, 2019
sebavan added a commit that referenced this issue Apr 22, 2019
Keep comments on the same line when indenting. (trying to fix #100)
JayceLai pushed a commit to JayceLai/Spector.js that referenced this issue Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants