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

fix: load toolbar when authenticated or in a preview session #105

Closed
wants to merge 1 commit into from

Conversation

angeloashmore
Copy link
Member

@angeloashmore angeloashmore commented Oct 18, 2022

Types of changes

  • Chore (a non-breaking change which is related to package maintenance)
  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This PR fixes a regression introduced in #97.

The Prismic toolbar should be loaded in the following situations:

  • Logged in to Prismic, not in a preview session.
    In this situation, the toolbar loads the Edit button. The Edit button will only appear if Prismic is aware of a document that matches the current URL.

  • Not logged in to Prismic, in a preview session.
    In this situation, the toolbar loads the preview UI in a special unauthenticated mode. Someone may reach this state by using a preview share link or by logging out during an active preview session.

#97 inadvertently removed both behaviors. They are restored in this PR.

Checklist:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

@angeloashmore angeloashmore changed the title fix: load toolbar when authenticated fix: load toolbar when authenticated or in a preview session Oct 18, 2022
Copy link
Member

@lihbr lihbr left a comment

Choose a reason for hiding this comment

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

LGTM, merging in #104 through #106

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