-
Notifications
You must be signed in to change notification settings - Fork 51
feat(web): remove auth requirement to simplify onboarding #1404
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
Open
tyler-dane
wants to merge
52
commits into
main
Choose a base branch
from
feat/onboarding
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
1cc66ae
feat(web): add tests for onboarding improvements
tyler-dane bcd9704
fix(web): skip task seeding in test environment
tyler-dane 6cf674d
fix(web): fix test for cmd+k keyboard event handling
tyler-dane 367fd91
fix(backend): prevent duplicate instance when COUNT is specified in r…
tyler-dane c714c57
refactor(web): extract onboarding useEffects into separate custom hooks
tyler-dane 889f94a
fix(web): fix failing onboarding tests
tyler-dane 82e4fe2
feat(web): implement command palette guide for onboarding
tyler-dane 64a29d8
feat(web): enhance onboarding with command palette guide tests
tyler-dane 92b182a
refactor(web): remove OnboardingOverlay component and integrate CmdPa…
tyler-dane b94777b
feat(web): enhance onboarding guide with step completion tracking
tyler-dane f151324
feat(web): refactor onboarding storage management and enhance progres…
tyler-dane bb54bf1
feat(web): update CmdPaletteGuide to display contextual welcome messages
tyler-dane 1559e68
feat(web): extend CmdPaletteGuide with step 4 and enhance onboarding …
tyler-dane e5b122c
feat(web): refactor onboarding steps to use constants for improved cl…
tyler-dane d5cf873
feat(web): enhance onboarding experience with new steps and improved …
tyler-dane 410794c
refactor(web): standardize onboarding storage utilities and improve s…
tyler-dane c4fd05c
fix(web): update CmdPaletteGuide step counts and remove deprecated step
tyler-dane b972901
feat(web): integrate CmdPaletteGuide into CalendarView and enhance su…
tyler-dane 5ac651d
feat(web): integrate CmdPaletteGuide into AuthenticatedLayout and enh…
tyler-dane 5cc9ad4
Merge branch 'main' into feat/onboarding
tyler-dane 77b0ba9
Update packages/web/src/auth/UserProvider.tsx
tyler-dane 3601507
fix(web): address PR review comments for onboarding flow
tyler-dane 811ab9f
refactor(web): improve useAuthPrompt and extract useUser hook
tyler-dane 701a39a
chore: revert `gcal.event.rrule.ts`
tyler-dane 895c81f
chore: add dexie and dexie-react-hooks dependencies to package.json
tyler-dane 64d91b2
chore: add baseline-browser-mapping and fake-indexeddb dependencies t…
tyler-dane 5ba256a
feat(web): enhance event creation saga for unauthenticated users
tyler-dane 9e083f0
feat(web): add unit tests for getUserId function in auth.util
tyler-dane eeb824f
feat(web): implement IndexedDB storage for events and enhance saga fo…
tyler-dane 5f6205d
test(web): enhance tests for Sidebar interactions and session handling
tyler-dane bac8b27
feat(web): implement EventRepository with local and remote storage ha…
tyler-dane eb7ed12
feat(web): add event repository utilities for local and remote storage
tyler-dane 18b7a52
refactor(tests): remove Calendar.render.test.tsx file
tyler-dane f1adaa8
feat(tests): add unit tests for LocalEventRepository and LocalTaskRep…
tyler-dane d322254
Update packages/web/src/routers/loaders.ts
tyler-dane 5351e68
fix(tests): remove showCmdPaletteTutorial from useAuthPrompt test
tyler-dane cac83ab
Update packages/web/src/common/repositories/event/event.repository.in…
tyler-dane d8b7a96
feat(tests): refactor Jest configuration to support multiple projects
tyler-dane e1eebd3
feat(onboarding): implement DayOnboardingOverlays component and relat…
tyler-dane 92c5ef6
feat(onboarding): integrate onboarding overlays and related components
tyler-dane 83ada8a
feat(onboarding): enhance CmdPaletteGuide with dynamic instructions a…
tyler-dane 38139f8
feat(onboarding): introduce NAVIGATE_TO_DAY step and update onboardin…
tyler-dane 7148725
refactor(onboarding): streamline CmdPaletteGuide and onboarding step …
tyler-dane 07a4d82
refactor(event): remove isOptimistic flag from event handling
tyler-dane cd921a6
refactor(event): simplify event saga by removing unauthenticated user…
tyler-dane 739fa8a
feat(auth): add AUTH_PROMPT_DISMISSED key to local storage management
tyler-dane 6c7464a
feat(auth): refactor local storage management for authentication states
tyler-dane cf2f477
feat(auth): implement useIsSignupComplete hook and refactor onboardin…
tyler-dane 5a9d041
Merge branch 'main' into feat/onboarding
tyler-dane e40ca95
feat(auth): update authentication flow to redirect to Day view
tyler-dane 76cb0fe
feat(event): refactor event editing to utilize session and repository
tyler-dane 9a612d4
refactor(event): update event repository methods and remove unused Re…
tyler-dane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
packages/web/src/__tests__/utils/repositories/repository.test.factory.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| import { Origin, Priorities } from "@core/constants/core.constants"; | ||
| import { Event_Core } from "@core/types/event.types"; | ||
| import dayjs from "@core/util/date/dayjs"; | ||
| import { createMockStandaloneEvent } from "@core/util/test/ccal.event.factory"; | ||
| import { Task } from "@web/common/types/task.types"; | ||
|
|
||
| /** | ||
| * Factory function to create a test Event_Core with sensible defaults. | ||
| * @param overrides - Partial event properties to override defaults | ||
| * @returns A complete Event_Core object | ||
| */ | ||
| export const createTestEvent = ( | ||
| overrides: Partial<Event_Core & { order?: number }> = {}, | ||
| ): Event_Core & { order?: number } => { | ||
| const dateStr = dayjs().format(dayjs.DateFormat.YEAR_MONTH_DAY_FORMAT); | ||
| return { | ||
| _id: `event-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`, | ||
| title: "Test Event", | ||
| startDate: dateStr, | ||
| endDate: dateStr, | ||
| origin: Origin.COMPASS, | ||
| priority: Priorities.UNASSIGNED, | ||
| user: "user-1", | ||
| ...overrides, | ||
| }; | ||
| }; | ||
|
|
||
| /** | ||
| * Factory function to create multiple test events. | ||
| * @param count - Number of events to create | ||
| * @param overrides - Partial event properties to override defaults (applied to all events) | ||
| * @returns Array of Event_Core objects | ||
| */ | ||
| export const createTestEvents = ( | ||
| count: number, | ||
| overrides: Partial<Event_Core> = {}, | ||
| ): Event_Core[] => { | ||
| return Array.from({ length: count }, (_, index) => | ||
| createTestEvent({ | ||
| ...overrides, | ||
| _id: overrides._id || `event-${index + 1}`, | ||
| title: overrides.title || `Event ${index + 1}`, | ||
| }), | ||
| ); | ||
| }; | ||
|
|
||
| /** | ||
| * Factory function to create a test CompassCoreEvent (for edit operations). | ||
| * Uses the existing factory from @core/util/test/ccal.event.factory. | ||
| * @param overrides - Partial event properties to override defaults | ||
| * @returns A complete event object compatible with CompassCoreEvent | ||
| */ | ||
| export const createTestCompassEvent = ( | ||
| overrides: Parameters<typeof createMockStandaloneEvent>[0] = {}, | ||
| ) => { | ||
| return createMockStandaloneEvent(overrides); | ||
| }; | ||
|
|
||
| /** | ||
| * Factory function to create a test Task with sensible defaults. | ||
| * @param overrides - Partial task properties to override defaults | ||
| * @returns A complete Task object | ||
| */ | ||
| export const createTestTask = (overrides: Partial<Task> = {}): Task => { | ||
| return { | ||
| id: `task-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`, | ||
| title: "Test Task", | ||
| status: "todo", | ||
| order: 0, | ||
| createdAt: new Date().toISOString(), | ||
| ...overrides, | ||
| }; | ||
| }; | ||
|
|
||
| /** | ||
| * Factory function to create multiple test tasks. | ||
| * @param count - Number of tasks to create | ||
| * @param overrides - Partial task properties to override defaults (applied to all tasks) | ||
| * @returns Array of Task objects | ||
| */ | ||
| export const createTestTasks = ( | ||
| count: number, | ||
| overrides: Partial<Task> = {}, | ||
| ): Task[] => { | ||
| return Array.from({ length: count }, (_, index) => | ||
| createTestTask({ | ||
| ...overrides, | ||
| id: overrides.id || `task-${index + 1}`, | ||
| title: overrides.title || `Task ${index + 1}`, | ||
| order: overrides.order !== undefined ? overrides.order : index, | ||
| }), | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { createContext } from "react"; | ||
| import { UserProfile } from "@core/types/user.types"; | ||
|
|
||
| export const UserContext = createContext< | ||
| | Partial< | ||
| { isLoadingUser: boolean; userId: string } & Omit<UserProfile, "_id"> | ||
| > | ||
| | undefined | ||
| >(undefined); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UserProvider now allows unauthenticated users to proceed (line 49-52), but the conditional check
if (isLoadingUser && userId === null)might cause issues. When a user is authenticated,userIdwill be truthy, souserId === nullwould be false, meaning the loader won't show even during initial loading whenisLoadingUseris true. Consider changing the condition toif (isLoadingUser)or adding an additional check to handle the authenticated loading state.