-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
chore: add convert functionality #100
chore: add convert functionality #100
Conversation
@boyney123 Do you wanna make small review? :) I cannot assign you to reviewers because you don't yet in organization :( Talk about this with Łukasz. |
Cool yeah will do @magicmatatjahu |
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.
I have no comments for this PR 👍
On a side-note, is it possible we can integrate preview workflow, as the website has, for PR's, so we don't have to download and run in manually?
@jonaslagoni Thanks! As far as I know Netlify even on the Open Source plan has the ability to configure previews for repositories in the same organization, but I would have to have admin privileges to do that I will talk to Łukasz. |
Cool, just got it running locally and read the code. Most of it looked fine to me, (I would have to get my head around hookstate and the services pattern used, but no a problem). There were a few things I noticed when using it: See which version you are currently onVery minor thing, and you would hope the user knows what version they are currently on, but maybe in this modal we could show that the user is on version x going to be bumped to version y. Again minor here, but maybe the versions should go from high to low? Example
No way to go between versionsI guess maybe why would you want to do this, but if I convert my spec, there is no way to convert it back, but I guess this is out of scope and maybe not even required??..... Import base64I entered random values and got a success message And my document is gone Maybe we could valididate the value somehow and allow do the processing if its valid? TestsTests look cool for the services, just wondering how the project goes or will go about testing components (or if you intend too?) Cheers! |
@boyney123 Thanks for review!
I can render currently version in the title :) I will show you my idea in few minutes.
Good idea 👍🏼 I will propagate it.
It's out of scope task and we don't support such a thing in our converter. I don't see any advantages to convert to older version - in
I know about this problem, but it works in "similar" way like normal IDE and our parser. You can pass some invalid AsyncAPI doc and you will have appropriate error (you can see in terminal when you click block under editor), that
Tests for components will be, but as you can see the components themselves use services underneath that have business logic implemented - using state, effects is as little as possible etc. This is something I hate in front-end, because testing components is always 90% mocking. If we go in the direction of modules - asyncapi/asyncapi-react#433 - then the services themselves will be connected to the IOC container and they will be created dynamically in the runtime, not like now that everything is a static singleton and testing of components will be simplified. Services in the components will then look like: const Component: () => {
const specService = useInject(SpecificationService);
...
} At the moment there is no point in waiting with the modules implementation because the Studio would be implemented next year 😆 and it is better to release something and then improve it. Switching to modules should take one day, or even less, and the static services themselves do not currently cause many problems :) |
@boyney123 My proposition :) |
Thanks @magicmatatjahu
haha yeah tell me about it 😅
Ah yeah, no problem I will read about the modules sounds interesting for sure!
Yeah it's a bit weird, for some reason I just expected to be able to do it but think that was just YOLO time, me clicking around. If I get any use case will raise it for sure! |
@boyney123 So I guess that everything is good, or you wanna add something more? |
Kudos, SonarCloud Quality Gate passed! |
Let's go @magicmatatjahu 🚀 |
Description
convert
base64
- new node in the editor dropdownRelated issue(s)
See also #80