-
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 additional JWT info #864
Conversation
src/dev/impl/DevToys/ViewModels/Tools/EncodersDecoders/JwtDecoderEncoder/JwtClaim.cs
Show resolved
Hide resolved
src/dev/impl/DevToys/Views/Tools/EncodersDecoders/JwtDecoderEncoder/JwtDecoderControl.xaml
Show resolved
Hide resolved
src/dev/impl/DevToys/Views/Tools/EncodersDecoders/JwtDecoderEncoder/JwtDecoderControl.xaml.cs
Outdated
Show resolved
Hide resolved
Alright, I (finally) gave a try at the PR (so sorry for taking so long, focusing on DevToys 2.0 + my personal life on the side takes a lot of time). It remains one "tiny" sizing issue on which I'm a little picky. Here is the issue. and it sounds related to everything we mentioned previously: Recording.2023-06-27.215601.mp4I can also still reproduce the issue you demoed in the video in the previous comment, unfortunately. Do you reproduce it on your side too beside the In the end, this PR is already super great and I don't think it's a blocker for merging it, but it would be amazing if we could address is before though (just to make it perfect). What do you think? |
No worries whatsoever, I appreciate the tool and having the chance to contribute just a little. 😊 BTW, after this and #859 I would probably be done for a little while if you wanted to make a release (I'm not trying to dictate your release schedule or anything like that, just saying I added most of the things I wanted 😆).
The issue you demonstrated is actually unrelated to anything we've talked about so far. In this case, you are giving the Let me see if there are any more hacky solutions I can come up with for this. 😆 |
Oh what I was referring to in fact is that the code editor on the left doesn't shrink at all as we make the window height smaller when the data grid is displayed, but does when the code editor on the right is displayed. |
Ah I totally missed that. I was so focused on the right side! Yes, I can reproduce that too. Good catch! I will take a look. |
@veler I've been meaning to ask you, when you run DevToys in debug mode, does it take a long time for the Monaco editor to load? For example, when I click on the JWT tool, it takes about 1.25 minutes while the editors spin until the UI is responsive. Is this normal or maybe I'm doing something wrong? |
Not sure if "normal" but I always hit it too. There's a LOT happening to load Monaco due to the whole interop we need to do between the C# code and the JavaScript int he WebView. Even without debugger attached it takes 1-2 seconds to load (and we have loads of complain about it). My recommendation is that, when possible, start DevToys without Debugger, then attach the debugger through Good news though: in DevToys 2.0, it takes ~50ms to load, whether you are with the debugger attached or not 🙌 |
Hi @veler, thanks for your patience on this. I have been working off and on for the past few days, but unfortunately, I can't get it to work as desired. The closest I could get was pulling the I believe we have the following options at this point.
Again, I hate giving up, but I would rather move on than sink too much time into this one. 😊 |
No worries :D Thank you so much for trying hard on it. I took a brief look and I admit I don't see an easy solution either. Thank you so much for this again! We love your contributions 😍 |
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Numbers: #607 and #670
What is the new behavior?
This PR adds the ability to show additional information about a decoded JWT. Key features are...
Other information
There are several things to mention about this implementation.
CodeEditor
. However the info control itself can be set via a DependencyProperty, and theCodeEditor
will show whatever's there.Luckily, I ran across Row Details and I thought it would be the perfect compromise of having a nice clean grid initially with easy access to the descriptions. One quirk here is that I would expect clicking the row again to toggle the details off, but it doesn't. Maybe some special code can be added in the future to do that.
CustomTextBox
(aBorder
whose size controls theTextBox
's size), I also had to add another trick. When expanding or collapsing the addiitonal info view, I quickly toggle on theCodeEditor
. Without this, theBorder
has the wrong size. This does occasionally create a very small visual artifact, but it's the only way I could get the sizing to be solid.DevToys-JwtInfo-Demo.mp4
Quality check
Before creating this PR: