Skip to content
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

551-refactor: Fsd widget merch #670

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

MielomankA
Copy link
Collaborator

@MielomankA MielomankA commented Dec 1, 2024

What type of PR is this? (select all that apply)

  • πŸ• Feature
  • πŸ› Bug Fix
  • 🚧 Breaking Change
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ“ Documentation Update

Description

Refactor merch widet according to the task

Related Tickets & Documents

Screenshots, Recordings

chrome_NOFqdeFaT5

Added/updated tests?

  • πŸ‘Œ Yes
  • πŸ™…β€β™‚οΈ No, because they aren't needed
  • πŸ™‹β€β™‚οΈ No, because I need help

[optional] What gif best describes this PR or how it makes you feel?

For fun =)
giphy

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced merchData, providing dynamic merchandise information for users.
    • Enhanced Merch component with semantic HTML and dynamic content from merchData.
  • Bug Fixes

    • Improved rendering and functionality of the Merch component through updated tests.
  • Style

    • Updated styles for the Merch component, including responsive design adjustments and class renaming.
  • Tests

    • Added new test suite for the Merch component to ensure proper rendering and functionality.
    • Expanded mocked data for testing purposes with MOCKED_MERCH_DATA.

@MielomankA MielomankA self-assigned this Dec 1, 2024
@MielomankA
Copy link
Collaborator Author

run visual now

src/widgets/merch/ui/merch.test.tsx Outdated Show resolved Hide resolved
src/widgets/merch/ui/merch.tsx Outdated Show resolved Hide resolved
src/widgets/merch/ui/merch.module.scss Show resolved Hide resolved
src/widgets/merch/ui/merch.module.scss Show resolved Hide resolved
src/widgets/merch/ui/merch.module.scss Show resolved Hide resolved
src/widgets/merch/ui/merch.test.tsx Outdated Show resolved Hide resolved
@MielomankA
Copy link
Collaborator Author

Removed abbreviation from text.
it was "we're"
it has become "we are"

@MielomankA
Copy link
Collaborator Author

run visual now

Copy link

github-actions bot commented Dec 1, 2024

Lighthouse Report:

  • Performance: 46 / 100
  • Accessibility: 99 / 100
  • Best Practices: 100 / 100
  • SEO: 100 / 100

View detailed report

Copy link

github-actions bot commented Dec 5, 2024

Lighthouse Report:

  • Performance: 96 / 100
  • Accessibility: 99 / 100
  • Best Practices: 100 / 100
  • SEO: 100 / 100

View detailed report

@MielomankA MielomankA marked this pull request as ready for review December 6, 2024 10:24
Copy link
Contributor

coderabbitai bot commented Dec 6, 2024

πŸ“ Walkthrough
πŸ“ Walkthrough

Walkthrough

The changes in this pull request involve the introduction of a new merchandise data export, merchData, in the dev-data module, along with the addition of a mocked merchandise data constant for testing. The Merch component has been refactored to use semantic HTML elements and the new merchData, enhancing its structure. Additionally, a new test suite for the Merch component has been created, and some styles in the associated SCSS file have been modified.

Changes

File Change Summary
dev-data/index.ts Added export for merchData from merch.data.
dev-data/merch.data.ts Introduced new constant merchData containing merchandise information.
src/shared/tests/constants.ts Added new constant MOCKED_MERCH_DATA for testing merchandise information.
src/widgets/merch/merch.test.tsx Deleted existing unit tests for the Merch component.
src/widgets/merch/ui/merch.module.scss Modified styles: removed text-align, renamed .picture to .image, adjusted media queries.
src/widgets/merch/ui/merch.test.tsx Introduced new test suite for the Merch component, verifying rendering and functionality.
src/widgets/merch/ui/merch.tsx Refactored to use semantic HTML, replaced div with section, used merchData, and renamed image import.

Assessment against linked issues

Objective Addressed Explanation
Replace div's with HTML5 tags in merch.tsx βœ…
Rename image constant to something more meaningful βœ…
Add descriptive alt attribute in merch.tsx βœ…
Move merch.test.tsx to ui folder ❌ The file was deleted instead of moved.
Replace hardcoded link in merch.test.tsx with constant ❌ No hardcoded link was found to replace.

Possibly related PRs

Suggested labels

refactor, testing

Suggested reviewers

  • andron13
  • dzmitry-varabei
  • ansivgit
  • natanchik
  • KristiBo
  • SpaNb4

πŸ“œ Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between ee8afd1 and 97658a9.

πŸ“’ Files selected for processing (2)
  • dev-data/merch.data.ts (1 hunks)
  • src/widgets/merch/ui/merch.module.scss (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • dev-data/merch.data.ts
  • src/widgets/merch/ui/merch.module.scss

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?

❀️ Share
πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@MielomankA
Copy link
Collaborator Author

run visual now

@KristiBo
Copy link
Collaborator

The word t-shirts doesn't look good. Maybe use &#8288; or look for other solutions

image

@MielomankA
Copy link
Collaborator Author

The word t-shirts doesn't look good. Maybe use &#8288; or look for other solutions
&#8288; not a very good idea, I got rid of the symbols earlier so as not to use them dangerouslySetInnerHTML

Copy link

Lighthouse Report:

  • Performance: 71 / 100
  • Accessibility: 100 / 100
  • Best Practices: 100 / 100
  • SEO: 100 / 100

View detailed report

@MielomankA
Copy link
Collaborator Author

run visual now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FSD: Widget Merch
5 participants