-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Adding deprecated warning icon/message in graphQL docs #2749
Conversation
Nice work 🎉 Is it possible to use the exclamation triangle instead of a circle to better signify more of a warning to the end user? |
There's a https://storybook.insomnia.rest/?path=/story/iconography-core-icons--reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks for the PR!
const deprecatedFieldDescription = field => | ||
`The field ${field.name} is deprecated. ${field.deprecationReason}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please could you move the creation of this function out of the render flow, so that the function is not recreated on every render?
- Please add speech marks around the field name (like
The field "currentUser" is deprecated...
) to make it a little clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one. Do you know why the spacing looks a little off with the icon? I wonder if there is a rogue style being applied, adding padding/margin or something 🤔
8614316
to
73876ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
packages/insomnia-app/app/ui/components/graph-ql-explorer/graph-ql-explorer-type.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, just tried it out against one of our APIs 👍
Thank you for taking the time to implement this!
This PR is adding a warning icon to every deprecated field shown in the GraphQL schema explorer, also the deprecating reason is being shown in the icon tooltip. It closes #1831