-
-
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
refactor: misalignment in the filter field of tools section #3645
refactor: misalignment in the filter field of tools section #3645
Conversation
refactoring the filter field ( commercial $ ) which is misaligned in the tools section.
WalkthroughThe pull request updates the Changes
Assessment against linked issues
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
components/tools/Filters.tsx (2)
142-143
: Enhanced Margin Classes for "Open Source" FilterThe updated margin classes (
mt-2.5
for the text andmt-3
for the image) should help correct the misalignment of the "Open Source" option. Please verify that the Tailwind CSS class order meets your project’s conventions, as static analysis hints suggest a potential reordering.🧰 Tools
🪛 GitHub Actions: PR testing - if Node project
[warning] 142-142: Invalid Tailwind CSS classnames order tailwindcss/classnames-order
[warning] 143-143: Invalid Tailwind CSS classnames order tailwindcss/classnames-order
145-150
: Improved Alignment & Formatting for "Commercial" FilterThe "Commercial" filter changes introduce a
mt-4
margin for the label and adjust the image’s margin classes topr-6 md:pr-5 lg:pr-8 mt-2 ml-1 mb-1
to fix the misalignment issue. However, static analysis and pipeline logs indicate a few formatting issues:
- Prettier Formatting:
- A newline should be inserted after the opening tag (line 145).
- The image element (line 149) should be reformatted into a multi-line structure to conform with prettier standards.
- Any extraneous spaces (line 150) should be removed.
- Tailwind CSS Class Order:
Review the order of the class names if your project's linting rules require a specific order.Consider applying the following diff to address these issues:
-<div className={`flex cursor-pointer gap-1 rounded-md border bg-gray-200 px-4 py-2 hover:border-secondary-500 hover:bg-secondary-100 ${checkPaid === 'paid' ? 'border-secondary-500 bg-secondary-100' : ''}`} - onClick={() => (checkPaid === 'paid' ? setCheckPaid('all') : setCheckPaid('paid'))} -> - <div className='text-sm mt-4'>Commercial</div> - <img className='pr-6 md:pr-5 lg:pr-8 mt-2 ml-1 mb-1' src='/img/illustrations/icons/PaidIcon.svg' alt='Paid' /> - </div> +<div + className={`flex cursor-pointer gap-1 rounded-md border bg-gray-200 px-4 py-2 hover:border-secondary-500 hover:bg-secondary-100 ${ + checkPaid === 'paid' ? 'border-secondary-500 bg-secondary-100' : '' + }`} + onClick={() => (checkPaid === 'paid' ? setCheckPaid('all') : setCheckPaid('paid'))} +> + <div className="mt-4 text-sm">Commercial</div> + <img + className="pr-6 md:pr-5 lg:pr-8 mt-2 ml-1 mb-1" + src="/img/illustrations/icons/PaidIcon.svg" + alt="Paid" + /> +</div>This updated diff reformats the div structure and the image element to satisfy prettier and Tailwind CSS linting requirements while preserving the intended visual improvement.
🧰 Tools
🪛 ESLint
[error] 145-145: Insert
⏎·············
(prettier/prettier)
[error] 149-149: Replace
<img·className='pr-6·md:pr-5·lg:pr-8·mt-2·ml-1·mb-1'·src='/img/illustrations/icons/PaidIcon.svg'·alt='Paid'
with··<img⏎················className='pr-6·md:pr-5·lg:pr-8·mt-2·ml-1·mb-1'⏎················src='/img/illustrations/icons/PaidIcon.svg'⏎················alt='Paid'⏎·············
(prettier/prettier)
[error] 150-150: Delete
··
(prettier/prettier)
🪛 GitHub Actions: PR testing - if Node project
[error] 145-145: Insert
⏎·············
prettier/prettier
[warning] 148-148: Invalid Tailwind CSS classnames order tailwindcss/classnames-order
[error] 149-149: Replace
<img·className='pr-6·md:pr-5·lg:pr-8·mt-2·ml-1·mb-1'·src='/img/illustrations/icons/PaidIcon.svg'·alt='Paid'
with··<img⏎················className='pr-6·md:pr-5·lg:pr-8·mt-2·ml-1·mb-1'⏎················src='/img/illustrations/icons/PaidIcon.svg'⏎················alt='Paid'⏎·············
prettier/prettier
[warning] 149-149: Invalid Tailwind CSS classnames order tailwindcss/classnames-order
[error] 150-150: Delete
··
prettier/prettier
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/tools/Filters.tsx
(1 hunks)
🧰 Additional context used
🪛 ESLint
components/tools/Filters.tsx
[error] 145-145: Insert ⏎·············
(prettier/prettier)
[error] 149-149: Replace <img·className='pr-6·md:pr-5·lg:pr-8·mt-2·ml-1·mb-1'·src='/img/illustrations/icons/PaidIcon.svg'·alt='Paid'
with ··<img⏎················className='pr-6·md:pr-5·lg:pr-8·mt-2·ml-1·mb-1'⏎················src='/img/illustrations/icons/PaidIcon.svg'⏎················alt='Paid'⏎·············
(prettier/prettier)
[error] 150-150: Delete ··
(prettier/prettier)
🪛 GitHub Actions: PR testing - if Node project
components/tools/Filters.tsx
[warning] 142-142: Invalid Tailwind CSS classnames order tailwindcss/classnames-order
[warning] 143-143: Invalid Tailwind CSS classnames order tailwindcss/classnames-order
[error] 145-145: Insert ⏎·············
prettier/prettier
[warning] 148-148: Invalid Tailwind CSS classnames order tailwindcss/classnames-order
[error] 149-149: Replace <img·className='pr-6·md:pr-5·lg:pr-8·mt-2·ml-1·mb-1'·src='/img/illustrations/icons/PaidIcon.svg'·alt='Paid'
with ··<img⏎················className='pr-6·md:pr-5·lg:pr-8·mt-2·ml-1·mb-1'⏎················src='/img/illustrations/icons/PaidIcon.svg'⏎················alt='Paid'⏎·············
prettier/prettier
[warning] 149-149: Invalid Tailwind CSS classnames order tailwindcss/classnames-order
[error] 150-150: Delete ··
prettier/prettier
⏰ Context from checks skipped due to timeout of 180000ms (1)
- GitHub Check: Lighthouse CI
Not relevant. Closing. |
Description
refactoring the filter field (commercial $) which is misaligned in the tools section.
Before
![Screenshot (76)](https://private-user-images.githubusercontent.com/183217055/409178796-6be17937-9929-4ac9-892c-6985fe53664e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTIwNDAsIm5iZiI6MTczODk1MTc0MCwicGF0aCI6Ii8xODMyMTcwNTUvNDA5MTc4Nzk2LTZiZTE3OTM3LTk5MjktNGFjOS04OTJjLTY5ODVmZTUzNjY0ZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QxODA5MDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zZTBkOGM1ZGZiMTA4YTM2ODdjYmY0MWIwZWJlYmVmNDZkZmIzYjFmYTU1YzUxMzQ2NTU2NzY2MmVhMjdmZGU3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.pqjKpLnhxSm0s0vrQ2HsyUkkzIvYS6UWnH7AzJ4k7vg)
After fixing.
![Screenshot (82)](https://private-user-images.githubusercontent.com/183217055/409178051-2ee33214-0dc0-41f2-8769-d0f1e8997f3a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTIwNDAsIm5iZiI6MTczODk1MTc0MCwicGF0aCI6Ii8xODMyMTcwNTUvNDA5MTc4MDUxLTJlZTMzMjE0LTBkYzAtNDFmMi04NzY5LWQwZjFlODk5N2YzYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QxODA5MDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mZDYxZWEyNzc4NGY1M2JjM2E3N2EzNzA0ODZkNDc0MmUzZDVlNzRiY2QwYWNjMGI5NjA4MjExOTk1Njc1Mzg5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.mFItb2uF98xTvab8cc54lCmYLTSlmywMoesD2fPsx74)
Related issue(s)
fixes #3644
Summary by CodeRabbit