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

Add a setting for Home View #109

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Add a setting for Home View #109

merged 1 commit into from
Mar 4, 2025

Conversation

dkhalife
Copy link
Owner

@dkhalife dkhalife commented Mar 4, 2025

No description provided.

@Copilot Copilot bot review requested due to automatic review settings March 4, 2025 00:54
Copy link
Contributor

@Copilot 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.

PR Overview

This PR introduces a new setting for selecting the Home View and updates several navigation components to use the new HomeView logic.

  • Introduces a new HomeView type and retrieval function in navigation utilities.
  • Updates the Settings view to allow users to select their preferred home view and persists the preference.
  • Refactors authentication, router context, navigation bar, and task editing flows to use the new HomeView setting.

Reviewed Changes

File Description
src/utils/navigation.ts Adds HomeView setting, type, and retrieval functions.
src/views/Settings/Settings.tsx Implements home view selection UI and persistence logic.
src/utils/auth.ts Updates login redirection to use the new HomeView method.
src/contexts/RouterContext.tsx Adjusts the main routing logic to consider the home view setting.
src/views/Navigation/NavBar.tsx Updates navigation icons and routes with the new HomeView logic.
src/views/Tasks/TaskEdit.tsx Uses HomeView for determining the redirection after task editing.

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

Comments suppressed due to low confidence (1)

src/contexts/RouterContext.tsx:47

  • The updated routing logic only handles the case when home_view is 'my_tasks'; consider adding a fallback or additional condition to handle when home_view is 'tasks_overview' to prevent an undefined route.
const home_view = getHomeView()

@dkhalife dkhalife merged commit 1827853 into main Mar 4, 2025
5 checks passed
@dkhalife dkhalife deleted the home branch March 4, 2025 01:01
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