Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted refactor and cleanup #106

Merged
merged 6 commits into from
Mar 3, 2025
Merged

Assorted refactor and cleanup #106

merged 6 commits into from
Mar 3, 2025

Conversation

dkhalife
Copy link
Owner

@dkhalife dkhalife commented Mar 3, 2025

  • merge storage context into themecontext
  • TokenManager -> api util
  • reduce themecontext
  • lowercase util files
  • dead code

@Copilot Copilot bot review requested due to automatic review settings March 3, 2025 04:34
@dkhalife dkhalife changed the title cleanup Assorted refactor and cleanup Mar 3, 2025

Choose a reason for hiding this comment

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

PR Overview

This PR cleans up and consolidates context and utility modules by merging the storage context into the theme context, renaming utility files to lowercase, and removing dead code.

  • Merged StorageContext into ThemeContext and replaced its consumers
  • Renamed util files (e.g., Colors → colors) and updated relevant imports
  • Updated API module imports from TokenManager to api and removed unused components

Reviewed Changes

File Description
src/contexts/Contexts.tsx Replaced StorageContextProvider with ThemeContextProvider
src/contexts/ThemeContext.tsx Consolidated context and removed unused/commented code sections
src/utils/labels.ts, src/utils/tasks.ts Updated import paths to use lowercase filenames (colors)
src/views/Settings/Settings.tsx Updated context consumer from StorageContext to ThemeContext
src/api/* Updated API imports from TokenManager to api
src/views/Navigation/NavBar.tsx Updated context consumer usage from StorageContext to ThemeContext
src/views/Tasks/IconButtonWithMenu.tsx Removed dead code component
src/contexts/StorageContext.tsx Removed as dead code

Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/views/Settings/Settings.tsx:4

  • The component name 'PassowrdChangeModal' appears to be misspelled; consider renaming it to 'PasswordChangeModal'.
import { PassowrdChangeModal } from '../Modals/Inputs/PasswordChangeModal'
@dkhalife dkhalife merged commit 55ed6cb into main Mar 3, 2025
5 checks passed
@dkhalife dkhalife deleted the cleanup branch March 3, 2025 04:39
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.

1 participant