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

GraphQL page improvements, and more #602

Merged
merged 37 commits into from
Feb 26, 2020
Merged

GraphQL page improvements, and more #602

merged 37 commits into from
Feb 26, 2020

Conversation

dihmeetree
Copy link
Contributor

@dihmeetree dihmeetree commented Feb 25, 2020

This PR does the following:

  • Saves the schema and response to the local state, so if you refresh or navigate to a new page and back, it will show up again. 21c6c07
  • Update the Run Query button so it matches the Get schema button
    image
  • Running a query now shows "Loading..." in the response section, similar to when you click "Get Schema" ab49a12
  • Saves collapsed sections to the local state, similarly to the schema and response, Postwoman will show sections collapsed if you refresh/navigate away. (This will work on all pages; Not just the GraphQL page, as it uses the route as a key) 2d5b70a
  • Fixes auto scroll toggle (While I don't necessarily agree with how settings are initialized in the store; I've added checks for undefined auto scroll keys) 6d534d3
  • (Fix) Set showExtensionsToast to false in localStorage when no is clicked on the extensions toast 1d616c7
  • Disable spell check on input fields (Shows red line under text if spell check is enabled)
  • (Fix) Error message for failed queries/mutations on GraphQL page
  • (Fix) Disable json linting for response editor on GraphQL page JSON linting in the code editor #605 (comment)
  • Moved .prettierrc and .huskyrc contents to the package.json file, so we have 2 less files to manage 50339a2

Note: I haven't gotten around to saving the types/queries/mutation to the local state yet (the Docs) But I will get to that soon :)

Allows the user to go to the settings page, and back to the GraphQL page, without having to re-request the schema or response.
When you refresh or navigate to a new page and back, your collapsed sections will be as you set them.
@ghost
Copy link

ghost commented Feb 25, 2020

DeepCode's analysis on #50339a found:

  • 0 critical issues. ⚠️ 0 warnings and 1 minor issue. ✔️ 0 issues were fixed.

💬 This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues.


☺️ If you want to provide feedback on our bot, here is how to contact us.

@dihmeetree dihmeetree changed the title Feature: WIP - Improve GraphQL page state WIP: Improve GraphQL page state Feb 25, 2020
@dihmeetree dihmeetree changed the title WIP: Improve GraphQL page state WIP: Improve GraphQL page state, and more Feb 25, 2020
@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: d9c11890-578c-11ea-b14f-b186f6b55800

@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 79380b30-578e-11ea-b14f-b186f6b55800

Wasn't actually working with the last PR. This one fixes it.
@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 07c87c50-5793-11ea-b14f-b186f6b55800

@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: dcef4280-5796-11ea-acab-ef795e2c3319

@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 65de5810-5797-11ea-acab-ef795e2c3319

@TravisBuddy
Copy link

Hey @dmitryyankowski,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: e7a81080-579b-11ea-acab-ef795e2c3319

@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: eb5a6d50-579f-11ea-acab-ef795e2c3319

@liyasthomas
Copy link
Member

@dmitryyankowski pre-commit hooks have been introduced hence please rebase to current master and pull latest change, then send PR.

Allows the user to go to the settings page, and back to the GraphQL page, without having to re-request the schema or response.
When you refresh or navigate to a new page and back, your collapsed sections will be as you set them.
Wasn't actually working with the last PR. This one fixes it.
@dihmeetree
Copy link
Contributor Author

dihmeetree commented Feb 26, 2020

@liyasthomas can we address the build issue, before I push any more changes? Getting CypressError: Timed out retrying: expected '<div#response-details-wrapper>' to contain 'FAKE Cat API' again in the build step. 😭

@dihmeetree dihmeetree added feature New feature or request and removed do not merge This will break everything labels Feb 26, 2020
@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 99ab8be0-583c-11ea-b533-891a36a4ac0b

@liyasthomas
Copy link
Member

@dmitryyankowski I don't know exactly what's wrong with the CI, locally everything seems to be working fine.

@hoppscotch hoppscotch deleted a comment from TravisBuddy Feb 26, 2020
@hoppscotch hoppscotch deleted a comment from TravisBuddy Feb 26, 2020
@dihmeetree
Copy link
Contributor Author

@dmitryyankowski I don't know exactly what's wrong with the CI, locally everything seems to be working fine.

Yeah it always works fine locally for me too. It does something weird in Travis CI, and times out for some reason 😭

@liyasthomas
Copy link
Member

Lemme bump dependencies and see whether is there any issue with the Cypress itself. Sorry for the inconveniences.

Was setting the response to an empty string. But this makes it show the correct error.
@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 081470d0-5840-11ea-b533-891a36a4ac0b

Should stick to semantic code here.. rather than doing the shorthand way
@dihmeetree
Copy link
Contributor Author

dihmeetree commented Feb 26, 2020

@AndrewBastin can you review this PR, when you have the time? Thank you!

@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: f633fef0-5842-11ea-b533-891a36a4ac0b

@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 0d758f10-5844-11ea-b533-891a36a4ac0b

@dihmeetree dihmeetree changed the title Improve GraphQL page state, and more GraphQL page improvements, and more Feb 26, 2020
@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: b84611a0-584c-11ea-b533-891a36a4ac0b

@TravisBuddy
Copy link

Hey @dmitryyankowski,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 7037f430-584e-11ea-b533-891a36a4ac0b

@liyasthomas liyasthomas merged commit 21e9959 into hoppscotch:master Feb 26, 2020
@liyasthomas liyasthomas removed the request for review from AndrewBastin February 26, 2020 06:43
@dihmeetree dihmeetree deleted the feature/fix-gql-state branch February 26, 2020 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants