Docs/add new components#518
Conversation
…CircuitVerse#462) * Style: add custom.css and update docusaurus.config.js for responsive iframes * removed !important from iframe css * format css file --------- Co-authored-by: Nihal <65150640+Nihal4777@users.noreply.github.com>
WalkthroughThis pull request restructures and expands the CircuitVerse documentation. It modifies the introduction page in Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@docs/chapter1/1introduction.mdx`:
- Around line 1-6: Two docs files share the same frontmatter id
("chapter1-introduction") and slug ("/"), causing a Docusaurus route/ID
collision; fix by editing one of the files and giving it a unique frontmatter id
and/or slug (change the id value and/or slug value in the frontmatter for either
the MDX or MD file) and then update any internal links or references that point
to the old id/slug so routing and cross-links continue to work.
In `@docs/chapter4/5decodersandplexers.md`:
- Around line 1-5: The front matter ID "chapter4-muxandplex" is duplicated
across docs/chapter4/5decodersandplexers.md and docs/chapter4/5muxandplex.md
which will break the Docusaurus build; either remove this redundant file or give
it a unique ID and content. Open 5decodersandplexers.md, update the front matter
id to a distinct value such as "chapter4-decodersandplexers" if you intend it as
a separate page (and edit the title/description as needed), or delete
5decodersandplexers.md entirely if it was unintended; ensure the remaining file
keeps the original id and that both files are no longer byte-for-byte identical.
In `@docs/chapter4/5muxandplex.md`:
- Line 371: The sentence in the Decoder description mixes variable casing ("N
input bits" vs "2ⁿ output lines"); update it for consistency by replacing "2ⁿ"
with the same uppercase variable form used elsewhere (e.g., "2^N" or "2N"? — use
"2^N") so the line reads e.g. "The Decoder circuit element includes N input bits
and has 2^N output lines, where only one output is HIGH for each unique input
combination." Reference: Decoder, N, 2^N.
🧹 Nitpick comments (2)
docs/chapter1/1introduction.mdx (2)
14-16: Inconsistent caption approach compared to1introduction.md.This file uses Markdown image syntax with italic text for captions (Lines 14–16), while
1introduction.mduses semantic<figure>/<figcaption>elements — which are what the new CSS rules incustom.csstarget. Consider aligning on one approach (preferably<figure>/<figcaption>to leverage the new styling).
50-57: Iframe lackssandboxattribute and a title for accessibility is good.The
titleattribute is present (good for accessibility). Consider addingsandbox="allow-scripts allow-same-origin"to limit the embedded content's capabilities.
| --- | ||
| id: chapter1-introduction | ||
| title: "Introduction" | ||
| description: "Introduction to CircuitVerse and its features." | ||
| slug: / | ||
| --- |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Search for both files in the docs directory
fd -name "1introduction\.*" -type f
# Check front matter in both files
fd -name "1introduction\.md" -o -name "1introduction\.mdx" | xargs -I {} sh -c 'echo "=== {} ===" && head -20 {}'
# Also search for all instances of chapter1-introduction id in the codebase
rg "id: chapter1-introduction" -t md -t mdxRepository: CircuitVerse/CircuitVerseDocs
Length of output: 562
🏁 Script executed:
# Search for both files
fd "1introduction\.(md|mdx)$" docs/
# Search for the id across markdown files with correct syntax
rg "id: chapter1-introduction" --type markdown docs/
# Also search in mdx files by content
fd "1introduction\.mdx$" docs/ | xargs cat | head -20
# And check the md file
fd "1introduction\.md$" docs/ | xargs cat | head -20Repository: CircuitVerse/CircuitVerseDocs
Length of output: 1921
Duplicate id and slug conflict with 1introduction.md.
Both docs/chapter1/1introduction.md and docs/chapter1/1introduction.mdx declare id: chapter1-introduction and slug: /. Docusaurus will fail or behave unpredictably when two files in the same docs plugin instance share the same document ID or route. Remove or rename one of these files.
🤖 Prompt for AI Agents
In `@docs/chapter1/1introduction.mdx` around lines 1 - 6, Two docs files share the
same frontmatter id ("chapter1-introduction") and slug ("/"), causing a
Docusaurus route/ID collision; fix by editing one of the files and giving it a
unique frontmatter id and/or slug (change the id value and/or slug value in the
frontmatter for either the MDX or MD file) and then update any internal links or
references that point to the old id/slug so routing and cross-links continue to
work.
| --- | ||
| id: chapter4-muxandplex | ||
| title: "Muxandplex" | ||
| description: "Muxandplex page in Chapter4 of CircuitVerse documentation." | ||
| --- |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify duplicate front matter IDs in chapter4
rg -n "^id:" docs/chapter4/
echo "---"
echo "Comparing content (lines 7 onward):"
echo "---"
# Check if files exist first
if [ -f "docs/chapter4/5muxandplex.md" ] && [ -f "docs/chapter4/5decodersandplexers.md" ]; then
diff <(sed -n '7,$p' docs/chapter4/5muxandplex.md) <(sed -n '7,$p' docs/chapter4/5decodersandplexers.md) | head -40
else
echo "One or both files not found"
fiRepository: CircuitVerse/CircuitVerseDocs
Length of output: 704
🏁 Script executed:
# Also check the front matter of both files explicitly
echo "=== 5muxandplex.md (lines 1-6) ==="
head -6 docs/chapter4/5muxandplex.md
echo ""
echo "=== 5decodersandplexers.md (lines 1-6) ==="
head -6 docs/chapter4/5decodersandplexers.mdRepository: CircuitVerse/CircuitVerseDocs
Length of output: 405
🏁 Script executed:
# Check file sizes
wc -l docs/chapter4/5muxandplex.md docs/chapter4/5decodersandplexers.md
# Compare full files
cmp -l docs/chapter4/5muxandplex.md docs/chapter4/5decodersandplexers.md || echo "Files differ or error occurred"
# Also use md5sum to check if files are identical
md5sum docs/chapter4/5muxandplex.md docs/chapter4/5decodersandplexers.mdRepository: CircuitVerse/CircuitVerseDocs
Length of output: 386
🏁 Script executed:
# If files are different, show the differences
diff docs/chapter4/5muxandplex.md docs/chapter4/5decodersandplexers.mdRepository: CircuitVerse/CircuitVerseDocs
Length of output: 55
Duplicate document ID chapter4-muxandplex will break the Docusaurus build.
Both docs/chapter4/5decodersandplexers.md and docs/chapter4/5muxandplex.md share the identical front matter ID. Docusaurus requires unique document IDs; this duplication will cause a build failure or silent override.
The files are byte-for-byte identical (both 699 lines, matching md5 hash). Determine the intended purpose:
- If this should be a separate page: assign a unique ID (e.g.,
chapter4-decodersandplexers) and create distinct content. - If unintended: delete this file.
🤖 Prompt for AI Agents
In `@docs/chapter4/5decodersandplexers.md` around lines 1 - 5, The front matter ID
"chapter4-muxandplex" is duplicated across docs/chapter4/5decodersandplexers.md
and docs/chapter4/5muxandplex.md which will break the Docusaurus build; either
remove this redundant file or give it a unique ID and content. Open
5decodersandplexers.md, update the front matter id to a distinct value such as
"chapter4-decodersandplexers" if you intend it as a separate page (and edit the
title/description as needed), or delete 5decodersandplexers.md entirely if it
was unintended; ensure the remaining file keeps the original id and that both
files are no longer byte-for-byte identical.
| ## Decoder | ||
|
|
||
| The **Decoder** circuit element includes N input bits and has 2^N output lines. | ||
| The **Decoder** circuit element includes N input bits and has 2ⁿ output lines, where only one output is HIGH for each unique input combination. |
There was a problem hiding this comment.
Inconsistent variable casing: uppercase N vs superscript lowercase ⁿ.
The sentence uses "N input bits" (uppercase) but "2ⁿ output lines" (lowercase superscript). Use the same variable consistently, e.g.:
Proposed fix
-The **Decoder** circuit element includes N input bits and has 2ⁿ output lines, where only one output is HIGH for each unique input combination.
+The **Decoder** circuit element includes N input bits and has 2ᴺ output lines, where only one output is HIGH for each unique input combination.Alternatively, use 2^N in plain text for consistency with the rest of the document (e.g., Line 22 uses 2^N).
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| The **Decoder** circuit element includes N input bits and has 2ⁿ output lines, where only one output is HIGH for each unique input combination. | |
| The **Decoder** circuit element includes N input bits and has 2ᴺ output lines, where only one output is HIGH for each unique input combination. |
🤖 Prompt for AI Agents
In `@docs/chapter4/5muxandplex.md` at line 371, The sentence in the Decoder
description mixes variable casing ("N input bits" vs "2ⁿ output lines"); update
it for consistency by replacing "2ⁿ" with the same uppercase variable form used
elsewhere (e.g., "2^N" or "2N"? — use "2^N") so the line reads e.g. "The Decoder
circuit element includes N input bits and has 2^N output lines, where only one
output is HIGH for each unique input combination." Reference: Decoder, N, 2^N.
Fixes #
Ref #517
Changes done:
-- Improved clarity and technical accuracy in Chapter 4 (Muxandplex)
-- Corrected MSB and LSB detector explanations (leftmost vs rightmost clarification)
-- Refined decoder description for better precision
-- Minor documentation wording improvements
Screenshots:
Not applicable (documentation-only changes, no UI/styling updates).
Preview Link(s):
Will be added after checks complete.
✅️ By submitting this PR, I have verified the following
-- Checked to see if a similar PR has already been opened 🤔️
-- Reviewed the contributing guidelines 🔍️
-- Sample preview link added (will update after checks pass)
-- Squashed commits into one
Summary by CodeRabbit
Documentation
Style