Skip to content

Don't auto-format SQL on page load#601

Merged
simonw merged 1 commit intomasterfrom
no-auto-format-sql
Oct 18, 2019
Merged

Don't auto-format SQL on page load#601
simonw merged 1 commit intomasterfrom
no-auto-format-sql

Conversation

@simonw
Copy link
Owner

@simonw simonw commented Oct 18, 2019

Refs #600

@simonw
Copy link
Owner Author

simonw commented Oct 18, 2019

@rixx does this look like the right way to do #600 to you?

@rixx
Copy link
Contributor

rixx commented Oct 18, 2019

That looks right, and I completely agree with the intent.

@rixx
Copy link
Contributor

rixx commented Oct 18, 2019

The only negative impact that comes to mind is that now you have no way to get the read-only query to be formatted nicely, I think, so maybe a second PR adding the formatting functionality even to the read-only page would be good?

@simonw simonw merged commit e877b1c into master Oct 18, 2019
@simonw
Copy link
Owner Author

simonw commented Oct 18, 2019

That's a good idea. It could even be smart about it and only show the "Format SQL" button on that page of the output of the function would differ from what's there already.

rixx added a commit to rixx/datasette that referenced this pull request Oct 20, 2019
Following discussion in simonw#601, this PR adds a "Format SQL" button to
read-only SQL (if the SQL actually differs from the formatting result).

It also removes a console error on readonly SQL queries.
@rixx
Copy link
Contributor

rixx commented Oct 20, 2019

Submitted in #602!

simonw pushed a commit that referenced this pull request Nov 4, 2019
Following discussion in #601, this PR adds a "Format SQL" button to
read-only SQL (if the SQL actually differs from the formatting result).

It also removes a console error on readonly SQL queries.

Thanks, @rixx!
simonw added a commit that referenced this pull request Nov 11, 2019
simonw pushed a commit that referenced this pull request Nov 11, 2019
Following discussion in #601, this PR adds a "Format SQL" button to
read-only SQL (if the SQL actually differs from the formatting result).

It also removes a console error on readonly SQL queries.

Thanks, @rixx!
simonw added a commit that referenced this pull request Nov 15, 2019
simonw pushed a commit that referenced this pull request Nov 15, 2019
Following discussion in #601, this PR adds a "Format SQL" button to
read-only SQL (if the SQL actually differs from the formatting result).

It also removes a console error on readonly SQL queries.

Thanks, @rixx!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants