Skip to content

fix: resolve dark theme contrast, collapsed panel overlaps, and add g…#466

Open
vivekyadav-3 wants to merge 1 commit into
Charushi06:mainfrom
vivekyadav-3:fix/dark-theme-contrast
Open

fix: resolve dark theme contrast, collapsed panel overlaps, and add g…#466
vivekyadav-3 wants to merge 1 commit into
Charushi06:mainfrom
vivekyadav-3:fix/dark-theme-contrast

Conversation

@vivekyadav-3
Copy link
Copy Markdown

Related Issue

(Optional: If you were assigned a specific issue, put Closes #<issue_number> here. Otherwise, you can delete this section.)

Summary

This PR fixes multiple UI/UX issues related to the dark theme, improves panel layout, and adds a global theme toggle. This is a contribution for GSSoC '26!

Changes Made

  • Fixed contrast issues in the dark theme for better readability.
  • Resolved UI bugs where collapsed panels were overlapping with other elements.
  • Added a global header theme toggle for easier theme switching.

Testing

  • Tested locally by running the application and verifying the UI changes across different themes and panel states.

Screenshots

(Optional: If you have before/after screenshots, you can drag and drop them right here! It really helps the reviewers.)

Checklist

  • Code follows project style
  • Tested locally
  • No unrelated changes included
  • Documentation updated (if applicable)

Copilot AI review requested due to automatic review settings May 20, 2026 04:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses several UI/UX issues by improving dark-theme readability, preventing collapsed right-panel content from overlapping, and introducing a global theme toggle in the header to complement the existing settings modal.

Changes:

  • Added a header theme toggle button and wired it to the existing theme preference logic.
  • Adjusted theme preference handling to apply changes immediately (and persist dark mode).
  • Added CSS overrides for dark-theme summary box contrast and for hiding summary content when the right panel is collapsed.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
index.html Adds the header theme toggle and updates preference persistence / event handling for dark mode + compact view.
css/index.css Introduces styling for the new theme toggle, improves dark theme contrast for the summary box, and hides the summary box when the right panel is collapsed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread index.html
Comment on lines +391 to +398
if (settingsSave) {
settingsSave.addEventListener('click', () => {
localStorage.setItem('studyplan_dark_mode', darkModeToggle.checked);
localStorage.setItem('studyplan_compact_view', compactViewToggle.checked);
loadPreferences();
settingsModal.style.display = 'none';
});
}
Comment thread index.html
Comment on lines +416 to +423
if (compactViewToggle) {
compactViewToggle.addEventListener('change', (e) => {
if (e.target.checked) {
document.body.classList.add('compact-view');
} else {
document.body.classList.remove('compact-view');
}
});
Comment thread index.html
Comment on lines +50 to +53
<button id="header-dark-mode-toggle" class="theme-toggle-btn" aria-label="Toggle dark mode" title="Toggle Theme">
<svg class="sun-icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"/></svg>
<svg class="moon-icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/></svg>
</button>
Comment thread css/index.css
Comment on lines +2193 to +2205
/* Show/hide Sun and Moon icons based on data-theme */
:root[data-theme="dark"] .theme-toggle-btn .sun-icon {
display: block;
}
:root[data-theme="dark"] .theme-toggle-btn .moon-icon {
display: none;
}
:root[data-theme="light"] .theme-toggle-btn .sun-icon {
display: none;
}
:root[data-theme="light"] .theme-toggle-btn .moon-icon {
display: block;
}
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.

3 participants