-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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: use the default query on adding a new tab #3441
Conversation
🦋 Changeset detectedLatest commit: a75583e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
makes sense to me. do any other @graphql/graphiql-maintainers have feelings about this? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3441 +/- ##
==========================================
- Coverage 67.30% 67.29% -0.01%
==========================================
Files 121 121
Lines 7016 7017 +1
Branches 2263 2263
==========================================
Hits 4722 4722
- Misses 2277 2278 +1
Partials 17 17
|
I'm for this change 👍 |
two things:
|
@cimdalli so it seems this clashes a bit with previously expected behavior: when so we need to revert this for headers and do the same for query/defaultQuery. otherwise, it's a change in functionality and requires a new minor version CC @dimaMachina who added tests for this expectation, what do you think? |
Any update on this? |
* Use default query on adding new tab * Fix eslint issue * First try to use `query` and `headers` props * add changeset * upd fix lint this should fix cypress fix * Update .changeset/brown-tigers-nail.md --------- Co-authored-by: Rikki Schulte <rikki.schulte@gmail.com> Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
Is everyone happy with this change? I find it quite a bit annoying to have the "welcome message" shown every time you open a new tab... 😞 Aside from a UX point of view, I also suddenly must find a way to run my playwright test to clear the entire editor before typing in a query after clicking "+" new tab button. I know this is too much to ask, but I would almost like the old behaviour back (or a way to escape this new behaviour) |
@klippx you can set |
I decided to keep the default query as we assert on text from it to ensure the user is logged in and page is fully loaded and that the test can be started. |
When a new tab is added, it sets the query value as an empty string instead of
defaultQuery
value. Tab default query value should bedefaultQuery
variable if it's set on the component. Otherwise, it should be DEFAULT_QUERY constant.