-
-
Notifications
You must be signed in to change notification settings - Fork 11
887-refactor: Partners refactor #892
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
base: main
Are you sure you want to change the base?
Conversation
Lighthouse Report:
|
Lighthouse Report:
|
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 see that the only test that is in the component does not check anything. Let's add unit tests that check the content output. Title, src and alt logos
Lighthouse Report:
|
src/widgets/partnered/partnered.tsx
Outdated
<WidgetTitle size="small">Partnered with</WidgetTitle> | ||
<div className="partners"> | ||
<div className="partner-logo-container"> | ||
<ul className={cx('partners')}> |
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.
Could we use the structure like in Alumni
widget?
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 understand a point of keeping a similar HTML structure in all our widgets
Difference for now:
Alumni
<article>
<section>
<WidgetTitle />
<Paragraph />
<section>
{alumni.map(() => (
<figure>
<Image />
</figure>
))}
</section>
</section>
</article>
Partnered
<section>
<div>
<WidgetTitle />
<ul>
{partners.map(() => (
<li>
<Component />
</li>
))}
</ul>
</div>
</section>
- All containers in widgets have
section
tag. - I't strange to have
article->section->section
structure - lists usually use
ul->li
tags
Therefore, I suggest to keep partnered html structure in both partnered
and alumni
widgets
Lighthouse Report:
|
π |
π WalkthroughWalkthroughThe changes restructure the partnered widget by moving logic and styles into a new FSD-compliant folder structure, updating the HTML for semantic correctness, and introducing a constants file for partners. Test coverage and styling are migrated to new module-based files, and test IDs are added to logo components for improved testing. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PartneredComponent
participant WidgetTitle
participant PartnersConstants
participant LogoComponent
User->>PartneredComponent: Render
PartneredComponent->>WidgetTitle: Render "Partnered with"
PartneredComponent->>PartnersConstants: Retrieve partners array
loop For each partner
PartneredComponent->>LogoComponent: Render logo
end
Assessment against linked issues
Suggested labels
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. π§ ESLint
npm error Exit handler never called! π Recent review detailsConfiguration used: .coderabbit.yaml π Files selected for processing (4)
π§ Files skipped from review as they are similar to previous changes (4)
β¨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
|
Lighthouse Report:
|
What type of PR is this? (select all that apply)
Description
Refactor partnered module
Related Tickets & Documents
Screenshots, Recordings
I changed a little bit styles for tablets and mobiles
Added/updated tests?
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
Summary by CodeRabbit
New Features
Style
Bug Fixes
Tests
Chores