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

Use external package for snippets #3325

Merged
merged 5 commits into from
Nov 23, 2024
Merged

Use external package for snippets #3325

merged 5 commits into from
Nov 23, 2024

Conversation

simolus3
Copy link
Owner

@simolus3 simolus3 commented Nov 4, 2024

Use the existing code_snippets package to highlight external snippets on the documentation site. This will require updates to fix the CSS to match the updated values extracted from the vs code theme.

In my mind, advantages of the code_snippets package are:

  1. The ability to link to dartdoc / source code for referenced imports and methods.
  2. More accurate syntax highlighting for drift files, which is not exactly SQL.
  3. More accurate syntax highlighting for dart files by parsing the entire file using analyzer APIs instead of using the tree-sitting grammar which can't recognize everything correctly.
  4. Less custom code in docs/.

At the moment, going back to code_snippets makes things worse due to the old css and outdated code_snippets builder. I'll try to fix those obviously, but I'm wondering if I'm overlooking additional things I should take into consideration.

@simolus3 simolus3 requested a review from dickermoshe November 4, 2024 22:58
Copy link

github-actions bot commented Nov 4, 2024

🚀 Deployed on https://deploy-preview-3325--moor.netlify.app

@github-actions github-actions bot temporarily deployed to pull request November 4, 2024 23:04 Inactive
@github-actions github-actions bot temporarily deployed to commit November 4, 2024 23:04 Inactive
@dickermoshe
Copy link
Collaborator

image

@dickermoshe
Copy link
Collaborator

some colors are off

@github-actions github-actions bot temporarily deployed to pull request November 10, 2024 22:03 Inactive
@github-actions github-actions bot temporarily deployed to commit November 10, 2024 22:03 Inactive
@github-actions github-actions bot temporarily deployed to commit November 11, 2024 22:08 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 11, 2024 22:09 Inactive
@github-actions github-actions bot temporarily deployed to commit November 22, 2024 22:06 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 22, 2024 22:08 Inactive
@simolus3 simolus3 marked this pull request as ready for review November 23, 2024 22:44
@simolus3 simolus3 merged commit e4e5882 into develop Nov 23, 2024
31 checks passed
@simolus3 simolus3 deleted the external-snippets branch November 23, 2024 22:46
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