Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Added SSR and OG image tags to visualised machines #198

Merged

Conversation

mattpocock
Copy link
Contributor

@mattpocock mattpocock commented Aug 19, 2021

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Aug 19, 2021

⚠️ No Changeset found

Latest commit: 215dbe0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Aug 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/statelyai/xstate-viz/ABE1jcZdhWNCotSBKyEKtKtkwQAH
✅ Preview: https://xstate-viz-git-matt-added-ssr-and-og-image-tag-c60af3-statelyai.vercel.app

@mattpocock mattpocock marked this pull request as ready for review August 20, 2021 10:10
…-ssr-and-og-image-tags-to-visualised-machines
src/AppHead.tsx Outdated Show resolved Hide resolved
src/sourceMachine.ts Outdated Show resolved Hide resolved
Co-authored-by: Mateusz Burzyński <[email protected]>
src/AppHead.tsx Outdated
* whereas titles in the <title> attribute
* should be SEO-friendly
*
* ogTitle: My Great Machine
Copy link
Member

Choose a reason for hiding this comment

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

With this

Suggested change
* ogTitle: My Great Machine
* @example
* ogTitle: My Great Machine

it can render slightly better in the IDE.

Before
Screenshot 2021-08-24 at 14 02 49
After
Screenshot 2021-08-24 at 14 02 34

src/ShareButton.tsx Outdated Show resolved Hide resolved
"xstate-viz-app": patch
---

Added SSR and OG image tags to visualised machines, and put visualised machines on a new, prettier URL - `/viz/:id`
Copy link
Member

Choose a reason for hiding this comment

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

All 3 things are completely separate and unrelated from the user's PoV. Don't be afraid of creating more than a single changeset per PR :)

I'm not sure if SSR is that interesting to our users - but the other ones definitely are! A sample OG image could also be attached to a changeset mentioning this improvement.

if (!result.data?.getSourceFile) {
return {
notFound: true,
props: {} as any,
Copy link
Member

Choose a reason for hiding this comment

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

It typechecks just fine without it:

Suggested change
props: {} as any,

The notFound is already included in the union here:
https://github.com/vercel/next.js/blob/53f0973abaa5db4961dc03b226698d3c4ddbcf2b/packages/next/types/index.d.ts#L162-L165

…-ssr-and-og-image-tags-to-visualised-machines
@mattpocock
Copy link
Contributor Author

Going to delete the changesets and add them to a later PR when we turn the feature flag on

@mattpocock mattpocock merged commit 784ded9 into dev Aug 27, 2021
@mattpocock mattpocock deleted the matt/added-ssr-and-og-image-tags-to-visualised-machines branch August 27, 2021 09:11
@github-actions github-actions bot mentioned this pull request Sep 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants