Closed vincanger closed 4 months ago
Then there is analytics. You grouped it all under
analytics/
which is great. But I wonder if it should be standalone. Because analytics is not neccessarily specific to admin. It is analytics, we collect them. Sure, only admin can check them, but even if there was no admin we would maybe check them somehow in the database? Ha, not sure. Maybe to belong under admin. What is your reasoning about analytics?
The thing is, all the components and logic within analytics is only being used in the admin dashboard. When I extract this dir, for example, I end up with some imports to other smaller components that are still within the admin dashboard, and are also only being used there. This makes me think that it's current, and possible only, home should be admin
. But, on the other hand, analytics itself is already kind of big, so it might be worth separating it. WDYT?
Edit: as an additional example, I currently have the AnalyticsDashboardPage defined like so:
route AdminRoute { path: "/admin", to: AnalyticsDashboardPage }
page AnalyticsDashboardPage {
authRequired: true,
component: import AnalyticsDashboardPage from "@src/admin/analytics/AnalyticsDashboardPage"
}
It seems weird to have this be the root /admin
path but be extracted from the admin
dir. Or does that seem ok to you?
extracting messages
makes more sense to me because the user may also interact with it, but analytics
is something the user never encounters or needs to think about -- it's always for the admins.
Discussed separately: we will try to split a part of analytics out.
Implements part of #149