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

docs: Create ace-demo.html #3512

Merged
merged 9 commits into from
Sep 15, 2023
Merged

docs: Create ace-demo.html #3512

merged 9 commits into from
Sep 15, 2023

Conversation

vanillajonathan
Copy link
Collaborator

This is a demo of using Ace with the PRQL syntax highlighting mode.

@vanillajonathan vanillajonathan changed the title Create ace-demo.html docs: Create ace-demo.html Sep 15, 2023
@max-sixty
Copy link
Member

OK cool.

Would be nice to have some sort of test / check that it's still working correctly, but I guess that's difficult with HTML.

Shall we link to this from the grammars readme? Otherwise it's totally orphaned.

Separately, we could add the link from #3493 (comment) too.

@max-sixty
Copy link
Member

If you want to spend more time with grammars, adding tests for our existing grammars would be really helpful.

And one huge win would be allowing the PRQL lezer grammar to work in Jupyter notebooks. The grammar is our best grammar, and is the format (CodeMirror) required for Jupyter notebooks, but the integration hasn't been writen. That would be a difficult project but would immensely valuable.

@@ -9,6 +9,8 @@ an index.

- [Ace](https://ace.c9.io/) — supported. The grammar is upstream
([prql_highlight_rules.js](https://github.com/ajaxorg/ace/blob/master/src/mode/prql_highlight_rules.js)).
See the
[demo](https://htmlpreview.github.io/?https://github.com/PRQL/prql/blob/main/grammars/ace-demo.html).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work? I'm not sure I'm doing it right but if I try https://htmlpreview.github.io/?https://github.com/PRQL/prql/blob/0bcb3d530aa9eb411a9c09380738732f5be1407f//grammars/ace-demo.html, I just get some text.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, I had hoped so, but I guess not. I can move to /web/website/content/ though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's try that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(need to update link too :) )

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this works!

@@ -9,6 +9,7 @@ an index.

- [Ace](https://ace.c9.io/) — supported. The grammar is upstream
([prql_highlight_rules.js](https://github.com/ajaxorg/ace/blob/master/src/mode/prql_highlight_rules.js)).
See the [demo](https://prql-lang.org/ace-demo).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize this was a top-level page. Could we put it down a level to indicate that it's not a sibling of the key pages? Maybe a content/demos/ace-demo.html page?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@max-sixty max-sixty merged commit 8feaca8 into PRQL:main Sep 15, 2023
28 of 29 checks passed
@prql-bot
Copy link
Collaborator

The backport to web failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-web web
# Navigate to the new working tree
cd .worktrees/backport-web
# Create a new branch
git switch --create backport-3512-to-web
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8feaca87c566e1f951f4212e1e6669e702bbfbc1
# Push it to GitHub
git push --set-upstream origin backport-3512-to-web
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-web

Then, create a pull request where the base branch is web and the compare/head branch is backport-3512-to-web.

@max-sixty
Copy link
Member

We're doing a release v soon anyway, so it'll publish then

@vanillajonathan vanillajonathan deleted the patch-1 branch September 15, 2023 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants