Skip to content

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

Merged
merged 19 commits into from
May 15, 2025
Merged

863-feat: Add ai course page #865

merged 19 commits into from
May 15, 2025

Conversation

YulikK
Copy link
Collaborator

@YulikK YulikK commented Apr 30, 2025

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

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

Description

add new course page

Related Tickets & Documents

Screenshots, Recordings

Please replace this line with any relevant images for UI changes.

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

    • Introduced a new AWS AI Practitioner course, including a dedicated course page and navigation route.
    • Added detailed course description, prerequisites, training program, and certification information in Russian.
    • Included AWS AI course in breadcrumbs and course listings.
    • Provided access to trainers, communication channels, and course resources for AWS AI participants.
  • Style

    • Updated breadcrumbs and course constants to reflect the new AWS AI Practitioner course.

@YulikK YulikK self-assigned this Apr 30, 2025
@github-actions github-actions bot changed the title Feat/863 add ai course page 863-feat: Add ai course page Apr 30, 2025
@YulikK YulikK added feature New feature or request preview and removed preview labels Apr 30, 2025
@YulikK YulikK added this to RS Site Apr 30, 2025
@YulikK YulikK moved this to Review in RS Site Apr 30, 2025
Copy link
Contributor

coderabbitai bot commented Apr 30, 2025

πŸ“ Walkthrough

Walkthrough

Support 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

File(s) Change Summary
dev-data/about-course.data.tsx, dev-data/required.data.ts, dev-data/training-program.data.tsx Added AWS AI course entries for about, requirements, and training program data, including Russian-language content and a new function for AWS AI course info.
dev-data/course-titles.data.ts Added AWS_AI to course titles and Discord links.
dev-data/index.ts Reformatted export statements for clarity; no functional changes.
src/app/courses/aws-ai/page.tsx Introduced a new Next.js page for the AWS AI course, including metadata generation and default export of the course view.
src/entities/course/constants.ts Added AWS AI course to the API courses ID dictionary.
src/shared/constants.ts Added AWS AI to course links and routes.
src/views/aws-ai.tsx Added new async React component AwsAI to render the AWS AI course page, loading trainers and displaying all course widgets.
src/widgets/breadcrumbs/constants.ts Added AWS AI breadcrumb mapping.
src/widgets/certification/ui/certification.tsx Added Russian-language certification content for AWS AI course.

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
Loading

Assessment against linked issues

Objective Addressed Explanation
Add new course page for AI AWS course (#863) βœ…
Include AWS AI in all relevant data/constants/routing (#863) βœ…
Provide localized content, requirements, and certification for AWS AI (#863) βœ…

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 0b6c353 and 3ef0c04.

πŸ“’ Files selected for processing (6)
  • dev-data/about-course.data.tsx (4 hunks)
  • dev-data/index.ts (2 hunks)
  • dev-data/required.data.ts (1 hunks)
  • dev-data/training-program.data.tsx (1 hunks)
  • src/entities/course/constants.ts (1 hunks)
  • src/shared/constants.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • dev-data/index.ts
  • src/entities/course/constants.ts
  • src/shared/constants.ts
  • dev-data/required.data.ts
  • dev-data/about-course.data.tsx
  • dev-data/training-program.data.tsx
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: CI
  • GitHub Check: Build rs.school
✨ 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: 5

🧹 Nitpick comments (3)
src/app/courses/aws-ai/page.tsx (1)

1-15: AWS AI course page correctly implemented

The 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 accessibility

The 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 function

The 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

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between a7ea8b3 and f267cb2.

πŸ“’ 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 new AWS_AI route constant.
The AWS_AI entry is grouped with other AWS routes and matches the breadcrumb mapping.

src/widgets/aws-badge/index.ts (1)

1-1: Re-export AwsBadge component.
This makes AwsBadge accessible from the widget index for cleaner imports.

src/shared/constants.ts (1)

43-43: Course link added correctly

The 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 text

The 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 imported

Appropriate import of the dedicated AWS badge component.


28-28: AWS badge component used correctly

The 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 added

The 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 good

The 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 rendering

Tests confirm that the badge widget, title, and descriptions render correctly with the expected content.


34-40: Image validation test is thorough

Good 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 correctly

Entry follows the same pattern as other course titles.


33-33: Discord link for AWS AI uses same link as other AWS courses

Consistent with existing AWS courses sharing the same Discord server.

src/views/aws-ai.tsx (3)

1-11: Well-organized imports

The imports are properly grouped by their source location and follow the project's import conventions.


13-15: Good type narrowing for props

Using 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 composition

The 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 exports

Consolidating related type exports from the same file improves code readability.


14-14: Good organization of related type exports

Consolidating related study path type exports improves code readability.


26-26: Better grouping of type exports

Moving the Benefit type export up with other type exports improves organization.


34-34: Added necessary export for new AWS badge data

The 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 logic

Removing the specify prop and related logic simplifies the component and makes it more maintainable.


47-47: Clean up of conditional CSS class

Removed 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 prop

The props type correctly uses keyof typeof awsBadgeMap to ensure type safety when accessing badge data.


16-18: Clean data extraction from map

The component efficiently extracts needed data from the badge map using the courseName.


19-36: Well-structured component with proper semantic HTML

The 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 use CourseNamesKeys

The change properly imports both COURSE_TITLES and CourseNamesKeys type from course-titles.data, which is needed for strong typing.


24-24: Improved type safety with CourseNamesKeys

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 content

The 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 array

The 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 introLocalizedContent

Good addition of the AWS AI course to the introLocalizedContent map using the Russian intro template.


174-174: Updated mentors content to schedule information

Changed the mentors list to static text about weekly online meetings and 4-week course duration.


180-180: Updated free education description

Improved the description to clearly state that courses are free and available to everyone.


290-290: Added AWS AI to the contentMapAbout

Successfully integrated the AWS AI course into the contentMapAbout object, allowing it to be displayed on the course page.

Copy link

Lighthouse Report:

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

View detailed report

Copy link

Lighthouse Report:

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

View detailed report

@YulikK YulikK changed the title 863-feat: Add ai course page DRAFT 863-feat: Add ai course page May 11, 2025
@YulikK YulikK changed the title DRAFT 863-feat: Add ai course page 863-feat: Add ai course page May 14, 2025
Copy link

Lighthouse Report:

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

View detailed report

@YulikK YulikK requested a review from natanchik May 15, 2025 12:28
@YulikK YulikK merged commit 9edc92c into main May 15, 2025
3 checks passed
@YulikK YulikK deleted the feat/863-add-ai-course-page branch May 15, 2025 15:35
@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.

AI course
5 participants