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

chore: update code syntax highlighting in 3000 #19104

Merged
merged 11 commits into from
Dec 14, 2023

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Dec 5, 2023

Problem

Our code blocks in the app do not match the marketing site

Changes

Sadly the prism-react-renderer package we use on the marketing site does not use the exact same theming systems as react-syntax-highlighter (we should possibly change that in future). Ported over the custom colors and everything looked decent

Before After
Screenshot 2023-12-05 at 17 07 01 Screenshot 2023-12-05 at 17 05 59
Before After
Screenshot 2023-12-05 at 17 16 11 Screenshot 2023-12-05 at 17 05 49

How did you test this code?

Visually

@daibhin daibhin mentioned this pull request Dec 5, 2023
98 tasks
Copy link
Contributor

github-actions bot commented Dec 5, 2023

Size Change: +153 kB (+8%) 🔍

Total Size: 1.99 MB

Filename Size Change
frontend/dist/toolbar.js 1.99 MB +153 kB (+8%) 🔍

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@corywatilo I used the accent color as a background for the code snippet but as in this screenshot it can sometimes appear on top of an accent background. Any color we should use to avoid clashes?

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you point me to an example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This screenshot shows it, basically this portion:
Screenshot 2023-12-11 at 15 39 12
The code snippet has the same background as the settings panel. https://app.posthog.com/notebooks#panel=settings if you want to see it in action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@daibhin daibhin requested a review from a team December 7, 2023 15:33
Copy link
Member

@Twixes Twixes left a comment

Choose a reason for hiding this comment

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

Want to add a story with include3000 perhaps? 😃
Code looks good to me, but I'll also let @corywatilo check how this matches the website's style.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@daibhin daibhin merged commit 10d99ae into master Dec 14, 2023
78 checks passed
@daibhin daibhin deleted the dn-chore/code-syntax-highlighting branch December 14, 2023 15:00
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.

4 participants