evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
3.44k stars 167 forks source link

Add updated SqlConsole #1505

Closed ItsMeBrianD closed 3 months ago

ItsMeBrianD commented 4 months ago

Description

image

Resolves #1459

Checklist

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: bf019a5aa640b66f53631f2734dd4fb93d1effbc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages | Name | Type | | ----------------------------- | ----- | | @evidence-dev/core-components | Patch | | @evidence-dev/evidence | Patch | | @evidence-dev/components | Patch | | evidence-test-environment | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

netlify[bot] commented 4 months ago

Deploy Preview for evidence-development-workspace ready!

Name Link
Latest commit bf019a5aa640b66f53631f2734dd4fb93d1effbc
Latest deploy log https://app.netlify.com/sites/evidence-development-workspace/deploys/65bd6730d350960008158818
Deploy Preview https://deploy-preview-1505--evidence-development-workspace.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 10:07pm
archiewood commented 4 months ago

UI

Accessing data

Functionality

On initial load:

Couldn't seem to run any queries

archiewood commented 4 months ago

Okay got the db working in Chrome

SQL writing experience

Chart Builder

This is a nice start! Worked for me!

archiewood commented 4 months ago

final thought.

Feels like these should available in prod.

the SQLrunner is then our first "self serve" feature

ItsMeBrianD commented 4 months ago

I'd consider restricting to a core set of statements (select, from, limit, group by, order by, where, having, left join, join, with)

I'll see what we can do here, the language autocomplete is all done with @codemirror/sql

Hard to know my tables are called. They don't autocomplete for me, and I don't have a table viewer

We could add the schema explorer to this page somehow; alternatively using FROM [schema]. will autocomplete tables, and columns autocomplete when the table is explicitly named (either fully qualified or an aliased name)

The SQL console width "jumped" from narrow to fullscreen layout in a jerky way

Will take a look here, this is a little hard; the page has to talk to the layout

Some issue with database? (Firefox 121.0.1)

Is this only happening for the SQL Console, or other areas as well?

What is a "Break" chart? Is it a chart that breaks?

Test value that leaked, should be gone now

csjh commented 3 months ago

Also a small UI note - the mouse doesn't switch to the text input pointer unless you're hovering over the top line

archiewood commented 3 months ago

Some issue with database? (Firefox 121.0.1)

Is this only happening for the SQL Console, or other areas as well?

Appears to be only happening with the SQL console. However once the SQL console errors out, anything after requiring DuckDB is then broken

CleanShot 2024-01-31 at 10 18 25@2x

CleanShot 2024-01-31 at 10 12 08

ItsMeBrianD commented 3 months ago

Appears to be only happening with the SQL console. However once the SQL console errors out, anything after requiring DuckDB is then broken

Fixed this one I believe

archiewood commented 3 months ago

Confirm fixed

archiewood commented 3 months ago

I find this auto indenting of line after select annoying but it's a minor UX gripe.

If you want to write a column name it's helpful, but often you do not.

i.e. I would rather just maintain the current indent level, unless I chose to adjust it with tab.

CleanShot 2024-02-01 at 16 25 27