Closed nelsonic closed 1 year ago
I can take this issue but I just have two questions:
dwyl
members can access it? (implementation-wise)live
channel that already exists be better? Or should I create a new channel dedicated to metrics? I feel like re-using would be easier/more readable but I can't figure out if it can be "too coupled" for long-term maintainability. Hi @LuchoTurtle thanks for reading and replying. 🙏
really hope you're feeling much better. 🤒 -> 😊 🤞
To answer your two questions:
RBAC
, so anyone/everyone using the MVP
can see the stats and consider it a "leaderboard" of sorts. 😜 MVP
it doesn't really matter if you re-use the live
channel cause the amount of data being sent will be tiny. But I'd say that the "best practice" would be to have a stats
channel that is specific to the /stats
page to reduce noise on the wire. 💭 Thanks for looking into this. Will be great to have some stats/metrics! 🎉 And once the basics are done, we can do graphs too! 📈
This is what I had in mind:
SELECT i.person_id,
COUNT(distinct i.id) AS "num_items",
COUNT(distinct t.id) AS "num_timers"
FROM items i
LEFT JOIN timers t ON t.item_id = i.id
GROUP BY person_id
ORDER BY person_id
Basic AF:
But it's all we need to get started. 👌
Compact table:
@LuchoTurtle please investigate why. 🔍 If you get stuck ping me on Signal and we can remote-pair/debug via Zoom. 💭
It looks like the query is not correct:
** (Postgrex.Error) ERROR 42702 (ambiguous_column) column reference "person_id" is ambiguous
(you can see the logs running flyctl logs inside the mvp app folder)
Yeah @SimonLab , I'm working on a PR to fix this. The PR will also address a few bugs introduced which don't update the stats properly. I'll be opening an issue shortly.
Created an issue https://github.com/dwyl/mvp/issues/261 and associated PR https://github.com/dwyl/mvp/pull/262.
Appears to be working. 👍 Thanks again @LuchoTurtle
At present I don't have any metrics/stats for my usage of the
MVP
. 😞Story
People
Using theMVP
As a
person
using the @dwylMVP
to test the features and give feedback https://github.com/dwyl/mvp/issues/140 Iwant
a quick way of viewing basic aggregate stats on how manyitems
andtimers
I have createdSo
that I know how much I'm using theMVP
to improve my personal effectiveness.People
Building theMVP
As a
person
building the @dwylMVP
to solve a personal problem faced with existing task trackers or ["personal productivity" tools...] Iwant
to know if theMVP
is being used by anyoneSo
that I know if the features are being used.Todo
/stats
LiveView
page that renders the data and is updated in real-timestats
channel should only be used for aggregate data i.e. nothing personally identifiable.Build a basic metrics dashboard that displays:
[x]
person_id
[x] Number of
items
[x] Number of
timers
[x] Display the data as a
<table
> (we can create pretty graphs later!)So we will want a visual representation of their usage similar to what
GitHub
has with their contribution graph:We will encourage people to have "streaks" or at least to know they are making progress toward their goals. This is "Step 1" on the Roadmap: github.com/dwyl/product-roadmap#why-are-we-building-an-app Knowing that you are making daily progress towards your goals is the secret to personal effectiveness and staying focussed long-term and not getting distracted ... See: mattcutts.com/blog/seinfeld-calendar-trick
Longer term this will be a feature in itself. But for now we just need something basic. 🙏