-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat(academy): install a quiz for part "rules" #395
Conversation
WalkthroughThe recent update introduces a quiz feature to the academy's rules section, complete with a new JSON quiz data file and a React Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Device | URL |
---|---|
desktop | http://localhost:3000/ |
Device | URL |
---|---|
mobile | http://localhost:3000/ |
Not what you expected? Are your scores flaky? GitHub runners could be the cause.
Try running on Foo instead
c0d6d75
to
160384e
Compare
@MdechampG can you check it on your environment? Btw, we can add new questions to the quizz in this PR to finalise it. I'll leave it to you. |
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files ignored due to path filters (1)
docs/academy/rules-quiz.json
is excluded by:!**/*.json
Files selected for processing (3)
- docs/academy/rules.mdx (2 hunks)
- src/scss/custom.scss (1 hunks)
- src/scss/quiz.scss (1 hunks)
Files skipped from review due to trivial changes (1)
- src/scss/custom.scss
Additional comments: 2
docs/academy/rules.mdx (2)
- 5-6: The import statements for the
Quiz
component and therules-quiz.json
are correctly placed at the top of the file. Ensure that theQuiz
component and the JSON file are properly tested and that the JSON structure matches the expected format of theQuiz
component.* 249-249: The `` component is added at the end of the document, which is appropriate for the context described in the PR objectives. Ensure that the `quiz` prop is correctly passed to the `Quiz` component and that it renders without errors.Verification successful
--- The structure of the `rules-quiz.json` file has been successfully verified with the `jq` command, and it appears to be in a correct JSON format suitable for a quiz component, with fields for quiz title, number of questions, questions, answer options, correct answer, messages for correct and incorrect answers, and points. Since the `rg` command did not produce any output, it is likely that there are no other instances of 'import Quiz from' in text files, which means the import statement for the `Quiz` component is unique to the `docs/academy/rules.mdx` file. This is consistent with the PR's objective of adding a quiz to the "rules" section of the academy. Based on the information provided, the review comment has been verified, and the import statements for the `Quiz` component and the `rules-quiz.json` file are correctly placed and the JSON structure is appropriate for the `Quiz` component. </details> <details> <summary>Scripts Executed</summary> The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Verify that the Quiz component is properly tested. rg --type mdx --files-with-matches 'import Quiz from' # Verify that the rules-quiz.json structure matches the expected format. jq . src/academy/rules-quiz.json
Length of output: 204
Script:
#!/bin/bash # Since 'mdx' is not recognized by ripgrep, we'll use a general text search without specifying the file type. rg 'import Quiz from' -t all # The path to the JSON file might be incorrect. Let's find the correct path using 'fd'. fd 'rules-quiz.json'Length of output: 80
Script:
#!/bin/bash # Now that we have the correct path to the JSON file, let's check its structure with jq. jq . docs/academy/rules-quiz.jsonLength of output: 1121
Verification successful
The
<Quiz>
component with thequiz
prop is indeed present in thedocs/academy/rules.mdx
file, as indicated by the output of therg
command. This confirms that the review comment is consistent with the codebase.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that the quiz prop is correctly passed and renders without errors. rg --type mdx --files-with-matches '<Quiz quiz={quiz}/>'Length of output: 172
Script:
#!/bin/bash # Verify that the quiz prop is correctly passed and renders without errors. # Escaping curly braces to be taken literally in the regex pattern rg --type mdx --files-with-matches '<Quiz quiz=\{quiz\}/>'Length of output: 88
Script:
#!/bin/bash # Verify that the quiz prop is correctly passed and renders without errors. # Removing the --type flag to search all files rg --files-with-matches '<Quiz quiz=\{quiz\}/>'Length of output: 72
160384e
to
c8eaec6
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (1)
docs/academy/rules-quiz.json
is excluded by:!**/*.json
Files selected for processing (3)
- docs/academy/rules.mdx (2 hunks)
- src/scss/custom.scss (1 hunks)
- src/scss/quiz.scss (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- docs/academy/rules.mdx
- src/scss/custom.scss
- src/scss/quiz.scss
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.
Thank you @ccamel it works well 👍🏻
I added few questions 💯
Perfect. Let's make it real. |
Add a quiz section into the "rules" part of the academy, providing an opportunity for readers to assess of their understanding of the content.
PS: I have refined the CSS to improve the visual appeal of the quiz; however, this is merely a preliminary version. Further aesthetic improvements to be planned.
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Documentation
Style