-
-
Notifications
You must be signed in to change notification settings - Fork 11
863-feat: Add ai course page #865
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
π WalkthroughWalkthroughSupport for the AWS AI course was added throughout the codebase. This includes new constants, data entries, localized content, course requirements, program details, routing, and a dedicated React page and view component. Breadcrumbs and certification localization were also updated to include the new course. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NextJS_Router
participant AwsAI_Page
participant AwsAI_View
participant TrainerStore
participant Widgets
User->>NextJS_Router: Navigate to /courses/aws-ai
NextJS_Router->>AwsAI_Page: Render AwsAI page
AwsAI_Page->>AwsAI_View: Render AwsAI component with courseName
AwsAI_View->>TrainerStore: loadTrainers(courseName)
TrainerStore-->>AwsAI_View: trainers data
AwsAI_View->>Widgets: Render HeroCourse, Breadcrumbs, TrainingProgram, AboutCourse, Certification, AwsBadge, Communication, Required
AwsAI_View->>Widgets: Conditionally render Trainers if data loaded
Assessment against linked issues
Note β‘οΈ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit 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. Note β‘οΈ Faster reviews with cachingCodeRabbit 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 π Recent review detailsConfiguration used: .coderabbit.yaml π Files selected for processing (6)
π§ Files skipped from review as they are similar to previous changes (6)
β° Context from checks skipped due to timeout of 90000ms (2)
β¨ 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: 5
π§Ή Nitpick comments (3)
src/app/courses/aws-ai/page.tsx (1)
1-15
: AWS AI course page correctly implementedThe page implementation follows the standard pattern for course pages:
- Proper metadata generation
- Correct component rendering with course name prop
Function naming could be improved for clarity.
-export default async function AwsDeveloperRoute() { +export default async function AwsAiRoute() { return <AwsAI courseName={courseName} />; }src/widgets/aws-badge/ui/aws-badge.tsx (1)
27-32
: Improve image alt text for accessibilityThe alt text "AWS Digital Badge" is generic and should be more specific to the particular badge being displayed.
<Image className={cx('aws-badge-img')} src={image} - alt="AWS Digital Badge" + alt={`${title} Digital Badge`} data-testid="aws-badge-img" />dev-data/about-course.data.tsx (1)
251-278
: Added AWS AI about course content functionThe
awsAi
function follows the established pattern for course information:
- Includes accessibility information
- References schedule data
- Mentions free education and certification
However, the schedule information references
listData.javaScriptRU
which may not be appropriate for the AI course since the list contains JavaScript-specific content. Consider creating a dedicated schedule list for AWS AI.
π Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
π Files selected for processing (21)
dev-data/about-course.data.tsx
(5 hunks)dev-data/aws-badge.data.ts
(1 hunks)dev-data/course-titles.data.ts
(2 hunks)dev-data/courses.data.ts
(1 hunks)dev-data/index.ts
(3 hunks)dev-data/required.data.ts
(1 hunks)dev-data/training-program.data.tsx
(3 hunks)src/app/courses/aws-ai/page.tsx
(1 hunks)src/core/const/index.ts
(1 hunks)src/entities/course/constants.ts
(1 hunks)src/shared/constants.ts
(1 hunks)src/shared/helpers/is-training-program.ts
(0 hunks)src/views/aws-ai.tsx
(1 hunks)src/views/aws-fundamentals.tsx
(2 hunks)src/widgets/aws-badge/index.ts
(1 hunks)src/widgets/aws-badge/ui/aws-badge.module.scss
(1 hunks)src/widgets/aws-badge/ui/aws-badge.test.tsx
(1 hunks)src/widgets/aws-badge/ui/aws-badge.tsx
(1 hunks)src/widgets/breadcrumbs/constants.ts
(1 hunks)src/widgets/certification/ui/certification.tsx
(1 hunks)src/widgets/training-program/ui/training-program.tsx
(2 hunks)
π€ Files with no reviewable changes (1)
- src/shared/helpers/is-training-program.ts
π§° Additional context used
𧬠Code Graph Analysis (10)
src/widgets/certification/ui/certification.tsx (1)
dev-data/course-titles.data.ts (1)
COURSE_TITLES
(3-14)
src/views/aws-fundamentals.tsx (1)
src/widgets/aws-badge/ui/aws-badge.tsx (1)
AwsBadge
(16-36)
src/widgets/aws-badge/ui/aws-badge.tsx (4)
dev-data/aws-badge.data.ts (1)
awsBadgeMap
(5-20)src/widgets/aws-badge/index.ts (1)
AwsBadge
(1-1)src/shared/ui/section-label/section-label.tsx (1)
SectionLabel
(14-20)src/shared/ui/paragraph/paragraph.tsx (1)
Paragraph
(23-35)
src/entities/course/constants.ts (1)
dev-data/course-titles.data.ts (1)
COURSE_TITLES
(3-14)
src/views/aws-ai.tsx (6)
dev-data/course-titles.data.ts (1)
CourseNames
(16-16)src/widgets/training-program/ui/training-program.tsx (1)
TrainingProgram
(18-52)src/widgets/certification/ui/certification.tsx (1)
Certification
(38-55)src/widgets/aws-badge/ui/aws-badge.tsx (1)
AwsBadge
(16-36)src/widgets/communication/ui/communication.tsx (1)
Communication
(29-107)src/widgets/trainers/ui/trainers.tsx (1)
Trainers
(18-41)
src/widgets/aws-badge/ui/aws-badge.test.tsx (2)
src/widgets/aws-badge/ui/aws-badge.tsx (1)
AwsBadge
(16-36)dev-data/index.ts (1)
COURSE_TITLES
(28-28)
dev-data/required.data.ts (1)
dev-data/course-titles.data.ts (1)
COURSE_TITLES
(3-14)
src/app/courses/aws-ai/page.tsx (3)
dev-data/course-titles.data.ts (1)
COURSE_TITLES
(3-14)src/shared/helpers/get-course-title.ts (1)
getCourseTitle
(4-10)src/views/aws-ai.tsx (1)
AwsAI
(17-33)
dev-data/courses.data.ts (3)
dev-data/course-titles.data.ts (1)
COURSE_TITLES
(3-14)src/shared/constants.ts (2)
COURSE_LINKS
(33-44)TO_BE_DETERMINED
(6-6)src/core/const/index.ts (1)
ROUTES
(25-43)
dev-data/about-course.data.tsx (3)
dev-data/index.ts (2)
COURSE_TITLES
(28-28)AboutCourseInfo
(1-1)dev-data/course-titles.data.ts (1)
COURSE_TITLES
(3-14)dev-data/courses-data.types.ts (1)
AboutCourseInfo
(12-17)
πͺ ESLint
dev-data/aws-badge.data.ts
[error] 3-3: @/shared/assets/aws-ai-practitioner-badge.webp
import should occur before import of @/shared/assets/aws-cloud-pract-badge.webp
(import/order)
dev-data/about-course.data.tsx
[error] 229-229: {' '}
must be placed on a new line
(@stylistic/jsx-one-expression-per-line)
πͺ GitHub Check: CI
dev-data/aws-badge.data.ts
[failure] 3-3:
@/shared/assets/aws-ai-practitioner-badge.webp
import should occur before import of @/shared/assets/aws-cloud-pract-badge.webp
dev-data/about-course.data.tsx
[failure] 229-229:
{' '}
must be placed on a new line
πͺ GitHub Actions: Pull Request
dev-data/about-course.data.tsx
[error] 229-229: {' '}
must be placed on a new line (@stylistic/jsx-one-expression-per-line)
β° Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Build rs.school
π Additional comments (33)
src/widgets/breadcrumbs/constants.ts (1)
15-15
: Add breadcrumb for AWS AI Practitioner.
This new entry correctly maps the'aws-ai'
route to the'AWS AI Practitioner'
label in navigation.src/core/const/index.ts (1)
33-35
: Register newAWS_AI
route constant.
TheAWS_AI
entry is grouped with other AWS routes and matches the breadcrumb mapping.src/widgets/aws-badge/index.ts (1)
1-1
: Re-exportAwsBadge
component.
This makesAwsBadge
accessible from the widget index for cleaner imports.src/shared/constants.ts (1)
43-43
: Course link added correctlyThe new AWS AI course link follows the existing pattern and naming convention of other AWS courses.
src/widgets/certification/ui/certification.tsx (1)
26-31
: Certification content added with Russian textThe certification content for AWS AI course has been added correctly, reusing the same Russian text as JS_RU course.
src/views/aws-fundamentals.tsx (2)
3-3
: New AWS badge component importedAppropriate import of the dedicated AWS badge component.
28-28
: AWS badge component used correctlyThe AWS badge is now displayed using the dedicated component instead of the generic TrainingProgram component with specify prop, improving component separation.
src/entities/course/constants.ts (1)
17-17
: API course ID mapping addedThe AWS AI course has been correctly mapped to its API ID, allowing content to be retrieved from the backend.
dev-data/required.data.ts (1)
338-354
: New AWS AI course entry looks goodThe addition of AWS AI Practitioner course requirements properly follows the established pattern with appropriate prerequisites.
src/widgets/aws-badge/ui/aws-badge.test.tsx (2)
8-32
: Test properly validates the AwsBadge component renderingTests confirm that the badge widget, title, and descriptions render correctly with the expected content.
34-40
: Image validation test is thoroughGood test coverage checking image visibility, alt text, and source attribute.
dev-data/course-titles.data.ts (2)
13-13
: New AWS AI course title added correctlyEntry follows the same pattern as other course titles.
33-33
: Discord link for AWS AI uses same link as other AWS coursesConsistent with existing AWS courses sharing the same Discord server.
src/views/aws-ai.tsx (3)
1-11
: Well-organized importsThe imports are properly grouped by their source location and follow the project's import conventions.
13-15
: Good type narrowing for propsUsing
CourseNames['AWS_AI']
appropriately narrows the type to ensure only the AWS AI course name can be passed.
20-32
: Clean component structure with proper component compositionThe component effectively organizes the course page by composing multiple widgets in a logical sequence, consistently passing the courseName prop where needed, and conditionally rendering the Trainers component.
dev-data/index.ts (4)
1-1
: Good organization of related type exportsConsolidating related type exports from the same file improves code readability.
14-14
: Good organization of related type exportsConsolidating related study path type exports improves code readability.
26-26
: Better grouping of type exportsMoving the Benefit type export up with other type exports improves organization.
34-34
: Added necessary export for new AWS badge dataThe new awsBadgeMap export is properly added to support the AWS badge functionality.
src/widgets/training-program/ui/training-program.tsx (2)
18-22
: Good simplification of component logicRemoving the
specify
prop and related logic simplifies the component and makes it more maintainable.
47-47
: Clean up of conditional CSS classRemoved conditional CSS class application, which aligns with the component simplification.
src/widgets/aws-badge/ui/aws-badge.tsx (3)
13-15
: Type safety for courseName propThe props type correctly uses
keyof typeof awsBadgeMap
to ensure type safety when accessing badge data.
16-18
: Clean data extraction from mapThe component efficiently extracts needed data from the badge map using the courseName.
19-36
: Well-structured component with proper semantic HTMLThe component follows a clean structure with appropriate HTML semantics using section, article, and proper CSS class naming. Test IDs are correctly added for testing purposes.
dev-data/training-program.data.tsx (3)
4-4
: Updated import statement to useCourseNamesKeys
The change properly imports both
COURSE_TITLES
andCourseNamesKeys
type from course-titles.data, which is needed for strong typing.
24-24
: Improved type safety withCourseNamesKeys
Good update to use the
CourseNamesKeys
type for the ContentMap interface, which ensures all course titles will be properly typed.
276-305
: Added AWS AI Practitioner course contentThe implementation properly adds Russian language content for the new AWS AI Practitioner course, including course description, modules, and offering details. Good use of existing UI components like Paragraph, Subtitle, and List.
Note that the course is using
awsDevImg
for its image. This is consistent with AWS DevOps course, but consider using a dedicated image for the AI course in the future if available.dev-data/courses.data.ts (1)
217-238
: Added AWS AI Practitioner course to courses arrayThe new course entry follows the established pattern for AWS courses with appropriate metadata:
- Unique ID ('10')
- References to correct constants for title and URLs
- Russian language setting
- AWS styling with light purple background
- Correct route configuration
The implementation is consistent with other AWS course entries.
dev-data/about-course.data.tsx (4)
48-48
: Added AWS AI course to introLocalizedContentGood addition of the AWS AI course to the introLocalizedContent map using the Russian intro template.
174-174
: Updated mentors content to schedule informationChanged the mentors list to static text about weekly online meetings and 4-week course duration.
180-180
: Updated free education descriptionImproved the description to clearly state that courses are free and available to everyone.
290-290
: Added AWS AI to the contentMapAboutSuccessfully integrated the AWS AI course into the contentMapAbout object, allowing it to be displayed on the course page.
Lighthouse Report:
|
Lighthouse Report:
|
Lighthouse Report:
|
What type of PR is this? (select all that apply)
Description
add new course page
Related Tickets & Documents
Screenshots, Recordings
Please replace this line with any relevant images for UI changes.
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