Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Add terms pages and Markdown/ MDX parsing #20

Merged
merged 27 commits into from
Mar 9, 2022
Merged

Conversation

katjuell
Copy link
Contributor

@katjuell katjuell commented Mar 2, 2022

Closes #15 and #16 by adding terms pages and components. Also closes #19 by adding MD/ MDX parsing/ rendering.

NB: Adds a HubSpot embedded component to handle the fact that we can't drop script tags straight into our MD anymore. The component mirrors the minimal form implementation in this document and this document.

Worth noting: The "autofill" behavior that we see on the injected HubSpot forms on prod, in /security and /subprocessors, specifically, is not present/ active on local Gatsby dev or Gatsby build, so I'm not dealing with that here. I'm assuming there is some logic that maps to our domain for these specific forms. This is not to be confused with the createHubSpotForm function which gets loaded into various pages. This PR deliberately doesn't port that, since that function is not used in MD files and will be handled separately in #25.

Also, this PR does not handle code syntax — therefore, code blocks will not look as they currently do in prod. This will be covered by sourcegraph/about#5382.

To Test

  • Check out branch and install dependencies with npm ci
  • Check the pages under terms in the content directory (the directory where our Markdown will live). Ensure that there are no errors or warnings relating to our Markdown parsing.
  • Check the static build, ensure everything works.
  • Check styles on mobile.

@katjuell katjuell self-assigned this Mar 2, 2022
@katjuell katjuell changed the title WIP Add terms pages Add terms pages and Markdown/ MDX parsing Mar 7, 2022
@katjuell katjuell marked this pull request as ready for review March 7, 2022 16:08
src/pages/_app.tsx Outdated Show resolved Hide resolved
@katjuell katjuell requested a review from bretthayes March 7, 2022 16:20
@katjuell katjuell added the team/content-platform Content Platform Team related tickets. label Mar 7, 2022
[index: string]: string
}

const EmbeddedHubSpot: FunctionComponent<EmbeddedHubSpotProps> = ({ portalId, formId, targetId, region }) => (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See PR comment for overall tl;dr on how/ why this is distinct from createHubSpotForm.

content/terms/CODENOTIFY Show resolved Hide resolved
src/components/HubSpot.tsx Outdated Show resolved Hide resolved
src/pages/_app.tsx Outdated Show resolved Hide resolved
@katjuell katjuell requested a review from bretthayes March 8, 2022 16:49
@katjuell katjuell mentioned this pull request Mar 8, 2022
@katjuell katjuell requested a review from bretthayes March 9, 2022 00:43
src/components/HubSpot.tsx Outdated Show resolved Hide resolved
@katjuell katjuell requested a review from bretthayes March 9, 2022 20:45
@katjuell katjuell merged commit c6132c1 into main Mar 9, 2022
@katjuell katjuell deleted the kjuell/terms-pages branch March 9, 2022 22:30
@bretthayes bretthayes added this to the Phase 1 milestone Mar 23, 2022
@bretthayes bretthayes mentioned this pull request May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team/content-platform Content Platform Team related tickets.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add MD/ MDX parsing and rendering Port over Terms pages
2 participants