-
-
Notifications
You must be signed in to change notification settings - Fork 752
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: migrate layout and campaigns #2743
Conversation
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
.eslintrc
Outdated
@@ -26,8 +26,7 @@ | |||
"error", | |||
{ | |||
"code": 120, | |||
"ignoreUrls": true, | |||
"ignorePattern": "*className=([\\s\\S]*?)*" // Ignore classnames |
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.
We should have this line because there are tailwind classNames inside components, where we don't want to create an error if the maxlen rule is not followed.
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.
IMO we should disable this max-len rule. I disabled it in my PR since some classNames
were greater than 120 characters but there was still an error.
Though, is there any example case where max-len rule would actually help us?
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.
Yeah, I was facing a lot of problems too. Hence I had added this in my previous PR. However as eslint was still throwing errors, I removed it.
Sth can be done about max-len though as tailwind classNames get really big.
@akshatnema the navigation components are being done by @vishvamsinh28 so DocsLayout would have to wait until then. |
@akshatnema @Shurtu-gal will open pr for navigation by tomorrow night |
/* eslint-disable no-unused-vars */ | ||
/* eslint-disable unused-imports/no-unused-vars */ |
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.
Why these rules are disabled?
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.
campaigns are not part of this migration PR. Why are we making these component files in this PR?
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.
This is because they are being used by layouts.
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.
Comment those particular lines where they are about to get used.
config/adopters.json
Outdated
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.
Kindly remove the unnecessary changes in the PR.
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.
Sure.
pages/_app.tsx
Outdated
</div> | ||
<AppContext.Provider value={{ path: router.asPath }}> | ||
<Head> | ||
<script async defer src='https://buttons.github.io/buttons.js'></script> |
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.
Why are we adding this script tag?
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.
Actually this was there before too, in the master branch.
return <GenericPostLayout post={post as unknown as IPosts['blog'][number]}>{children}</GenericPostLayout>; | ||
} | ||
|
||
return children as JSX.Element; |
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.
return children as JSX.Element; | |
return children as React.ReactNode; |
|
||
return ( | ||
<GenericPostContext.Provider value={{ post }}> | ||
<AnnouncementHero className='m-4 text-center' small={true} /> |
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.
You can comment out this line and better exclude the campaigns components from this PR.
components/layout/BlogLayout.tsx
Outdated
/* eslint-disable unused-imports/no-unused-vars */ | ||
/* eslint-disable no-unused-vars */ |
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.
Why are we disabling these rules for whole file?
|
||
/** | ||
* @description The banner to use for Announcement | ||
* @param {String} props.title - The title of the banner |
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.
Use string
here. Applicable on all files.
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.
Done
components/TOC.tsx
Outdated
* @param className - The class name of the TOC | ||
* @param cssBreakingPoint - The CSS breaking point of the TOC | ||
* @param toc - The table of contents | ||
* @param contentSelector - The content selector | ||
* @param depth - The depth of the TOC |
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.
Specify the types of params here.
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.
Done
components/Head.tsx
Outdated
* @param {String} props.title - The title of the page | ||
* @param {String} props.description - The description of the page | ||
* @param {String} props.image - The image of the page | ||
* @param {String} props.rssTitle - The RSS title of the page | ||
* @param {String} props.rssLink - The RSS link of the page |
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.
* @param {String} props.title - The title of the page | |
* @param {String} props.description - The description of the page | |
* @param {String} props.image - The image of the page | |
* @param {String} props.rssTitle - The RSS title of the page | |
* @param {String} props.rssLink - The RSS link of the page | |
* @param {string} props.title - The title of the page | |
* @param {string} props.description - The description of the page | |
* @param {string} props.image - The image of the page | |
* @param {string} props.rssTitle - The RSS title of the page | |
* @param {string} props.rssLink - The RSS link of the page |
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.
Done
components/layout/BlogLayout.tsx
Outdated
* @param props.post - The blog post to render in the layout | ||
* @param props.children - The content of the blog post |
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.
Specify the type of params.
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.
Done
/rtm |
No description provided.