-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref(quick-start): Prevent 'complete' tasks from being displayed outside of the completed tasks list #80172
ref(quick-start): Prevent 'complete' tasks from being displayed outside of the completed tasks list #80172
Changes from 4 commits
adadff5
c34db94
84d57b6
2f6de17
c6dbb26
fd8b878
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,12 +73,11 @@ export function NewOnboardingStatus({ | |
}); | ||
|
||
const label = walkthrough ? t('Guided Tours') : t('Onboarding'); | ||
const totalRemainingTasks = allTasks.length - doneTasks.length; | ||
const pendingCompletionSeen = doneTasks.length !== completeTasks.length; | ||
const allTasksCompleted = allTasks.length === completeTasks.length; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It’s better to check for |
||
|
||
const skipQuickStart = | ||
!organization.features?.includes('onboarding') || | ||
(completeTasks.length === allTasks.length && !isActive); | ||
!organization.features?.includes('onboarding') || (allTasksCompleted && !isActive); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this feature flag defined? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, i found it, it is only registered in our API |
||
|
||
const unseenDoneTasks = useMemo( | ||
() => | ||
|
@@ -111,7 +110,7 @@ export function NewOnboardingStatus({ | |
}, [onShowPanel, isActive, walkthrough, markDoneTaskAsComplete, organization]); | ||
|
||
useEffect(() => { | ||
if (totalRemainingTasks !== 0 || skipQuickStart || quickStartCompleted) { | ||
if (!allTasksCompleted || skipQuickStart || quickStartCompleted) { | ||
return; | ||
} | ||
|
||
|
@@ -123,11 +122,11 @@ export function NewOnboardingStatus({ | |
|
||
setQuickStartCompleted(true); | ||
}, [ | ||
totalRemainingTasks, | ||
organization, | ||
skipQuickStart, | ||
quickStartCompleted, | ||
setQuickStartCompleted, | ||
allTasksCompleted, | ||
]); | ||
|
||
useEffect(() => { | ||
|
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.
when we pass the status here, if it’s 'complete' but not yet 'seen,' the task is displayed with the style of a complete task but does not appear in the completed list. To fix this issue, it’s better to omit the status in this context
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.
Shouldn't we instead fix the check in the group by completed/non completed tasks in
groupTasksByCompletion
?sentry/static/app/components/onboardingWizard/newSidebar.tsx
Line 54 in 2f6de17
We check there if the task is seen and completed.