Skip to content

fix: toggle behavior of Getting Started dropdown (#7332)#7333

Open
GarvSaxena wants to merge 1 commit into
CircuitVerse:masterfrom
GarvSaxena:fix-getting-started-dropdown-issue#7332
Open

fix: toggle behavior of Getting Started dropdown (#7332)#7333
GarvSaxena wants to merge 1 commit into
CircuitVerse:masterfrom
GarvSaxena:fix-getting-started-dropdown-issue#7332

Conversation

@GarvSaxena
Copy link
Copy Markdown

@GarvSaxena GarvSaxena commented Apr 24, 2026

Fixes #7332

Describe the changes you have made in this PR -

I removed the data-bs-auto-close="true" attribute from the "Getting Started" dropdown button in app/views/layouts/_header.html.erb. This fixes a bug where the dropdown would open on the first click but fail to close on the second click, restoring Bootstrap's native toggle behavior.

Screenshots of the UI changes (If any) -


Code Understanding and AI Usage

Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code?

  • [] No, I wrote all the code myself
  • Yes, I used AI assistance (continue below)
    If you used AI assistance:
  • I have reviewed every single line of the AI-generated code
  • I can explain the purpose and logic of each function/component I added
  • I have tested edge cases and understand how the code handles them
  • I have modified the AI output to follow this project's coding standards and conventions

Explain your implementation approach:
What problem does your code solve?
It fixes a UX regression where the "Getting Started" dropdown menu remained stuck open when a user clicked the toggle button a second time.

What alternative approaches did you consider?
I considered adding custom JavaScript to force the dropdown to close by intercepting the click event or adjusting the rotate180 logic at the bottom of the file.

Why did you choose this specific implementation?
Removing the data-bs-auto-close="true" attribute is the cleanest solution. Bootstrap 5 handles dropdown toggling and auto-closing natively by default. Explicitly declaring auto-close="true" was interfering with the toggle logic when clicking the button itself (especially considering recent keyboard accessibility updates in the header).

What are the key functions/components and what do they do?
The only change was removing the attribute from the <button id="getting-started-dropdown"> element in _header.html.erb.

Checklist before requesting a review

  • I have added proper PR title and linked to the issue
  • I have performed a self-review of my code
  • I can explain the purpose of every function, class, and logic block I added
  • I understand why my changes work and have tested them thoroughly
  • I have considered potential edge cases and how my code handles them
  • If it is a core feature, I have added thorough tests
  • My code follows the project's style guidelines and conventions

Summary by CodeRabbit

  • Bug Fixes
    • Adjusted the "getting started" dropdown menu to use default auto-close behavior instead of an explicit override.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 76fa9606-f324-4970-b681-822efcaee2c4

📥 Commits

Reviewing files that changed from the base of the PR and between 1bca4c7 and 1486d5a.

📒 Files selected for processing (1)
  • app/views/layouts/_header.html.erb
💤 Files with no reviewable changes (1)
  • app/views/layouts/_header.html.erb

Walkthrough

The file app/views/layouts/_header.html.erb has been modified to remove the explicit data-bs-auto-close="true" attribute from the "Getting Started" menu's Bootstrap dropdown toggle button. This change delegates the auto-close behavior to Bootstrap's default dropdown configuration instead of explicitly forcing it.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the data-bs-auto-close attribute to fix the toggle behavior of the Getting Started dropdown.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Bug: 'Getting Started' dropdown does not close when clicked again

1 participant