-
-
Notifications
You must be signed in to change notification settings - Fork 11
869-refactor: Update angular mark #875
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
Conversation
π WalkthroughWalkthroughThe changes broaden the Angular course eligibility from only "JS/FE Stage 2" graduates to any RS School course graduates, update related test data, and adjust the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CoursesWidget
participant CourseCard
User->>CoursesWidget: View courses
CoursesWidget->>CourseCard: Render course (with title, subTitle if Angular)
CourseCard-->>CoursesWidget: Course card with conditional subtitle
CoursesWidget-->>User: Displayed course cards with updated eligibility info
Assessment against linked issues
Possibly related PRs
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
|
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: 2
π§Ή Nitpick comments (3)
src/shared/constants.ts (1)
7-7
: Add missing Russian translation for the new subtitle constant.We introduced
RS_GRADUATED_ONLY = 'Alumni only'
but did not add a corresponding Russian localization. Consider adding anRS_GRADUATED_ONLY_RU
constant or integrating this into the i18n pipeline for consistency across locales.src/widgets/training-program/ui/training-program.test.tsx (1)
12-12
: Avoid regex pitfalls in test.The test uses
new RegExp(p, 'i')
on a string with punctuation, which can introduce unintended regex behavior. Preferscreen.getByText(p)
for exact matching or escape special characters before constructing theRegExp
.dev-data/training-program.data.tsx (1)
120-121
: Centralize eligibility text.Hardcoding the Angular eligibility description here duplicates the literal. For maintainability, import and render
RS_GRADUATED_ONLY
within the<Paragraph>
instead of repeating the string.
π Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
π Files selected for processing (8)
dev-data/about-course.data.tsx
(1 hunks)dev-data/courses.data.ts
(2 hunks)dev-data/training-program.data.tsx
(1 hunks)src/entities/course/ui/course-card/course-card.test.tsx
(1 hunks)src/entities/course/ui/course-card/course-card.tsx
(6 hunks)src/shared/constants.ts
(1 hunks)src/widgets/courses/ui/courses.test.tsx
(2 hunks)src/widgets/training-program/ui/training-program.test.tsx
(1 hunks)
π§° Additional context used
π§ Learnings (1)
src/widgets/courses/ui/courses.test.tsx (1)
Learnt from: Quiddlee
PR: rolling-scopes/site#572
File: src/pages/home.tsx:25-25
Timestamp: 2024-09-30T12:07:39.137Z
Learning: The `Courses` component in `src/widgets/courses/other-courses.test.tsx`, `src/pages/courses.tsx`, and `dev-data/courses-path.data.ts` is a different component from the one replaced in `src/pages/home.tsx`.
𧬠Code Graph Analysis (2)
dev-data/courses.data.ts (1)
src/shared/constants.ts (3)
RS_GRADUATED_ONLY
(7-7)COURSE_LINKS
(34-44)TO_BE_DETERMINED
(6-6)
src/widgets/courses/ui/courses.test.tsx (1)
src/shared/__tests__/constants.ts (1)
mockedCourses
(27-207)
β° Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: CI
π Additional comments (11)
dev-data/courses.data.ts (3)
10-10
: Good - Import standardizationAdding
RS_GRADUATED_ONLY
to imports helps maintain consistency with the new eligibility labeling across the application.
108-108
: Good - Broadened eligibility criteriaChanged from hardcoded "JS/FE Stage 2 graduates only" to a more inclusive
RS_GRADUATED_ONLY
constant ('Alumni only'), opening the Angular course to all RS School graduates.
114-114
: Good - Using constants for date valuesReplacing hardcoded strings with the
TO_BE_DETERMINED
constant improves consistency and makes future updates easier.src/widgets/courses/ui/courses.test.tsx (2)
6-6
: Good - Using constants for course titlesAdding the
COURSE_TITLES
import allows for more robust title matching in tests.
28-32
: Good - Updated test logic for Angular subtitleThe test now correctly handles the special case where Angular course titles include a subtitle suffix in parentheses, ensuring proper test coverage of the UI changes.
src/entities/course/ui/course-card/course-card.tsx (6)
11-11
: Good - Using central course title constantsImporting
COURSE_TITLES
enables consistent title handling and specific logic for Angular courses.
20-20
: Good - Added subTitle property typeProperly extended the type definition to include the subTitle property from Course.
38-38
: Good - Destructured subTitle propAdded subTitle to the destructured props to make it available in the component.
56-56
: Good - Clean Angular course subtitle logicThe condition to display the Angular course subtitle is clearly defined and handles the special case appropriately.
71-73
: Good - Proper subtitle display implementationUpdated the Subtitle component to include the title with optional subtitle suffix for Angular courses.
93-93
: Good - Code consolidationConsolidated the ShortInfoPanel component usage to a single line, improving code readability without changing functionality.
Lighthouse Report:
|
Lighthouse Report:
|
Lighthouse Report:
|
Lighthouse Report:
|
What type of PR is this? (select all that apply)
Description
Update Angular mark
Related Tickets & Documents
Screenshots, Recordings
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?
Our alumni are running to register for the course π

Summary by CodeRabbit