-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
b22ac19
initial comit
KhudaDad414 47a6e20
resolve build errrors
KhudaDad414 c45a6fe
fix linting issues
KhudaDad414 ab31f98
ignore sonar for two components
KhudaDad414 05bc587
Create giant-bulldogs-pretend.md
KhudaDad414 98d78e2
add key press listener
KhudaDad414 66d6f6f
fix sonar
KhudaDad414 d262372
Merge branch 'master' into use-nextjs
KhudaDad414 433862b
regenerate package-lock
KhudaDad414 3672625
Merge branch 'master' into use-nextjs
KhudaDad414 dc62137
Merge branch 'master' into use-nextjs
KhudaDad414 936ca50
fix logo
KhudaDad414 63d9e9b
Merge branch 'master' into use-nextjs
KhudaDad414 cd53b5e
Merge branch 'master' into use-nextjs
KhudaDad414 2c1f515
Merge branch 'master' into use-nextjs
KhudaDad414 5301f0e
make changes to layout.
KhudaDad414 a4070b3
fix tooltip
KhudaDad414 67cd22f
Merge branch 'master' into use-nextjs
KhudaDad414 c15a013
merge master
KhudaDad414 7edbcd8
Merge branch 'master' into use-nextjs
KhudaDad414 68a61e9
update pnpm-lock
KhudaDad414 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"studio-next": patch | ||
--- | ||
|
||
Use Next.js framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Disable specific file since it would introduce more complexity to reduce it - mainly code complexity and complex template literals | ||
sonar.exclusions=apps/studio/public/js/monaco/**,apps/studio/src/tailwind.css,apps/studio/src/components/SplitPane/** | ||
# Disable duplicate code in tests since it would introduce more complexity to reduce it. | ||
sonar.cpd.exclusions=apps/studio/** | ||
sonar.cpd.exclusions=apps/studio/**,apps/studio-next/src/components/Navigationv3.tsx,apps/studio-next/src/components/Navigation.tsx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,41 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {} | ||
const nextConfig = { | ||
webpack: ( | ||
config, | ||
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack } | ||
) => { | ||
config.module.rules.push({ | ||
test: /\.yml$/i, | ||
type: 'asset/source', | ||
}) | ||
|
||
if (isServer) return config | ||
// Important: return the modified config | ||
config.resolve.fallback = { | ||
...config.resolve.fallback, | ||
assert: require.resolve('assert/'), | ||
buffer: require.resolve('buffer'), | ||
http: require.resolve('stream-http'), | ||
https: require.resolve('https-browserify'), | ||
path: require.resolve('path-browserify'), | ||
stream: require.resolve('stream-browserify'), | ||
zlib: require.resolve('browserify-zlib'), | ||
url: require.resolve('url/'), | ||
util: require.resolve('util/'), | ||
debug: false, | ||
canvas: false, | ||
fs: false, | ||
} | ||
|
||
config.plugins.push( | ||
new webpack.ProvidePlugin({ | ||
process: 'process/browser', | ||
Buffer: ['buffer', 'Buffer'], | ||
}) | ||
); | ||
|
||
return config | ||
}, | ||
} | ||
|
||
module.exports = nextConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Redirect editor.asyncapi.org to Studio | ||
|
||
http://editor.asyncapi.org/* https://studio.asyncapi.com 301! | ||
https://editor.asyncapi.org/* https://studio.asyncapi.com 301! | ||
|
||
# Redirect playground.asyncapi.io to Studio | ||
|
||
http://playground.asyncapi.io/* https://studio.asyncapi.com/?redirectedFrom=playground 301! | ||
https://playground.asyncapi.io/* https://studio.asyncapi.com/?redirectedFrom=playground 301! | ||
|
||
http://playground.asyncapi.io/* load=:load https://studio.asyncapi.com/?redirectedFrom=playground&load=:load 301! | ||
https://playground.asyncapi.io/* load=:load https://studio.asyncapi.com/?redirectedFrom=playground&load=:load 301! | ||
http://playground.asyncapi.io/* load=:load readOnly=:readOnly https://studio.asyncapi.com/?redirectedFrom=playground&load=:load&readOnly=true 301! | ||
https://playground.asyncapi.io/* load=:load readOnly=:readOnly https://studio.asyncapi.com/?redirectedFrom=playground&load=:load&readOnly=true 301! | ||
|
||
http://playground.asyncapi.io/* url=:url https://studio.asyncapi.com/?redirectedFrom=playground&url=:url 301! | ||
https://playground.asyncapi.io/* url=:url https://studio.asyncapi.com/?redirectedFrom=playground&url=:url 301! | ||
http://playground.asyncapi.io/* url=:url readOnly=:readOnly https://studio.asyncapi.com/?redirectedFrom=playground&url=:url&readOnly=true 301! | ||
https://playground.asyncapi.io/* url=:url readOnly=:readOnly https://studio.asyncapi.com/?redirectedFrom=playground&url=:url&readOnly=true 301! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@KhudaDad414 why codemirror is revered. It was added by @Shurtu-gal in #997
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 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.