Skip to content
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: Use Next.js in studio-next #1062

Merged
merged 21 commits into from May 17, 2024
Merged

Conversation

KhudaDad414
Copy link
Member

@KhudaDad414 KhudaDad414 commented Apr 3, 2024

Description

  • this PR ports the studio from CRA to Next.js.
  • it should compile and run in the dev environment.
  • It should build without issues.

Some known issues and possible improvements:

  • docker container file is missing in studio-next.
  • tests are missing in studio-next after NEXT.JS migration.
  • Code generation doesn't work in studio-next.
  • Use CodeMirror instead of Monaco.

fixes #684

Copy link

changeset-bot bot commented Apr 3, 2024

🦋 Changeset detected

Latest commit: 68a61e9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
studio-next Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Apr 3, 2024

Deploy Preview for modest-rosalind-098b67 ready!

Name Link
🔨 Latest commit 68a61e9
🔍 Latest deploy log https://app.netlify.com/sites/modest-rosalind-098b67/deploys/664740c0dde50a000867c85c
😎 Deploy Preview https://deploy-preview-1062--modest-rosalind-098b67.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 3, 2024

Deploy Preview for asyncapi-studio-design-system ready!

Name Link
🔨 Latest commit 68a61e9
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-studio-design-system/deploys/664740c03706430008fd2542
😎 Deploy Preview https://deploy-preview-1062--asyncapi-studio-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 3, 2024

Deploy Preview for studio-next ready!

Name Link
🔨 Latest commit 68a61e9
🔍 Latest deploy log https://app.netlify.com/sites/studio-next/deploys/664740c01adc340008c35af7
😎 Deploy Preview https://deploy-preview-1062--studio-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@smoya
Copy link
Member

smoya commented Apr 10, 2024

@KhudaDad414 Besides this PR, is anything else required to have Studio working on Next-JS ? I mean, If we merge this "today", will everything work out of the box?

@KhudaDad414
Copy link
Member Author

@smoya Yes, it should work as expected.

@smoya
Copy link
Member

smoya commented Apr 16, 2024

@smoya Yes, it should work as expected.

I hope this gets merged soon 🤞

@@ -9,25 +9,80 @@
"lint": "next lint"
},
"dependencies": {
"@codemirror/state": "^6.4.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KhudaDad414 why codemirror is revered. It was added by @Shurtu-gal in #997

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a great idea to push for the CodeMirror at this stage. Migrating to CodeMirror would make the task much much more challenging and this task is already huge.

The CodeMirror was added as a separate code editor and it wasn't configured with the codebase in any shape or form. I imagine integrating a new code editor with our codebase would also be challenging.

here is what I am suggesting: the code is there in the history, let's go ahead with Monaco we can swap the code editor as part of the bounty issue.

TLDR; migration is already complicated enough let's switch to CodeMirror after we migrate to NEXT.

@Amzani
Copy link
Collaborator

Amzani commented Apr 22, 2024

Looks like we don't have the logo, do you reproduce as well ?
Screenshot 2024-04-22 at 15 29 18

@KhudaDad414 KhudaDad414 mentioned this pull request Apr 24, 2024
11 tasks
@KhudaDad414
Copy link
Member Author

@Amzani it show up as expected now.

@smoya
Copy link
Member

smoya commented Apr 29, 2024

At a quick glance, I found some differences between versions.

The height of the app is not adjusted in the deploy preview. The Settings button is hidden unless you scroll down (at least in my native MacBook resolution). Same happens with the "errors" and "warnings" bar.

Current production version (https://studio.asyncapi.com):
Google Chrome_Ni6BwwDx@2x

This new version (https://deploy-preview-1062--studio-next.netlify.app/):

Google Chrome_qlE6v65C@2x

The tooltips on the navigation bar differ from one version an the other:

Current production version (https://studio.asyncapi.com):
Google Chrome_LeCqj1vz@2x

This new version (https://deploy-preview-1062--studio-next.netlify.app/):
Google Chrome_PDZuR78z@2x

Additionally, font size or space differs from one version to the other:

Google Chrome_y8OM9V1b

@KhudaDad414
Copy link
Member Author

@smoya thanks for the review. 🙇 I can replicate the issues. will make the appropriate changes.

@smoya
Copy link
Member

smoya commented Apr 29, 2024

@smoya thanks for the review. 🙇 I can replicate the issues. will make the appropriate changes.

Nooice! BTW didnt test all functionalities, but just checked the appeal of the page. Meaning it could have more issues (or not).

@KhudaDad414
Copy link
Member Author

@smoya done. please take a look when you have the time.

@KhudaDad414 KhudaDad414 requested a review from Amzani April 29, 2024 12:32
@Amzani
Copy link
Collaborator

Amzani commented Apr 29, 2024

Tested on my side, looks good so far.
We should add some functional tests at some points using cypress, created a Pitch for it: #1091

Copy link

sonarcloud bot commented May 17, 2024

Quality Gate Passed Quality Gate passed

Issues
124 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.1% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator

@Amzani Amzani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KhudaDad414
Copy link
Member Author

/rtm

@asyncapi-bot asyncapi-bot merged commit a4b7fd1 into asyncapi:master May 17, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Minimal studio App with a working editor and AsyncAPI documentation
4 participants