Repository navigation
Project Analytics Config Page - #93
Conversation
aishanibal
commented
Sep 26, 2026
- Add an Analytics entry to the project sidebar and a dedicated /proj…ects/[projectId]/analytics page for CRUD operations on project's analytics config only.
- No Analytics Configuration card when none exist, matching the style of the file and email config pages.
- getAnalyticsConfig returns null only on 404; throws 401 for auth failures and shows an error alert instead of looking like an empty state
- Delete the config by the current projectId, not the table row id; only one config could be made which would always be row id = 0, passing 0 as the parameter in function that deletes configs by projectId (always deleted project 0 config id)
- Move the analytics table out of Settings; point the project dashboard card at the new page; add the "Analytics" top bar title
✅ Deploy Preview for juno-dashboard ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Disclaimer: This comment was AI-generated and is not necessarily completely accurate. Please take code comments with a grain of salt.
|
| </Alert> | ||
| )} | ||
| {isError ? null : !isLoading && analyticsConfigRowData.length === 0 ? ( | ||
| <Card className="max-w-[35%]"> |
There was a problem hiding this comment.
Empty card too narrow On a mobile screen,
max-w-[35%] limits the card to roughly a third of the available width. That squeezes the explanation and setup button into a narrow column. Let the card use the available width on mobile and constrain it only on larger screens.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| <Alert className="border-red-500/20 bg-red-500/10"> | ||
| <div className="flex items-center gap-2 text-red-400"> |
There was a problem hiding this comment.
Alert colors bypass theme The new error alert hardcodes red border, background, and text colors, so it will not follow changes to the configured destructive theme colors. Use the existing destructive alert styling instead.
| <Alert className="border-red-500/20 bg-red-500/10"> | |
| <div className="flex items-center gap-2 text-red-400"> | |
| <Alert variant="destructive"> | |
| <div className="flex items-center gap-2"> |
| if (isError) { | ||
| toast.error("Error", { | ||
| description: `Failed to fetch project: ${JSON.stringify(error)}`, | ||
| }); | ||
| } |
There was a problem hiding this comment.
…ects/[projectId]/analytics page for CRUD operations on project's analytics config only. - No Analytics Configuration card when none exist, matching the style of the file and email config pages. - getAnalyticsConfig returns null only on 404; throws 401 for auth failures and shows an error alert instead of looking like an empty state - Delete the config by the current projectId, not the table row id; only one config could be made which would always be row id = 0, passing 0 as the parameter in function that deletes configs by projectId (always deleted project 0 config id) - Move the analytics table out of Settings; point the project dashboard card at the new page; add the "Analytics" top bar title
a36be6c to
5a80410
Compare
- Move toast.error calls from render path to useEffect hooks in analytics page and table - Use Alert variant='destructive' instead of hardcoded red colors - Improve delete dialog copy to clarify it deletes this project's config - Make empty-state card responsive (full width on mobile, max-w-md on larger screens) Co-authored-by: Rohan Godha <hi@rohangodha.com>
5a80410 to
707cdad
Compare