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

Avoid creating new tabs on header state #3371

Merged
merged 1 commit into from
Jul 29, 2023
Merged

Avoid creating new tabs on header state #3371

merged 1 commit into from
Jul 29, 2023

Conversation

acao
Copy link
Member

@acao acao commented Jul 24, 2023

Solves #2825, an old bug where new tabs were created on every refresh

the bug occurred when:

  1. shouldPersistHeaders is not set to true
  2. headers or defaultHeaders are provided as props
  3. the user refreshes the browser

I could not get cypress to re-create the bug, but I was able to manually confirm the fix

@changeset-bot
Copy link

changeset-bot bot commented Jul 24, 2023

🦋 Changeset detected

Latest commit: 3c2b436

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@graphiql/react Patch
graphiql Patch
@graphiql/plugin-code-exporter Patch
@graphiql/plugin-explorer Patch

Not sure what this means? Click here to learn what changesets are.

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

Solves #2825, an old bug where new tabs were created on every
refresh

the bug occurred when:

1. `shouldPersistHeaders` is not set to true
2. `headers` or `defaultHeaders` are provided as props
3. the user refreshes the browser
@acao acao force-pushed the 2825-new-tab-headers branch from 19f2b70 to 3c2b436 Compare July 24, 2023 23:02
@github-actions
Copy link
Contributor

github-actions bot commented Jul 24, 2023

The latest changes of this PR are available as canary in npm (based on the declared changesets):

@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #3371 (3c2b436) into main (7856b25) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3371      +/-   ##
==========================================
- Coverage   55.76%   55.75%   -0.02%     
==========================================
  Files         110      110              
  Lines        5242     5243       +1     
  Branches     1425     1426       +1     
==========================================
  Hits         2923     2923              
- Misses       1896     1897       +1     
  Partials      423      423              
Files Changed Coverage Δ
packages/graphiql-react/src/editor/context.tsx 73.39% <ø> (ø)
packages/graphiql-react/src/editor/tabs.ts 65.00% <0.00%> (-0.83%) ⬇️

@netlify
Copy link

netlify bot commented Jul 24, 2023

Deploy Preview for graphiql-test ready!

Name Link
🔨 Latest commit 3c2b436
🔍 Latest deploy log https://app.netlify.com/sites/graphiql-test/deploys/64bf03215b611b0008c59e95
😎 Deploy Preview https://deploy-preview-3371--graphiql-test.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@graphql graphql deleted a comment from netlify bot Jul 24, 2023
@acao acao merged commit 2348641 into main Jul 29, 2023
@acao acao deleted the 2825-new-tab-headers branch July 29, 2023 18:15
@acao acao mentioned this pull request Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant