Skip to content

638-feat: Add registration end date to the course pages #828

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

Merged
merged 21 commits into from
May 15, 2025

Conversation

satrija87
Copy link
Collaborator

@satrija87 satrija87 commented Mar 21, 2025

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

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

Description

Added registration end date to the course pages and course cards

Related Tickets & Documents

Screenshots, Recordings

course

courses

Added/updated tests?

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

[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

    • Enhanced support for mentoring course cards, including display of personal mentoring start and end dates.
    • Improved date formatting and labeling for course registration and mentoring activities.
    • Added a new label "Enroll untill:" for registration end dates.
  • Refactor

    • Simplified and unified the display logic for course and mentoring information panels.
    • Updated component props to streamline usage and remove unnecessary options.
  • Style

    • Adjusted text color for additional information to improve readability.
  • Tests

    • Expanded and updated test coverage for date and info panel components to reflect new features and prop changes.

@github-actions github-actions bot changed the title DRAFT - 638-feat: add registration end date to the course pages 638-feat: Add data reg Mar 21, 2025
Copy link
Contributor

coderabbitai bot commented Mar 21, 2025

πŸ“ Walkthrough

Walkthrough

The updates introduce a new ShortInfoPanelView type and refactor the ShortInfoPanel component to support three views: normal, upcoming, and mentoring. Related props and logic are updated across components and tests. Style adjustments and new constants are added, and test suites are revised to reflect the new prop structure.

Changes

Files/Groups Change Summary
src/shared/ui/short-info-panel/short-info-panel.tsx Refactored to add ShortInfoPanelView type, new mentoring-related props, and updated rendering logic for three panel views.
src/shared/ui/short-info-panel/short-info-panel.test.tsx Refactored and expanded tests to cover new views and props; improved test clarity and coverage.
src/entities/course/ui/course-card/course-card.tsx Updated to use a single ShortInfoPanel with new props; removed redundant imports and improved Subtitle formatting.
src/entities/course/ui/course-item/course-item.tsx Removed onlyLanguage prop from ShortInfoPanel; condensed Subtitle formatting.
src/shared/ui/date-simple/date-simple.tsx Added showMentoringStartDate prop; adjusted date formatting logic based on this prop.
src/shared/ui/date-simple/date-simple.test.tsx Updated tests to always pass explicit showMentoringStartDate prop.
src/shared/constants.ts Added REGISTRATION_END label to LABELS object.
src/shared/ui/short-info-panel/short-info-panel.module.scss Changed .additional-info color from medium to dark gray.

Sequence Diagram(s)

sequenceDiagram
    participant CourseCard
    participant ShortInfoPanel
    participant DateSimple

    CourseCard->>ShortInfoPanel: Render with props (may include mentoring props)
    ShortInfoPanel->>DateSimple: Render date(s) based on view (normal/upcoming/mentoring)
    ShortInfoPanel-->>CourseCard: Rendered info panel (with language, icons, etc.)
Loading

Suggested reviewers

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

Note

⚑️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚑️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boostβ€”your workflow just got faster.


πŸ“œ Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 00d6af3 and d2470e5.

πŸ“’ Files selected for processing (5)
  • src/shared/constants.ts (1 hunks)
  • src/shared/ui/date-simple/date-simple.test.tsx (6 hunks)
  • src/shared/ui/date-simple/date-simple.tsx (1 hunks)
  • src/shared/ui/short-info-panel/short-info-panel.test.tsx (1 hunks)
  • src/shared/ui/short-info-panel/short-info-panel.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/shared/constants.ts
  • src/shared/ui/date-simple/date-simple.tsx
  • src/shared/ui/date-simple/date-simple.test.tsx
  • src/shared/ui/short-info-panel/short-info-panel.test.tsx
  • src/shared/ui/short-info-panel/short-info-panel.tsx
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build rs.school
  • GitHub Check: CI
✨ Finishing Touches
  • πŸ“ Generate Docstrings

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.

❀️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need 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)

  • @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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/shared/ui/short-info-panel/short-info-panel.tsx (1)

58-58: Inconsistent test ID

The data-testid "course-language1" is inconsistent with the pattern used elsewhere in the file ("course-language").

- <span className={cx('language')} data-testid="course-language1">
+ <span className={cx('language')} data-testid="course-language">
πŸ“œ Review details

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

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 49fe040 and ecf1968.

πŸ“’ Files selected for processing (5)
  • .env.example (0 hunks)
  • src/entities/course/ui/course-card/course-card.tsx (1 hunks)
  • src/shared/constants.ts (1 hunks)
  • src/shared/ui/short-info-panel/short-info-panel.test.tsx (1 hunks)
  • src/shared/ui/short-info-panel/short-info-panel.tsx (1 hunks)
πŸ’€ Files with no reviewable changes (1)
  • .env.example
πŸ”‡ Additional comments (2)
src/shared/constants.ts (1)

9-9: New constant added for registration end date label

This addition is necessary for implementing the registration end date feature on course pages.

src/shared/ui/short-info-panel/short-info-panel.test.tsx (1)

43-47: Test updated to verify multiple note icons

The test now correctly checks all instances of note-icon elements, which is necessary since we're adding another DateSimple component that will include an additional note icon.

@YulikK YulikK changed the title 638-feat: Add data reg DRAFT-638-feat: Add data reg Mar 21, 2025
@YulikK YulikK added the feature New feature or request label Mar 21, 2025
@YulikK
Copy link
Collaborator

YulikK commented Mar 21, 2025

run visual now

@satrija87
Copy link
Collaborator Author

I haven't added end registration date to upcoming-card items in the main page because ,in my opinion, it will overload the cards in this place and it will be better in short version here.

Copy link

Lighthouse Report:

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

View detailed report

Copy link

Lighthouse Report:

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

View detailed report

@ansivgit
Copy link
Collaborator

I haven't added end registration date to upcoming-card items in the main page because ,in my opinion, it will overload the cards in this place and it will be better in short version here.

I think it should be there too because it's important information for this section. We could place it in line with start date, for example

@ansivgit
Copy link
Collaborator

ansivgit commented Mar 22, 2025

Please, fix the name of the PR in accordance with the name of the task - Add data reg --> Add registration end date to the course pages

@satrija87 satrija87 changed the title DRAFT-638-feat: Add data reg DRAFT-638-feat: Add registration end date to the course pages Mar 22, 2025
@YulikK YulikK requested a review from Quiddlee April 11, 2025 17:37
@ansivgit
Copy link
Collaborator

I haven't added end registration date to upcoming-card items in the main page because ,in my opinion, it will overload the cards in this place and it will be better in short version here.

I found a solution to our card size issue.
image

@satrija87
Copy link
Collaborator Author

Π― Π½Π΅ Π΄ΠΎΠ±Π°Π²ΠΈΠ» Π΄Π°Ρ‚Ρƒ окончания рСгистрации для прСдстоящих ΠΊΠ°Ρ€Ρ‚ΠΎΡ‡Π΅ΠΊ Π½Π° Π³Π»Π°Π²Π½ΠΎΠΉ страницС, ΠΏΠΎΡ‚ΠΎΠΌΡƒ Ρ‡Ρ‚ΠΎ, ΠΏΠΎ ΠΌΠΎΠ΅ΠΌΡƒ мнСнию, это ΠΏΠ΅Ρ€Π΅Π³Ρ€ΡƒΠ·ΠΈΡ‚ ΠΊΠ°Ρ€Ρ‚ΠΎΡ‡ΠΊΠΈ Π² этом мСстС, ΠΈ здСсь Π»ΡƒΡ‡ΡˆΠ΅ Π±ΡƒΠ΄Π΅Ρ‚ ΡΠ΄Π΅Π»Π°Ρ‚ΡŒ ΠΊΡ€Π°Ρ‚ΠΊΡƒΡŽ Π²Π΅Ρ€ΡΠΈΡŽ.

Π― нашСл Ρ€Π΅ΡˆΠ΅Π½ΠΈΠ΅ ΠΏΡ€ΠΎΠ±Π»Π΅ΠΌΡ‹ с Ρ€Π°Π·ΠΌΠ΅Ρ€ΠΎΠΌ нашСй ΠΊΠ°Ρ€Ρ‚Ρ‹. ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

But it is not clear - when the course starts. Is it first date or second date? Is registration done in advance before the course starts and closed when it begins, or still possible to register after the course has already started? Or another case? What date is more important for students - start date, or registration end date? Should be another naming, which can clarify this case with two dates in a right way ? Can we name in a such way: "Course starts on: Apr 22 - Apr 30, 2025 English"?

@ansivgit
Copy link
Collaborator

Π― Π½Π΅ Π΄ΠΎΠ±Π°Π²ΠΈΠ» Π΄Π°Ρ‚Ρƒ окончания рСгистрации для прСдстоящих ΠΊΠ°Ρ€Ρ‚ΠΎΡ‡Π΅ΠΊ Π½Π° Π³Π»Π°Π²Π½ΠΎΠΉ страницС, ΠΏΠΎΡ‚ΠΎΠΌΡƒ Ρ‡Ρ‚ΠΎ, ΠΏΠΎ ΠΌΠΎΠ΅ΠΌΡƒ мнСнию, это ΠΏΠ΅Ρ€Π΅Π³Ρ€ΡƒΠ·ΠΈΡ‚ ΠΊΠ°Ρ€Ρ‚ΠΎΡ‡ΠΊΠΈ Π² этом мСстС, ΠΈ здСсь Π»ΡƒΡ‡ΡˆΠ΅ Π±ΡƒΠ΄Π΅Ρ‚ ΡΠ΄Π΅Π»Π°Ρ‚ΡŒ ΠΊΡ€Π°Ρ‚ΠΊΡƒΡŽ Π²Π΅Ρ€ΡΠΈΡŽ.

Π― нашСл Ρ€Π΅ΡˆΠ΅Π½ΠΈΠ΅ ΠΏΡ€ΠΎΠ±Π»Π΅ΠΌΡ‹ с Ρ€Π°Π·ΠΌΠ΅Ρ€ΠΎΠΌ нашСй ΠΊΠ°Ρ€Ρ‚Ρ‹. ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

But it is not clear - when the course starts. Is it first date or second date? Is registration done in advance before the course starts and closed when it begins, or still possible to register after the course has already started? Or another case? What date is more important for students - start date, or registration end date? Should be another naming, which can clarify this case with two dates in a right way ? Can we name in a such way: "Course starts on: Apr 22 - Apr 30, 2025 English"?

You're right. Let's put it on two lines then. We can just add a line with the registration end date below.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

♻️ Duplicate comments (1)
src/shared/ui/short-info-panel/short-info-panel.tsx (1)

95-97: πŸ› οΈ Refactor suggestion

Add fallback for personalMentoringEndDate

When personalMentoringStartDate is present but personalMentoringEndDate is null, no fallback is provided, which could lead to display issues.

<DateSimple
  label={LABELS.MENTOR_ACTIVITIES}
  startDate={personalMentoringStartDate || TO_BE_DETERMINED}
- endDate={personalMentoringStartDate ? personalMentoringEndDate : null}
+ endDate={personalMentoringStartDate ? (personalMentoringEndDate || TO_BE_DETERMINED) : null}
  labelSeparator={LABELS.MENTOR_ACTIVITIES_SEPARATOR}
  showMentoringStartDate={true}
>
🧹 Nitpick comments (3)
src/shared/ui/short-info-panel/short-info-panel.tsx (3)

40-46: Consider explicit view mode prop instead of implicit determination

The view mode is currently determined implicitly from props, which makes the component's behavior less predictable and testable.

Consider accepting an explicit view prop with these checks as fallbacks:

- let view: ShortInfoPanelView = 'normal';
-
- if (showMentoringStartDate) {
-   view = 'mentoring';
- } else if (!label) {
-   view = 'upcoming';
- }
+ const determineView = (): ShortInfoPanelView => {
+   if (showMentoringStartDate) return 'mentoring';
+   if (!label) return 'upcoming';
+   return 'normal';
+ };
+ 
+ const view = determineView();

