-
Notifications
You must be signed in to change notification settings - Fork 926
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
Lift up debug page #4599
Lift up debug page #4599
Conversation
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.
Overall, looks good! Left minor comments.
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 once @ikhoon's comments are addressed. 😉
Just made a little more artistic touch here: Now empty space is being used more efficiently. Full changelog:
|
@@ -161,7 +179,7 @@ const DebugPage: React.FunctionComponent<Props> = ({ | |||
if (useRequestBody) { | |||
if (urlParams.has('request_body')) { | |||
urlRequestBody = jsonPrettify(urlParams.get('request_body')!); | |||
scrollToDebugForm(); | |||
setDebugFormIsOpen(true); |
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.
In addition to request_body
, headers
, endpoint_path
and queries
could be set to urlParams
. How about showing the debug form if urlParams
has values?
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 good to me! Thanks @Dogacel ! 🙇 👍 🚀
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.
Thanks, @Dogacel! 🙇♂️
Would you mind resolving the conflicts?
Sure, I was OOO for almost 2 weeks for travel. I will take a look when I am avail. I will re-test them too sometimes resolving conflicts are not enough by itself. I'll post my update tomorrow 😉 |
Fixed a bug that caused debug form to open up whenever a method is clicked. Re-tested and merged latest master now it is working fine. |
I found out that it causes another regression that a debug form is closed immediately when submit button is clicked. I tested it by setting |
We are about to release a new version. Let me reschedule this to 1.23.0. 🙇♂️ |
This should fix setDebugFormIsOpen(isOpen => isOpen || urlRequestBody !== '' || urlQueries !== '' ||); If form is already opened, URL parameters shouldn't affect the state because of Sending the updated commit... Edit: I have reproduced & fixed the issue with this last commit. Thanks for the heads up 😄 |
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.
Beautiful work! 👨🎨 💯
Motivation:
Debug page is not very easy navigate, it is in the bottom most part of the application. I think debug page can have its own page, so I have implemented a pop-up that allows you to open debug page (more like a form) while browsing.
Modifications:
Debug
button near the method name for easier access which opens a pop-upSubmit
andCopy as cURL
buttons stick to the bottom now.Screen.Recording.2022-12-31.at.14.24.18.mov
Result:
Future improvements:
We are close to implementing
JSONSchema
support in Armeria. I think this will greatly improve the way developers write code inside the debug form, they won't even need to close the debug form to check the method body because IDE will provide comments + autocomplete features.