Closed wmnnd closed 1 year ago
The new contact activity stream data is now also used on a new and improved campaign stats page:
@panoramix360: If you want to give this a try, I think it’s ready to merge now :-)
Taking a look right now! I notice that you updated the Elixir to 1.14, I was going to work on it this week.
But it's great that you already managed to do it!
Congratulations on reaching this UX/UI design, I'm too bad in UX/UI to reach this state haha I'm only good at coding it haha
I analyzed two points for now:
We need to update the docker-compose.yml
and Dockerfile
inside the dev_container directory with the new version of Elixir, since we updated it on the project.
I already updated it locally for testing, and it worked.
I saw that you used the chart.js
library to create the graphics, really nice addition and it'll be good to use it on future features.
But the way it is done with the chart hook currently, could be challenging to maintain or modularize, maybe a good idea would be to create more JavaScript files to break the code. I tend to think that for the front end, there are some things that the Phoenix framework doesn't help us too much hehe
I notice some console.log
as well on the insertOrUpdateGraph
function, it's good to remove them.
Tomorrow morning, I'll resume my review and let you know.
I hope that what I already reviewed could help the project :smile:
@panoramix360 Thanks for giving it a look! :heart:
I’ve now updated the Elixir version for the devcontainer setup to 1.14.0 as well.
Also good that you noticed the console.log
:sweat_smile: I agree that the current JS code isn’t very modular; we should probably refactor it at some point when we need more graphs in other places.
I’ve added some code that improves error handling in the delivery queue. This should help with campaigns being stuck on "sending" in case of delivery errors. Fixes #142.
Great! I'll continue the review then!
Now also implements #172.
@panoramix360 & @gbottari: Do you have more notes on this PR or do you think we’re good to go? :relaxed:
Hi @wmnnd
Sorry for not answering earlier, I had a full week.
I just want to make some assertions to see if I understood correctly:
update_contact_status
, if there is an error getting the contact, I think the error handling is not being dealt with.project_id
is passed down to the contact to be created, it's simpler.39
to create the Recipientrecipient_stats
, the hardcoded queries are not that great, but I don't know if there is a more robust way to do it heheIn general, the other updates were pretty straightforward, so congratulations :D
I think it's good to merge, we can do some improvements later as well when we test some more with users.
Sorry again for not being more present on this, I need to organize my schedule better to work on this repo more haha
Thanks for your notes! I have added an explicit nil
return for the update_contact_status
function. Maybe the functions should actually throw an exception instead, but at least it’s explicit now :smile:
The literal ID in builder.ex is just a valid UUID for when there is no actual recipient - e.g. when creating an email preview.
I also agree that the queries for the campaign stats could probably be optimized, but they seem to be working quite well so far :)
Great! :D
Two issues closed with one PR.
When I mentioned the queries I was referring to the way they are written on strings, not about the performance hehe, but yeah, we can try to fix this later
This PR implements #168 and is a complete refactoring of the way recipient events (e.g. unsubscribes, bounces, clicks, etc) are handled. It also includes an improved display of that information in the contact and campaign stats views.![activity-stream](https://user-images.githubusercontent.com/7488303/210020282-4accf7b6-f4cd-4f8d-9490-dabfa86d4a51.png)