-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Show dates on hover in JWT decoder #847
Conversation
Hello, Thank you for working on this request. I'm not really fan of the show on hover. I didn't add the human date format before, was looking for a way to display it without a hover maybe a small modal with a question mark to trigger it? |
Hello, Thanks @micahmo for this PR. I will join @btiteux on this. While I congratulate you for challenging the Monaco editor, I have 2 concerns about this tooltip approach:
I would suggest to display this information in a permanent manner, either:
The comment in the JSON might be enough, and might be the best approach from a layout aspect (this tool already has a quite complex UI), but again, I'm not sure whether this could cause any frustration or not. I'm opened to opinions. :) |
Hi @btiteux and @veler, thank you for the feedback and good conversation! I will briefly push back on the notion that new users will not discover the tooltip. Since this is the design used by (what I believe is) the most popular JWT decoding site, jwt.io, I think people might actually expect this behavior in DevToys. 😉 jwt.io.mp4Regardless, I totally understanding needing a different mechanism for accessibility and discoverability. I believe I can condense both of your suggestions as follows:
So my questions are:
Thanks again! |
+1 to all of this! I completely agree with you.
I think I will stay against for now. Even though I understand a good part of the population may know about it on jwt.io, I'm not fan of it. In addition, we are bleeding some extra options / info the I'm willing to re-evaluate this opinion in the future, perhaps for DevToys 2.0.
Yes! For DevToys 1.0 (and 2.0), I like the idea of an extra "Explanation" button. Although I'm not super enthusiastic about the name, but like the overall idea and can't think of anything else at the moment (maybe it will come to me later). Regarding adding this "Explanation" button, how about the following mecanism: It could be use like this: <CodeEditor>
<CodeEditor.OptionBarAdditionalContent>
<Button Content="Explanation" Click="OnClick"/>
</CodeEditor.OptionBarAdditionalContent>
</CodeEditor> This way, we could extend any other code editor in the future with extra options when it makes sense to do so. What do you think? |
Hey again, apologies for the delay on this! I tried a few different approaches and layouts, and I think this is the one I'd like to initially propose. Focusing just on the UI/UX, let me know what you think. If it's on the right path, I can clean things up and open a new PR. Thanks! I'm also happy to expoud on any of the design decisions (some of which were driven by technical limitations I hit). DevToys-JwtInfo-Demo.mp4 |
I love it! :D |
Thanks for the feedback! I will close this PR in favor of the rework in #864. I'll leave my branch for posterity in case it helps with tweaking Monaco in the future. |
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: #670
What is the new behavior?
This PR adds the ability to show understandable dates in a tooltip when hovering over a timestamp in a decoded JWT.
As mentioned in the bug, my JavaScript and understanding of the architecture is pretty weak, so feel free to reject this if it doesn't fit the current model.
Other information
DevToys-JWT-Demo.mp4
Quality check
Before creating this PR: