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 GetLink-Tutorial-Playground-state issue 1558 #1855

Merged
merged 7 commits into from
Aug 27, 2024

Conversation

ggridin
Copy link
Contributor

@ggridin ggridin commented Aug 16, 2024

This PR closes #1558

Included changes:

  1. props.linkedCode must be reset after nav click.
  2. Only "code" and "profile" URL params are reset, instead of all URL params (which is better practice). WebAPI is used instead of string operations.

@ggridin
Copy link
Contributor Author

ggridin commented Aug 16, 2024

Testing done:

  1. Original use case

    • Open clean playground state.
    • Make some noticeable changes to the default code.
    • Click the "Get a link to this code" button. (notice the URL changes)
    • Refresh the page using the browser refresh button.
    • Click on one of the Tutorial links. (notice how the URL resets.)
  2. Modified original use case

    • Open clean playground state.
    • Make some noticeable changes to the default code.
    • Click the "Get a link to this code" button. (notice the URL changes)
    • Load the new URL
    • Optionally: refresh the page using the browser refresh button.
    • Click on one of the Tutorial links. (notice how the URL resets.)
  3. Original use case for Samples

  4. Original use case with logLevel in URL. Make sure that additional parameter is not removed/overwritten

    • Open clean playground state.
    • Add "logLevel=info" to URL: http://localhost:5555/?logLevel=info
    • Make some noticeable changes to the default code.
    • Click the "Get a link to this code" button. (notice the URL changes)
    • Refresh the page using the browser refresh button.
    • Click on one of the Tutorial links. (notice how the URL resets.)
  5. Get link on the linked code

    • Open clean playground state.
    • Make some noticeable changes to the default code.
    • Click the "Get a link to this code" button. (notice the URL changes)
    • Load the new URL
    • Make some noticeable changes to the loaded code.
    • Click the "Get a link to this code" button. (notice the URL changes)
    • Load the new URL, make sure that the URL is correct (no multiple "code" params) and the right code is loaded
    • Click on one of the Tutorial links. (notice how the URL resets.)
  6. Load two tabs with different linked code and make sure that they do not impact each other.

@ggridin
Copy link
Contributor Author

ggridin commented Aug 21, 2024

@billti @cesarzc @minestarks could you review the changes?

@ggridin
Copy link
Contributor Author

ggridin commented Aug 26, 2024

@swernli @tcNickolas is it possible to review this PR ?

Copy link
Contributor

@cesarzc cesarzc left a comment

Choose a reason for hiding this comment

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

Thank you for this fix!

@tcNickolas tcNickolas added this pull request to the merge queue Aug 27, 2024
Merged via the queue into microsoft:main with commit 3f35b8e Aug 27, 2024
18 checks passed
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.

Playground Tutorial and Documentation links don't work when combined with "Get link" button.
4 participants