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

[graphiql v4] Allow reassign tab name #3753

Draft
wants to merge 2 commits into
base: graphiql-v4
Choose a base branch
from

Conversation

dimaMachina
Copy link
Collaborator

@dimaMachina dimaMachina commented Aug 24, 2024

fixes #3608

TODO:

  • add cypress tests
  • disallow updating tab.title if it was reassigned
  • move new component input to @graphiql/react

Preview

Copy link

changeset-bot bot commented Aug 24, 2024

🦋 Changeset detected

Latest commit: 4ed7cda

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

This PR includes changesets to release 1 package
Name Type
graphiql Minor

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

Copy link

codecov bot commented Aug 24, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 65.19%. Comparing base (068e23c) to head (4ed7cda).

Files Patch % Lines
packages/graphiql/src/components/GraphiQL.tsx 25.00% 12 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           graphiql-v4    #3753      +/-   ##
===============================================
- Coverage        65.30%   65.19%   -0.12%     
===============================================
  Files              121      121              
  Lines             7006     7021      +15     
  Branches          2263     2265       +2     
===============================================
+ Hits              4575     4577       +2     
- Misses            2414     2427      +13     
  Partials            17       17              
Files Coverage Δ
packages/graphiql/src/components/GraphiQL.tsx 75.00% <25.00%> (-3.55%) ⬇️

... and 1 file with indirect coverage changes

@acao
Copy link
Member

acao commented Aug 24, 2024

I see it's still WIP so maybe persistence is already planned, i think we should provide hooks for handling and setting tab name (so for example explorer could change the tab name), but i want to improve the hooks design. we already provide hooks for controlling tabs. we should provide tabs for reading and controlling tab state, including tab name. ideally we could combine some of this into something like useTabState(), perhaps this can be the beginning of that? this is also important for projects that need to persist the full editor state remotely via the storage API override, so either way it's ideal to persist this state and perhaps make it manageable via context

there was something else I wanted to reccomend here but i forgot, I'll come back to this, but thanks for all the initiative!

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