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
feat: add integration with AsyncAPI Server API #229
feat: add integration with AsyncAPI Server API #229
Conversation
✔️ Deploy Preview for modest-rosalind-098b67 ready! 🔨 Explore the source changes: e659201 🔍 Inspect the deploy log: https://app.netlify.com/sites/modest-rosalind-098b67/deploys/620a852424fc2a0008748cf4 😎 Browse the preview: https://deploy-preview-229--modest-rosalind-098b67.netlify.app |
Just a quick comment, I don't feel the However, you cant say |
I see, in that case @jonaslagoni and @magicmatatjahu, how about the following idea? Where is currently reads: Generate template based on AsyncAPI Document, how about changing it to Then underneath where it simply says Template, how about adding description text to it that reads |
Great! I'll add that :) However, what about node in dropdown? EDIT: Updated :) |
@magicmatatjahu Ah! For that drop down, I would do what @jonaslagoni suggested too and replace it with |
@magicmatatjahu looking good mate! I have a few questions, ideas and feedback around it, wondered what you thought? Template Selection NamingIt currently renders the package name (from what I can tell), I wonder if there is a more user-friendly way of showing this, without having to understand the package names etc? Some Ideas 👇 (not all there, but some) Think this might give more context for the user what they are doing? Hide params that are not required (with the option to show)When you select a template the user is shown the params for that template, I'm assuming some of these are optional ones? Is it possible to have only the required ones shown and "Advanced Options" for the optional ones. I think this could simplify the UX for people? Just a thought! Link to Package Docs when clicking a TemplateComing at some of these templates new, it's hard to understand what the options mean even tho the description is there. I wonder if a link to the GitHub repo/docs for the templates could help people gain details if they need it? These are just some thoughts after the initial look, wonder what you all think? |
a875f44
to
81a56b8
Compare
@boyney123 Thanks very much for that feedback! I propagated your ideas to code. Could you check? :) |
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 @magicmatatjahu ! Dropdown is great with the additional context! Not sure if it's just me but the Maybe something like this? What do you think @magicmatatjahu? Just an idea 🤔 |
@boyney123 Ok I propagated your suggestions :) Could you check again? |
9162942
to
0690373
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@mcturco @boyney123 Could you check final (I hope) implementation? 😄 |
@magicmatatjahu Hi 👋 It could just be me & my lack of spec knowledge, but the Advanced options in the modal for the HTML website seem a bit vague (I haven't looked through the options for the other outputs) I am wondering if we should add placeholder text to the inputs so there is an example of what parameter to use.
Maybe in
Just took a look at some of the other advanced options for different outputs... WOW there are a lot of options under Java Spring Project. Are these all necessary options? Are there any options that can get combined or show/hide based on server configuration? I am seeing Last note: I am seeing this as an "error" message in one of the output options. Shouldn't we properly spell out the protocol so that the user knows what to correct in their AsyncAPI file to make this error disappear? |
@mcturco Thanks for that awesome feedback! I'm a little remorseful that you wrote so much and the way it looks is due to a certain problem we're currently having in the https://github.com/asyncapi/generator side. I will describe it on the HTML Generation example. Every template (project that the Generator can generate) has a some set of available "parameters". For html there you have list of them https://github.com/asyncapi/html-template/blob/master/package.json#L78 as you can see you have only description, default value and information if given parameter is required or not ( Of course I agree with all the objections about the descriptions and that they should be better described, but this needs to be changed in the
We cannot make any placeholder because we don't know how data we can put in it 😞
Look above :) We need to support that asyncapi/generator#414 to achieve that.
Yeah we can make some mapping like
you may have several protocols that are required for a given template (like for java https://github.com/asyncapi/java-spring-template/blob/master/package.json#L74) that's why I think it's easier to display the list of supported protocols at the end of the sentence instead of in the middle :) Thanks again for that feedback and sorry you had to write so much! I hope that at least from my comment you understood how the parameters in the generator work :) |
@magicmatatjahu gotcha. I understand now that the Generator is the source for the options to render output, thank you for explaining that! Hmm I still think that we should consider the notes I left even if we have to do it in a separate PR for the generator. I just feel like the way the UX is now in the studio makes it hard for the user to know what to do to implement the advanced options, but we can of course do a usability test to see if thats just my opinion or if people will actually have a problem with how it is now. Sorry if I misunderstood what I was supposed to be reviewing 😅 |
No worries :) Good that you did this review because it shows that actually this UX is not working and it needs to be improved on the generator side to render the form better. However, I would like you to do a review if the UX itself (not taking into account those problems we have with parameters) is ok, so thank you very much! :) I will try tomorrow to implement this mapping |
@magicmatatjahu sure, no problem. But yeah I think it definitely is cool to see the generator working within Studio 😄 I think the option to download code is relatively easy to use (if we don't think about the potential issues that I brought up, haha) I say we should ship! 🚢 |
/rtm |
🎉 This PR is included in version 0.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
add
ServerAPI
serviceadd
GeneratorModal
:We can open it by clicking
Generate template
dropdown option:generate all available templates in our organization:
add script to generate JSON Schemas from template parameters (for each template) which we use to create form for passing parameters. In future it will be replaced by Define options for projects by JSON Schemas community#249 solution
Related issue(s)
Part of #86