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

ref: Platform display #329

Merged
merged 1 commit into from
Sep 10, 2018
Merged

Conversation

cameronmcefee
Copy link
Contributor

This updates the platform switcher behavior to be a little simpler on the user side.

The new platform selection priority is thus:

  1. platform in the url
  2. preferredPlatform in localStorage
  3. DEFAULT_PLATFORM

The new general page load flow goes like this:

  1. If platform is in the url, update preferredPlatform. If not, leave as is.
  2. Update the UI based on preferredPlatform
    1. Update the dropdowns
    2. Update the url to show the preferred platform in case of copy/paste linking
    3. Show the proper platform content

Consequences:

  • To provide a link to a document with a given platform displayed, set the url: sentry.io/mydocument?platform=erlang
  • preferredPlatform is now set via the UI and/or the url value (previously url had no impact). This means following a link to a new platform sets that as your preferred platform until you navigate back to what you were on before

Removed:

  • I'm no longer updating all links on the page with the current platform, because we're always checking preferredPlatform on page load and don't need to force the platform.

Copy link
Member

@mitsuhiko mitsuhiko left a comment

Choose a reason for hiding this comment

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

Approving based on the documented behavior. I think this generally makes sense and also should produce nicer looking URLs. 👍

@cameronmcefee cameronmcefee merged commit d7ce2f6 into feature/new-sdks Sep 10, 2018
@cameronmcefee cameronmcefee deleted the ref/platform-display branch September 10, 2018 22:00
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2020
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