-
-
Notifications
You must be signed in to change notification settings - Fork 765
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: implement redesign of the home page #3600
base: master
Are you sure you want to change the base?
Changes from 11 commits
819eed4
5b6f3e8
dacfb0e
ac7ba66
3ca81ae
b7af448
9f7a7ba
51532c0
77cfdaa
085eebf
d13efa6
d4c788d
06c159f
230e73e
1828f53
71399a6
d069e29
6945b80
4f2980e
f9a5d2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* @description Renders the content related to AsyncAPI in a styled div container. | ||
* This is used as the default content for the "AsyncAPI Document" tab in the DemoAnimation component. | ||
*/ | ||
|
||
export default function renderAsyncAPIContent() { | ||
return ( | ||
<div className="font-mono text-sm text-[#98c379] leading-relaxed"> | ||
content here | ||
</div> | ||
) | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* @description Renders the content related to code generation in a styled div container. | ||
* This is used as the content for the "Code Generation" tab in the DemoAnimation component. | ||
*/ | ||
|
||
export default function renderCodeGeneration() { | ||
return ( | ||
<div className="font-mono text-sm leading-relaxed"> | ||
<h1 className="text-[#98c379]">content here</h1> | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add proper content instead of placeholder text. The component currently displays a placeholder text "content here". Since this is part of the demo animation showcasing code generation features, it should contain meaningful content demonstrating the actual code generation capabilities. Would you like me to help generate sample content that demonstrates code generation features? 🧰 Tools🪛 eslint[error] 8-8: Replace (prettier/prettier) [error] 8-8: Unexpected usage of doublequote. (jsx-quotes) [error] 9-9: Replace (prettier/prettier) [error] 9-9: Unexpected usage of doublequote. (jsx-quotes) [error] 10-10: Replace (prettier/prettier) |
||
) | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,70 @@ | ||||||
import React, { useState } from 'react'; | ||||||
import renderAsyncAPIContent from './AsyncAPIcontent'; | ||||||
import renderCodeGeneration from './CodeGeneration'; | ||||||
import renderDocumentation from './Documentation'; | ||||||
import Container from '../layout/Container'; | ||||||
|
||||||
/** | ||||||
* @description A React component that displays a demo animation interface with three tabs: | ||||||
* "AsyncAPI Document," "Code Generation," and "Documentation." The content of each tab | ||||||
* dynamically updates based on the active tab selected by the user. | ||||||
* | ||||||
*/ | ||||||
|
||||||
export default function DemoAnimation() { | ||||||
const [activeTab, setActiveTab] = useState('AsyncAPI Document'); | ||||||
const tabs = ['AsyncAPI Document', 'Code Generation', 'Documentation']; | ||||||
|
||||||
|
||||||
/** | ||||||
* @description Determines and renders the content for the currently active tab. | ||||||
*/ | ||||||
|
||||||
const renderContent = () => { | ||||||
switch (activeTab) { | ||||||
case 'Code Generation': | ||||||
return renderCodeGeneration(); | ||||||
case 'Documentation': | ||||||
return renderDocumentation(); | ||||||
default: | ||||||
return renderAsyncAPIContent(); | ||||||
} | ||||||
}; | ||||||
|
||||||
return ( | ||||||
<div className="relative left-1/2 right-1/2 -mx-[50vw] w-screen bg-blue-100 p-6 font-sans"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optimize Tailwind CSS classes. The pipeline indicates issues with Tailwind CSS classes: - <div className="relative left-1/2 right-1/2 -mx-[50vw] w-screen bg-blue-100 p-6 font-sans">
+ <div className="relative inset-x-1/2 mx-[-50vw] w-screen bg-blue-100 p-6 font-sans"> 📝 Committable suggestion
Suggested change
🧰 Tools🪛 eslint[error] 35-35: Replace (prettier/prettier) [error] 35-35: Unexpected usage of doublequote. (jsx-quotes) 🪛 GitHub Actions: PR testing - if Node project[warning] 35-35: Multiple Tailwind CSS issues: Arbitrary value '-mx-[50vw]' should not start with dash, and classnames 'left-1/2, right-1/2' could use 'inset-x-1/2' shorthand |
||||||
<Container> | ||||||
<h1 className="text-2xl font-medium text-center mb-2"> | ||||||
Sneak Peek Into The Real Process | ||||||
</h1> | ||||||
<p className="text-center text-gray-600 text-sm mb-6"> | ||||||
One of our main goals is to improve the current state of Event<br /> | ||||||
Driven Architecture (EDA!) | ||||||
</p> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Localize hardcoded strings. Text strings should be localized for better internationalization support: - Sneak Peek Into The Real Process
+ {t('landing-page.demo.title')}
</h1>
<p className="text-center text-gray-600 text-sm mb-6">
- One of our main goals is to improve the current state of Event<br />
- Driven Architecture (EDA!)
+ {t('landing-page.demo.description')}
</p>
🧰 Tools🪛 eslint[error] 40-40: Replace (prettier/prettier) [error] 40-40: Unexpected usage of doublequote. (jsx-quotes) [error] 41-41: Replace (prettier/prettier) [error] 42-42: Insert (prettier/prettier) [error] 43-43: Insert (prettier/prettier) |
||||||
|
||||||
<div className="flex flex-wrap mb-4 bg-black rounded-lg overflow-hidden"> | ||||||
{tabs.map((tab) => ( | ||||||
<button | ||||||
key={tab} | ||||||
className={`flex-1 py-2 px-4 m-2 text-center rounded text-sm transition-colors duration-200 ${activeTab === tab | ||||||
? 'bg-white text-black' | ||||||
: 'bg-gray-700 text-gray-300 hover:bg-gray-800' | ||||||
}`} | ||||||
onClick={() => setActiveTab(tab)} | ||||||
> | ||||||
{tab} | ||||||
</button> | ||||||
))} | ||||||
</div> | ||||||
|
||||||
<div className="bg-[#1a1b26] rounded-lg p-6 min-h-[400px] transition-all duration-200"> | ||||||
<div className="overflow-auto max-w-full"> | ||||||
<div className="overflow-x-auto whitespace-pre-wrap"> | ||||||
{renderContent()} | ||||||
</div> | ||||||
</div> | ||||||
</div> | ||||||
</Container> | ||||||
</div> | ||||||
); | ||||||
}; |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,12 @@ | ||||||||||||||||||||||||||||||
/** | ||||||||||||||||||||||||||||||
* @description Renders the documentation content in a styled container. | ||||||||||||||||||||||||||||||
* This is used as the content for the "Documentation" tab in the DemoAnimation component. | ||||||||||||||||||||||||||||||
*/ | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
export default function renderDocumentation() { | ||||||||||||||||||||||||||||||
return ( | ||||||||||||||||||||||||||||||
<div className="text-white font-sans"> | ||||||||||||||||||||||||||||||
<h1 className="text-xl font-semibold mb-4">Documentation</h1> | ||||||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix syntax and adhere to code style guidelines There are several issues in this function:
Apply this diff to correct the issues: -export default function renderDocumentation() {
- return (
- <div className="text-white font-sans">
- <h1 className="text-xl font-semibold mb-4">Documentation</h1>
- </div>
- )
-}
+export default function renderDocumentation() {
+ return (
+ <div className='text-white font-sans'>
+ <h1 className='text-xl font-semibold mb-4'>Documentation</h1>
+ </div>
+ );
+} 📝 Committable suggestion
Suggested change
🧰 Tools🪛 eslint[error] 7-7: Delete (prettier/prettier) [error] 8-8: Replace (prettier/prettier) [error] 8-8: Unexpected usage of doublequote. (jsx-quotes) [error] 9-9: Replace (prettier/prettier) [error] 9-9: Unexpected usage of doublequote. (jsx-quotes) [error] 10-10: Replace (prettier/prettier) [error] 11-11: Replace (prettier/prettier) [error] 11-12: Missing semicolon. (semi) [error] 12-12: Newline required at end of file but not found. (eol-last) [error] 12-12: Insert (prettier/prettier) 🪛 GitHub Actions: PR testing - if Node project[warning] 6-6: Missing JSDoc comment |
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.
Correct function syntax and code style issues
The function has several problems:
Apply this diff to fix the issues:
📝 Committable suggestion
🧰 Tools
🪛 eslint
[error] 7-10: Replace
··return·(⏎········<div·className="font-mono·text-sm·text-[#98c379]·leading-relaxed">⏎··········content·here⏎········</div>
withreturn·<div·className='font-mono·text-sm·text-[#98c379]·leading-relaxed'>content·here</div>;
(prettier/prettier)
[error] 8-8: Unexpected usage of doublequote.
(jsx-quotes)
[error] 11-11: Replace
····)
with}
(prettier/prettier)
[error] 11-12: Missing semicolon.
(semi)
[error] 12-12: Delete
}
(prettier/prettier)
[error] 12-12: Newline required at end of file but not found.
(eol-last)