-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix(new-tab): add persons/cohorts #38058
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
Conversation
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.
1 file reviewed, 1 comment
const products = [...getDefaultTreeProducts(), ...getDefaultTreePersons()] | ||
.map((fs) => ({ | ||
href: fs.href, | ||
name: fs.path, | ||
icon: getIconForFileSystemItem(fs), | ||
flag: fs.flag, | ||
})) | ||
.filter(({ flag }) => !flag || featureFlags[flag as keyof typeof featureFlags]) | ||
.toSorted((a, b) => a.name.localeCompare(b.name)) |
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.
syntax: inconsistent property definitions in cohorts data
In the getDefaultTreePersons
function, the Cohorts object uses type: 'cohort'
while the Persons object uses iconType: 'person'
. This inconsistency could cause issues with icon rendering.
const products = [...getDefaultTreeProducts(), ...getDefaultTreePersons()] | |
.map((fs) => ({ | |
href: fs.href, | |
name: fs.path, | |
icon: getIconForFileSystemItem(fs), | |
flag: fs.flag, | |
})) | |
.filter(({ flag }) => !flag || featureFlags[flag as keyof typeof featureFlags]) | |
.toSorted((a, b) => a.name.localeCompare(b.name)) | |
const products = [...getDefaultTreeProducts(), ...getDefaultTreePersons()] | |
.map((fs) => ({ | |
href: fs.href, | |
name: fs.path, | |
icon: getIconForFileSystemItem(fs), | |
flag: fs.flag, | |
})) | |
.filter(({ flag }) => !flag || featureFlags[flag as keyof typeof featureFlags]) | |
.toSorted((a, b) => a.name.localeCompare(b.name)) |
Context Used: Context - When using HogQL, ensure that property definitions are explicitly typed to avoid errors related to type strictness. (link)
Size Change: 0 B Total Size: 2.73 MB ℹ️ View Unchanged
|
Problem
The persons and cohorts pages were missing on the new tab page.
Changes
I kept it as "Persons" for now, as that's the name of the menu entry, however we probably should talk if we want to rename it.
How did you test this code?
👀