neo4j / neo4j-browser

Neo4j Browser is the general purpose user interface for working with Neo4j. Query, visualize, administrate and monitor the database.
https://neo4j.com
GNU General Public License v3.0
679 stars 345 forks source link

:style .grass bug? #1136

Closed RDStone closed 4 years ago

RDStone commented 4 years ago

I have edited the .grass sheet in the past with no problems - but 4.1 seems to have me beaten

I used to edit it (and I seem to remember I could give it any name I liked so long as it was saved as a .grass file) drop it in the favourites area and... job done. Not Any More - or so it seems.

If I do this now I am offered two options - save to favourites or put straight into the editor. So, if I put it into the editor and set it going - it chunters for a bit, seems ok and - has no effect on the style whether I call it style.grass or "anythingelse".grass. Stopping and restarting the db has no effect.

If I by-pass the drag and drop and simply paste the new file into the browser - prefixed by :style as a command then I get:

Neo.ClientError.Statement.SyntaxError: Invalid input 'l': expected 'n/N' (line 1, column 3 (offset: 2)) "color: #A5ABB6" ^ Which is calling an error in a line I have not touched! If I try using :style and entering only the style statement that I want to change then I get an error message as follow - essentially exactly the same:

:style node.ConRod { defaultCaption: ""

caption: "{desc}"

ERROR

Neo.ClientError.Statement.SyntaxError: Invalid input 'p': expected 't/T' or 'l/L' (line 1, column 3 (offset: 2)) "caption: "{desc}"" ^

}

