Skip to content

fix(docs): align sidebar_comp signature with sidebar caller#6416

Closed
BABTUNA wants to merge 1 commit intoreflex-dev:mainfrom
BABTUNA:fix-docs-sidebar-tutorials-index
Closed

fix(docs): align sidebar_comp signature with sidebar caller#6416
BABTUNA wants to merge 1 commit intoreflex-dev:mainfrom
BABTUNA:fix-docs-sidebar-tutorials-index

Conversation

@BABTUNA
Copy link
Copy Markdown
Contributor

@BABTUNA BABTUNA commented Apr 29, 2026

All Submissions:\n\n- [x] Have you followed the guidelines stated in CONTRIBUTING.md file?\n- [x] Have you checked to ensure there aren't any other open Pull Requests for the desired changed?\n\n### Type of change\n\n- [x] Bug fix (non-breaking change which fixes an issue)\n\n### Changes To Core Features:\n\n- [x] Have you added an explanation of what your changes do and why you'd like us to include them?\n- [x] Have you written new tests for your core changes, as applicable?\n- [x] Have you successfully ran tests with your changes locally?\n\n### Description\n\nFollow-up to #6359 to fix a sidebar API mismatch in docs.\n\nBefore this change, sidebar_comp(...) required a utorials_index parameter, but the only call site in sidebar(...) never passed it. That parameter was also unused in the implementation.\n\nThis PR removes the stale required argument so the function signature and caller stay aligned.\n\n### Tests\n\nAdded regression test:\n- docs/app/tests/test_sidebar.py::test_sidebar_renders_without_tutorials_index_arg\n\nValidation run:\n- uv run ruff check docs/app/reflex_docs/templates/docpage/sidebar/sidebar.py docs/app/tests/test_sidebar.py\n- uv run pytest docs/app/tests/test_sidebar.py -q\n- uv run pytest tests/test_routes.py -q (from docs/app)\n

@BABTUNA BABTUNA requested review from a team and Alek99 as code owners April 29, 2026 01:21
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR removes the stale tutorials_index parameter from sidebar_comp in sidebar.py, which was never passed by the sole call site in sidebar() and was unused inside the function body. A regression test is added in docs/app/tests/test_sidebar.py to confirm sidebar() renders without that argument.

Confidence Score: 5/5

Safe to merge — the change removes a dead parameter that was never supplied or used.

Single-line removal of an unused required parameter with a matching regression test; no logic change, no data path affected.

No files require special attention.

Important Files Changed

Filename Overview
docs/app/reflex_docs/templates/docpage/sidebar/sidebar.py Removes the unused tutorials_index: list[int] parameter from sidebar_comp; no other references to tutorials_index remain in the file.
docs/app/tests/test_sidebar.py New regression test that calls sidebar() without tutorials_index and asserts the returned component is non-None.

Sequence Diagram

sequenceDiagram
    participant Caller as sidebar(url)
    participant Comp as sidebar_comp(...)

    Note over Caller: Computes all index lists<br/>(learn_index, component_lib_index, …)
    Caller->>Comp: sidebar_comp(url, learn_index, …, skills_index, width)
    Note over Comp: Before PR: required tutorials_index<br/>After PR: parameter removed
    Comp-->>Caller: rx.Component
Loading

Reviews (1): Last reviewed commit: "fix(docs): remove stale tutorials_index ..." | Re-trigger Greptile

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 29, 2026

Merging this PR will not alter performance

✅ 9 untouched benchmarks


Comparing BABTUNA:fix-docs-sidebar-tutorials-index (4fcb2c5) with main (8f7ad9a)

Open in CodSpeed

@adhami3310 adhami3310 added the documentation Improvements or additions to documentation label Apr 29, 2026
@Alek99
Copy link
Copy Markdown
Member

Alek99 commented Apr 29, 2026

Thats for the pr but I dont think we need this

@Alek99 Alek99 closed this Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants