fix: toggle behavior of Getting Started dropdown (#7332)#7333
fix: toggle behavior of Getting Started dropdown (#7332)#7333GarvSaxena wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughThe file Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
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 inapp/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?
If you used AI assistance:
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
rotate180logic 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 declaringauto-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
Summary by CodeRabbit