Closed katafrakt closed 1 year ago
This is awesome, thank you for creating this PR, @katafrakt! :partying_face:
Here are some small changes to the code I’d suggest:
KeilaWeb.ContactsCsvExport
in lib/keila_web/helpers
with a function stream_csv_response/3
that takes as its first argument Plug.Conn
and the arguments for Contacts.stream_project_contacts/2
as its second and third argument.:keila
key to something like config :keila, KeilaWeb.Helpers.CsvExport, chunk_size: 100
@wmnnd I made the changes you suggested.
I'm not 100% sure about the location of the download button in the segment page. It is very detached from the contacts list. And, until the segment will be saved, it will not reflected the changes done by the user. Now I'm thinking that maybe that button should be even placed here?
Not sure though, it's your project and you have the vision for it, I'm just sharing some thoughts.
@katafrakt Can you give me write permissions to your branch so I can adjust the button positions? Then I’ll merge your PR :smiley:
@wmnnd you should already have it. At least that's how I always understood this option.
Ah, you’re right. Looks like this just didn’t work with Github’s github.dev editor.
Thank you for your contribution, @katafrakt! I have just released a new version that includes mainly your new feature :partying_face:
This adds possibility to export contacts from a project or a segment to CSV, compatible with CSV import. It addresses #110.
I wasn't really sure where to put the buttons, so please advise for a better place.
Screenshots
Notes
The code in these two controllers look very similar. I wasn't sure if it makes sense to abstract it out and especially - where. This feels like highly controller-level code, so pushing it to a context does not feel right. There could be a shared codebase space for just controllers, but I didn't want to just create it without consultation.