59-64: Use self-closing tag for empty DateSimple component

The DateSimple component has empty children elements that can be simplified.

<DateSimple
  label={LABELS.REGISTRATION_END}
  startDate={registrationEndDate}
  showMentoringStartDate={false}
->
-</DateSimple>
+/>

100-100: Use self-closing tag for DateSimple component here

Similar to the previous instance, this DateSimple component has empty children elements.

  showMentoringStartDate={true}
->
-</DateSimple>
+/>
πŸ“œ Review details

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

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 7d5b164 and 4dc2678.

πŸ“’ Files selected for processing (4)
  • src/shared/ui/date-simple/date-simple.test.tsx (6 hunks)
  • src/shared/ui/date-simple/date-simple.tsx (3 hunks)
  • src/shared/ui/short-info-panel/short-info-panel.test.tsx (1 hunks)
  • src/shared/ui/short-info-panel/short-info-panel.tsx (2 hunks)
βœ… Files skipped from review due to trivial changes (1)
  • src/shared/ui/date-simple/date-simple.test.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/shared/ui/date-simple/date-simple.tsx
  • src/shared/ui/short-info-panel/short-info-panel.test.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/shared/ui/short-info-panel/short-info-panel.tsx (4)
src/shared/types.ts (1)
  • Language (6-6)
src/shared/constants.ts (2)
  • LABELS (7-15)
  • TO_BE_DETERMINED (4-4)
src/shared/ui/date-simple/date-simple.tsx (1)
  • DateSimple (30-66)
src/shared/helpers/getCourseDate.ts (1)
  • calculateFreshDate (13-18)
πŸ”‡ Additional comments (3)
src/shared/ui/short-info-panel/short-info-panel.tsx (3)

14-14: Good use of type for view modes

Creating a specific type for the panel views improves code readability and type safety.


23-25: Props added for mentoring functionality

The new optional props support the mentoring view mode requirements effectively.


110-117: Good use of switch statement for view selection

The switch statement clearly selects the appropriate view based on the computed view value, making the code more maintainable.

@satrija87 satrija87 requested review from YulikK, ansivgit and Quiddlee May 1, 2025 13:56
@satrija87
Copy link
Collaborator Author

satrija87 commented May 5, 2025

But it is not clear - when the course starts. Is it first date or second date? Is registration done in advance before the course starts and closed when it begins, or still possible to register after the course has already started? Or another case? What date is more important for students - start date, or registration end date? Should be another naming, which can clarify this case with two dates in a right way ? Can we name in a such way: "Course starts on: Apr 22 - Apr 30, 2025 English"?

You're right. Let's put it on two lines then. We can just add a line with the registration end date below.

Please , can you check the first variant with one line and two dates ? If it looks messy in code, i will fix and rewrite it with two lines. I would like you to evaluate how it looks.

@SpaNb4
Copy link
Collaborator

SpaNb4 commented May 14, 2025

@satrija87, please resolve the conflicts so we can merge this PR

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

♻️ Duplicate comments (1)
src/shared/ui/short-info-panel/short-info-panel.tsx (1)

96-98: Add fallback for personalMentoringEndDate

When personalMentoringStartDate is present but personalMentoringEndDate is null, no fallback is provided.

<DateSimple
  label={LABELS.MENTOR_ACTIVITIES}
  startDate={personalMentoringStartDate || TO_BE_DETERMINED}
- endDate={personalMentoringStartDate ? personalMentoringEndDate : null}
+ endDate={personalMentoringStartDate ? (personalMentoringEndDate || TO_BE_DETERMINED) : null}
  labelSeparator={LABELS.MENTOR_ACTIVITIES_SEPARATOR}
  showMentoringStartDate={true}
>
πŸ“œ Review details

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

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 4dc2678 and 00d6af3.

πŸ“’ Files selected for processing (4)
  • src/shared/constants.ts (1 hunks)
  • src/shared/ui/date-simple/date-simple.test.tsx (6 hunks)
  • src/shared/ui/date-simple/date-simple.tsx (1 hunks)
  • src/shared/ui/short-info-panel/short-info-panel.tsx (2 hunks)