Obviously, what I want to happen is that the style sheet is updated and the relevant node (in my particular case now diplays "desc. instead of name.

Ideally, this should be accomlished by using a command direct in the UI to edit only the statement that I want to modify rather than downloading the entire .grass file, editing it and reloading it - though this may be necessary to rename the grass file - which should be possible.

I would not have had the temerity to post this (being a novice) but Michael Hunger asked me to!

I am running Desktop 1.2.9 Neo4j 4.1 in Firefox Halin Windows 10

Many thanks

OskarDamkjaer commented 4 years ago

Thanks for reporting this issue! I'll try to reproduce the errors you run into. Perhaps you could send me an example of what you paste after :style that gives rise to the syntax error you mention?

RDStone commented 4 years ago

Hi Oskar,

This is the example of the short code I input:

:style node.ConRod { defaultCaption: ""; caption: "{desc}"; }

I also tried using :style followed by the entire .grass file with only the above statement modified (it had said caption: "{name}"

But both cases threw up similar errors

Rgds,

Roger

On Thu, 9 Jul 2020 at 14:45, Oskar Damkjaer notifications@github.com wrote:

Thanks for reporting this issue! I'll try to reproduce the errors you run into. Perhaps you could send me an example of what you paste after :style that gives rise to the syntax error you mention?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neo4j/neo4j-browser/issues/1136#issuecomment-656136568, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHG7TNN62N67IXXHE74V43R2XCYHANCNFSM4OVMRUPQ .

RDStone commented 4 years ago

I should add that Bloom was also running

On Thu, 9 Jul 2020 at 14:45, Oskar Damkjaer notifications@github.com wrote:

Thanks for reporting this issue! I'll try to reproduce the errors you run into. Perhaps you could send me an example of what you paste after :style that gives rise to the syntax error you mention?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neo4j/neo4j-browser/issues/1136#issuecomment-656136568, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHG7TNN62N67IXXHE74V43R2XCYHANCNFSM4OVMRUPQ .

OskarDamkjaer commented 4 years ago

Hmm, I think this error is a good place to start. I'll look into it

OskarDamkjaer commented 4 years ago

I've found part of the problem, we seem to misinterpret the semicolons when the Enable multi statement query editor setting is enabled. So the weird error about lines is because part of the grass is interpreted as cypher, thanks again for reporting this so we can get it fixed!

It might not be the only issue, but if you try disabling Enable multi statement query editor, what other issues do you run into?

RDStone commented 4 years ago

Many thanks!

On Fri, 10 Jul 2020 at 09:59, Oskar Damkjaer notifications@github.com wrote:

Hmm, I think this error is a good place to start. I'll look into it

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neo4j/neo4j-browser/issues/1136#issuecomment-656568642, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHG7TMJHSKAI5LJLO5O733R23KATANCNFSM4OVMRUPQ .

RDStone commented 4 years ago

I will try that now!

On Fri, 10 Jul 2020 at 11:06, Oskar Damkjaer notifications@github.com wrote:

I've found part of the problem, we seem to misinterpret the semicolons when the Enable multi statement query editor setting is enabled. So the weird error about lines is because part of the grass is interpreted as cypher, thanks again for reporting this so we can get it fixed!

It might not be the only issue, but if you try disabling Enable multi statement query editor, what other issues do you run into?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neo4j/neo4j-browser/issues/1136#issuecomment-656596500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHG7TP4G4T7YPQWJW25FL3R23RZLANCNFSM4OVMRUPQ .

RDStone commented 4 years ago

Interesting! I get no error message - but the grass sheet is not edited either....

On Fri, 10 Jul 2020 at 11:06, Oskar Damkjaer notifications@github.com wrote:

I've found part of the problem, we seem to misinterpret the semicolons when the Enable multi statement query editor setting is enabled. So the weird error about lines is because part of the grass is interpreted as cypher, thanks again for reporting this so we can get it fixed!

It might not be the only issue, but if you try disabling Enable multi statement query editor, what other issues do you run into?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neo4j/neo4j-browser/issues/1136#issuecomment-656596500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHG7TP4G4T7YPQWJW25FL3R23RZLANCNFSM4OVMRUPQ .

OskarDamkjaer commented 4 years ago

Yes, I suspect there's more than one issue at hand here. I'll look into it but it might take a little while to get to the bottom of it!

RDStone commented 4 years ago

Oskar,

If you want something really odd - viewing in Graphileon shows the change of style .... even as the browser remains as it was...

Maybe I need to close and re-open the db for the browser to update?

Roger

On Fri, 10 Jul 2020 at 11:06, Oskar Damkjaer notifications@github.com wrote:

I've found part of the problem, we seem to misinterpret the semicolons when the Enable multi statement query editor setting is enabled. So the weird error about lines is because part of the grass is interpreted as cypher, thanks again for reporting this so we can get it fixed!

It might not be the only issue, but if you try disabling Enable multi statement query editor, what other issues do you run into?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neo4j/neo4j-browser/issues/1136#issuecomment-656596500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHG7TP4G4T7YPQWJW25FL3R23RZLANCNFSM4OVMRUPQ .

OskarDamkjaer commented 4 years ago

You shouldn't need to re-open the database. It's definitely something wrong on our end

OskarDamkjaer commented 4 years ago

Could you try multiline disabled and putting the entire command on one line like so: :style node.ConRod { defaultCaption: "<id>"; caption: "{desc}";}

That seemed to do it for me. I'm working to make it work without these workarounds

OskarDamkjaer commented 4 years ago

I've got a fix for both issues under review right now! Thanks for shedding some light on this issue

RDStone commented 4 years ago

Delighted to help!

Roger

On Tue, 14 Jul 2020, 15:34 Oskar Damkjaer, notifications@github.com wrote:

I've got a fix for both issues under review right now! Thanks for shedding some light on this issue

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neo4j/neo4j-browser/issues/1136#issuecomment-658216534, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHG7TOJF4YPYXUD4S6QNNDR3RUH5ANCNFSM4OVMRUPQ .

OskarDamkjaer commented 4 years ago

Did your issue go away when using the workaround of putting it all on one line and not having multiline editing enabled?

RDStone commented 4 years ago

Hi Oskar, Just at the moment I have a different (non-DB) project that I have to pull out all the stops on so I won't get back to this unti late today, maybe tomorrow - but I will let you know! many thanks,

Roger

On Wed, 15 Jul 2020 at 10:49, Oskar Damkjaer notifications@github.com wrote:

Did your issue go away when using the workaround of putting it all on one line and not having multiline editing enabled?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neo4j/neo4j-browser/issues/1136#issuecomment-658668384, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHG7TMFTDEGQATDUWAGIKTR3V3Q5ANCNFSM4OVMRUPQ .

OskarDamkjaer commented 4 years ago

No stress! It'll be a while before we release anyway :)

OskarDamkjaer commented 4 years ago

This should be fixed now and released in our next release in the end of august! Closing this for now, and if the problem or a similar problem arises, feel free to re-open och open a new issue!

RDStone commented 4 years ago

Thank you so much! I am desperately impressed with the response!

Roger

On Thu, 23 Jul 2020 at 10:11, Oskar Damkjaer notifications@github.com wrote:

This should be fixed now and released in our next release in the end of august! Closing this for now, and if the problem or a similar problem arises, feel free to re-open och open a new issue!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neo4j/neo4j-browser/issues/1136#issuecomment-662901394, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHG7TPFZVCSGD23ANEZBDLR475FPANCNFSM4OVMRUPQ .