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 Site] Add Turnstile and track referrer in feedback prompt #19581

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

KianNH
Copy link
Contributor

@KianNH KianNH commented Jan 31, 2025

Summary

  • Rewrites feedback prompt to be a React component.

  • Adds Turnstile and tracks the referrer on submissions.

@@ -39,7 +39,7 @@
"@codingheads/sticky-header": "1.0.2",
"@expressive-code/plugin-collapsible-sections": "0.38.3",
"@iarna/toml": "2.2.5",
"@iconify-json/material-symbols": "1.2.13",
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 was only ever used by FeedbackPrompt.astro which is no-longer an Astro component, it now uses react-icons.

@@ -16,7 +16,6 @@ export { default as Example } from "./Example.astro";
export { default as ExternalResources } from "./ExternalResources.astro";
export { default as Feature } from "./Feature.astro";
export { default as FeatureTable } from "./FeatureTable.astro";
export { default as FeedbackPrompt } from "./FeedbackPrompt.astro";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not worth having this in the barrel file as it isn't used outside of overrides.

@@ -1,10 +1,8 @@
---
import type { Props } from "@astrojs/starlight/props";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unused since MarkdownContent takes no props.

---

{
tableOfContents === false &&
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 can be done with the data-has-toc attribute on html instead (and Prettier can't format this).


<style>
html:not([data-has-sidebar]) {
--sl-content-width: 80rem;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Has been unused for awhile as other widths had more specificity.


<style>
html:not([data-has-sidebar]) {
--sl-content-width: 75rem;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Has been unused for awhile as other widths had more specificity.

@@ -156,6 +156,9 @@ export default {
600: "var(--tw-accent-600)",
900: "var(--tw-accent-900)",
},
sl: {
DEFAULT: "var(--sl-color-text)",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a shortcut for getting the gray colour used by text, regardless of light or dark mode.

Copy link

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7181456
Status: ✅  Deploy successful!
Preview URL: https://beaee288.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://kian-pcx-15597.cloudflare-docs-7ou.pages.dev

View logs

@KianNH KianNH merged commit 528130f into production Feb 3, 2025
10 checks passed
@KianNH KianNH deleted the kian/PCX-15597 branch February 3, 2025 11:19
Weera1234 pushed a commit to Weera1234/cloudflare-docs that referenced this pull request Feb 3, 2025
…dflare#19581)

* [Docs Site] Add Turnstile and track referrer in feedback prompt

* remove debug logs

* remove unused import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.