Repository navigation
feat: move template selection into modal UI - #201
asyncapi-bot merged 18 commits into
Conversation
|
✔️ Deploy Preview for modest-rosalind-098b67 ready! 🔨 Explore the source changes: 14273f1 🔍 Inspect the deploy log: https://app.netlify.com/sites/modest-rosalind-098b67/deploys/61fa9bafdd9a6b0007e98abb 😎 Browse the preview: https://deploy-preview-201--modest-rosalind-098b67.netlify.app/ |
|
Love it! Question: could we do a solid line instead of dash-style for the selected template so it becomes more visible (only for the selected template)? |
magicmatatjahu
left a comment
There was a problem hiding this comment.
First of all, awesome! Thanks for fast contribution! But I have two problems:
- we shouldn't make active nav item in the navigation, when someone click on that nav item. It doesn't look good for me. We should only open modal.
- we shouldn't indicates that we "create" new file by templates, but use template, atm we don't create new file but reuse templates, so please change all occurences of "creating file" to the "use" or "reuse" - I made suggestion for that :)
And also please propagate suggestion from @smoya
to add to this suggestion by @smoya, I would also prefer that the inactive template card have a solid line as well. The light gray alone will be enough for the user to know that it is inactive. :) |
Co-authored-by: Maciej Urbańczyk <[email protected]>
Co-authored-by: Maciej Urbańczyk <[email protected]>
…yney123/studio into moving-template-selection-into-modals
|
Thanks @smoya , @mcturco @magicmatatjahu
Thanks @smoya and @mcturco , good ideas. That has been changed.
Thanks @magicmatatjahu , think I have fixed that returning {
name: 'newFile',
state: () => false,
icon: <VscNewFile className="w-5 h-5" />,
},
Yeah good point mate. Changes made. Let me know if you have any more thoughts folks 👍 |
|
Hey @boyney123! I am still seeing the dashed lines on the inactive templates. The solid border on the selected template looks great!! 😄 I was thinking that it would look more uniform if we kept the borders solid for all of them, but if we don't think that looks good we don't have to do that!! |
Yeah, it should works :) |
Sorry @mcturco I forgot to push up my changes 😅 , try again 🤞 🙏 |
|
@boyney123 You should rebase your PR with master branch to resolve merge conflicts ( |
This is due to npm version mismatch. Just checkout More about this: asyncapi/parser-js#427 |
|
Awesome @boyney123!! Looks great 🎉 |
|
SonarCloud Quality Gate failed.
|
|
Thanks folks. Thanks @smoya , yeah I have no idea what is going on with the lock file, as nothing has changed, I just reused the file from the master branch as suggested. |
|
@boyney123 I bumped npm to v8 and from v7 there is a new version and structure of package-lock (you probably use npm v6), Sergio created issue for that asyncapi/parser-js#427 Please also fix the duplication of code - https://sonarcloud.io/component_measures?id=asyncapi_studio&metric=new_duplicated_lines_density&pullRequest=201&selected=asyncapi_studio%3Asrc%2Fcomponents%2FModals%2FNewFileModal.tsx&view=list - and I will accept :) |
|
Fixed duplication thanks for the review @magicmatatjahu and @BOLT04 Think it's ready for review again.
Also another node.... I upgraded to npm |
|
@boyney123 That label is added to packages installed from |
magicmatatjahu
left a comment
There was a problem hiding this comment.
Awesome!
I found two bugs:
- when I don't have selected template I can click
Use Templateand it replaces my current AsyncAPI spec with empty content, you can test it :) We should disable theUse Templatebutton when user doesn't select template. - another is described in the separate comment.
Just these two things for me aren't acceptable, rest is ok :)
| {viewType === 'visualiser' && <VisualiserTemplate />} | ||
| </SplitPane> | ||
| } | ||
| {newFileEnabled && <NewFileModal />} |
There was a problem hiding this comment.
All our modals has that nice enter animation (like settings on the bottom left corner) but templates hasn't and here is a problem. You always destroy and create new React node when user will open that model. I think that we should fix that by:
| {newFileEnabled && <NewFileModal />} | |
| <NewFileModal /> |
but we have to "watch" for change newFileEnabled in the NewFileModal component and change show prop to the show={newFileEnabled}.
|
Kudos, SonarCloud Quality Gate passed!
|
|
@boyney123 I applied my suggestions :) Could you check if you accept it and we can merge it :) |
|
Thank you @magicmatatjahu yeah looks OK to me, just checked your changes and happy with them. I can't approve the PR as I'm the author so guess this comment is the approval 🤣👍 |
|
@mcturco Do you accept current solution? |
|
@magicmatatjahu yes, I actually just tested it and was about to write a comment that it looks good to me!! 🎉 |
|
/rtm |
|
🎉 This PR is included in version 0.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |











Description
Related to issue #198
Moved the template selection into a modal now rather than it's own page.
To make this work I had some make some minor changes:
Changes
UI: When user does not select anything
UI: When user selects something
Selecting a template then clicking "Create" will do as expected and render the new AsyncAPI file into the studio.
Let me know what you think @smoya , @magicmatatjahu @mcturco , hopefully this fixes the problem.