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

adds versioned error view #497

Merged
merged 2 commits into from
Jan 28, 2022
Merged

Conversation

brkalow
Copy link
Contributor

@brkalow brkalow commented Jan 25, 2022

🎟️ Asana Task


Description

Note: this PR is targeting @zchsh's branch to add the error-view package. The PR

Adds a specific error view for use on docs sites with versioned docs. It's effectively a full, custom implementation of pages/_error.tsx. Implementation looks something like this:

import { VersionedErrorPage } from '@hashicorp/react-error-view/versioned-view'

export default VersionedErrorPage

Screen Shot 2022-01-25 at 12 18 48 PM

PR Checklist 🚀

Items in this checklist may not may not apply to your PR, but please consider each item carefully.

  • Add Asana and Preview links above.
  • Conduct thorough self-review.
  • Add or update tests as appropriate.
  • Conduct reasonable cross browser testing for both compatibility and responsive behavior (We have a Sauce Labs account for this, if you don't have access, just ask!).
  • Conduct reasonable accessibility review (use the WAS as a guide or an axe browser plugin until we establish more formal checks).
  • Identify (in the description above) and document (add Asana tasks on this board) any technical debt that you're aware of, but are not addressing as part of this PR.

@changeset-bot
Copy link

changeset-bot bot commented Jan 25, 2022

⚠️ No Changeset found

Latest commit: a0817c0

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 Jan 25, 2022

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/hashicorp/react-components/7J7AZ68H4xQZPgFPTKxkfj2MN1ms
✅ Preview: https://react-components-git-brkfeat-versioned-error-view-hashicorp.vercel.app

@brkalow brkalow requested a review from zchsh January 25, 2022 18:22

/**
* A Standalone error page component intended to be used on sites with versioned docs support.
* Exports a full, custom implementation of an pages/_error.tsx component.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I opted to use pages/_error here instead of pages/404 as the page renders differently depending on the URL, and so static generation of the 404 page doesn't really make a lot of sense IMO. The alternative is to SSR it one way and do some client-side munging to render it differently after the initial hydration, at which point why not just SSR?

Copy link
Contributor

@zchsh zchsh left a comment

Choose a reason for hiding this comment

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

✅ This looks great to me! On board with using pages/_error 👍

@zchsh zchsh merged commit 5ca636c into zs.add-error-view Jan 28, 2022
@zchsh zchsh deleted the brk.feat/versioned-error-view branch January 28, 2022 00:39
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