edgedb-js icon indicating copy to clipboard operation
edgedb-js copied to clipboard

Facelift for Queries Generator error logging (#866)

Open themajashurka opened this issue 1 year ago • 8 comments

Just a little proposal to improve visibility on the outcome of the generator (until a more advanced solution like TAP is implemented)

themajashurka avatar Feb 21 '24 11:02 themajashurka

All commit authors signed the Contributor License Agreement.
CLA signed

gel-data-cla[bot] avatar Feb 21 '24 11:02 gel-data-cla[bot]

Three screenshots for indicating the feature:

Summary of unsuccessful generation at the bottom edgedb_js_#866_1

Summary of successful generation at the bottom edgedb_js_#866_2

"Inline error" coloring for unsuccessful generation edgedb_js_#866_3

themajashurka avatar Feb 21 '24 22:02 themajashurka

My latest experience with this change, is that now it feels kind of redundant to print error messages twice: "inline" and aggregated at the bottom. Maybe it's enough to indicate "inline" errors simply with red color (and giving the detailed error in summary)?

Before before

After after

And one more thing: to reduce messiness, put a separator in between error messages?

one_more_thing

themajashurka avatar Feb 23 '24 12:02 themajashurka

@themajashurka

Maybe it's enough to indicate "inline" errors simply with red color (and giving the detailed error in summary)?

Yeah, that looks great!

scotttrinh avatar Feb 23 '24 13:02 scotttrinh

@themajashurka

And one more thing: to reduce messiness, put a separator in between error messages?

Yeah, either a separator or just a new line works for me, I trust your judgement here.

scotttrinh avatar Feb 23 '24 13:02 scotttrinh

There are still a couple of changes needed to be make in order to make formatError and stuff work. Plus I found an unrelated&small bug. I'll have more time on the weekend to make these changes!

themajashurka avatar Feb 23 '24 14:02 themajashurka

Sorry to ask it here, but is there an industry standard way of keeping a link to my forked edgedb-js in my edgedb projects? I keep jumping back and forth between my forked repo and my local node_modules to see the effect of changes.

themajashurka avatar Feb 23 '24 14:02 themajashurka

Sorry to ask it here, but is there an industry standard way of keeping a link to my forked edgedb-js in my edgedb projects?

You can use yarn link to link a dependency to a local build.

scotttrinh avatar Feb 23 '24 16:02 scotttrinh