βœ… Files skipped from review due to trivial changes (1)
  • src/shared/constants.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/shared/ui/date-simple/date-simple.test.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/shared/ui/date-simple/date-simple.tsx (2)
src/shared/constants.ts (1)
  • TO_BE_DETERMINED (6-6)
src/shared/helpers/day-js.ts (1)
  • dayJS (8-8)
πŸͺ› GitHub Check: Build rs.school
src/shared/ui/date-simple/date-simple.tsx

[failure] 7-7:
Cannot find module '@/shared/helpers/dayJS' or its corresponding type declarations.

src/shared/ui/short-info-panel/short-info-panel.tsx

[failure] 7-7:
Cannot find module '@/shared/helpers/getCourseDate' or its corresponding type declarations.

πŸͺ› GitHub Check: CI
src/shared/ui/date-simple/date-simple.tsx

[failure] 66-66:
Newline required at end of file but not found


[failure] 9-9:
./date-simple.module.scss import should occur before import of @/shared/helpers/dayJS


[failure] 7-7:
Unable to resolve path to module '@/shared/helpers/dayJS'


[failure] 7-7:
There should be no empty line within import group


[failure] 6-6:
There should be at least one empty line between import groups

src/shared/ui/short-info-panel/short-info-panel.tsx

[failure] 7-7:
There should be no empty line within import group


[failure] 6-6:
There should be at least one empty line between import groups

πŸͺ› ESLint
src/shared/ui/date-simple/date-simple.tsx

[error] 6-6: There should be at least one empty line between import groups

(import/order)


[error] 7-7: There should be no empty line within import group

(import/order)


[error] 9-9: ./date-simple.module.scss import should occur before import of @/shared/helpers/dayJS

(import/order)


[error] 66-66: Newline required at end of file but not found.

(@stylistic/eol-last)

src/shared/ui/short-info-panel/short-info-panel.tsx

[error] 6-6: There should be at least one empty line between import groups

(import/order)


[error] 7-7: There should be no empty line within import group

(import/order)


[error] 7-7: @/shared/helpers/getCourseDate import should occur after import of ./short-info-panel.module.scss

(import/order)

πŸͺ› GitHub Actions: Preview
src/shared/ui/date-simple/date-simple.tsx

[error] 7-7: TypeScript error TS2307: Cannot find module '@/shared/helpers/dayJS' or its corresponding type declarations.

πŸͺ› GitHub Actions: Pull Request
src/shared/ui/date-simple/date-simple.tsx

[error] 6-6: ESLint: There should be at least one empty line between import groups (import/order)

πŸ”‡ Additional comments (7)
src/shared/ui/date-simple/date-simple.tsx (2)

19-19: New prop added for mentoring date support

The showMentoringStartDate boolean prop allows the component to handle different date formatting needs.


36-37: Properly implemented date formatting logic

The component now correctly conditionally formats dates based on the context they're displayed in, using raw dates for mentoring view and formatted dates otherwise.

Also applies to: 41-41, 53-53

src/shared/ui/short-info-panel/short-info-panel.tsx (5)

15-15: Good use of a union type for panel views

Using a union type for the possible panel views improves type safety and makes the component's capabilities clear.


24-26: Added props for mentoring functionality

The new props allow the component to display mentoring-specific information.


41-47: Clear view selection logic

The logic for determining which view to display is straightforward and easy to understand.


49-74: Well-structured view components

Splitting the different view implementations into separate variables makes the code cleaner and easier to maintain.

Also applies to: 76-90, 92-109


111-118: Clean switch statement for view selection

Using a switch statement to select the appropriate view makes the code easy to read and maintain.

@satrija87 satrija87 force-pushed the feat/638-add-data-reg branch from 00d6af3 to 6c073aa Compare May 14, 2025 21:49
Copy link

Lighthouse Report:

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

View detailed report

@YulikK YulikK merged commit 265acea into main May 15, 2025
3 checks passed
@YulikK YulikK deleted the feat/638-add-data-reg branch May 15, 2025 20:21
@github-project-automation github-project-automation bot moved this from Review to Done in RS Site May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants