-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[issue-#39] It is now possible to download group of contacts. #667
[issue-#39] It is now possible to download group of contacts. #667
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello!
Thanks for your pr! Unfortunately such mechanism is too expensive on the browser. We won't add such thing . The better way is to create a carddav plugin on the server to allow the retrieval of a set of vcard directly instead of a one by one. :/
I'll leave this pr opened for discussion but I am blocking this as this is not the optimal way to add this feature :)
If you want some example on how to do that, I added some infos on this comment: #39 (comment) I will gladely help you if you want to create this plugin (check with @brjhaverkamp as well) |
Hi, We would need a "CardDAV" plugin handling the request, based on an URL as an argument, right? And this plugin would be a part of the "Contacts" project and the router of this project would trigger the execution of the plugin, resulting in the creation of the requested *.vcf file. Right? That way, the result would be computed on the server side and not on the client side by the browser evaluating the JavaScript expressions. Do I get it? By the way: For the use case I have in mind, it is important that more than one address book can be used. Say five address books contain users from ten different groups and I want to export all members of a certain group, regardless of the address book they are stored in. |
I did not looked as I'm on vacation (shame on me for checking github ;) ) But looking at the code it should look ok yes :)
Yes, basically (Not really sure) it would be a request with params (array of urls?, multidimensional array of addressbooks and vcards? pick one or find another alternative 😉 ) that is sent to the server. Not really related to the 'calendar' project like you said, but I'll assume you meant carddav/caldav/webdav? If so yes! :)
Exactly that yes! The js computation will be too heavy. We need to delegate the work to the server for that (should be easy for it since this is basically a simple string concat) :) |
If you need anything regarding the server part or the way our plugins work, please come on irc on #nextcloud-dev, and ask your question! It's nice seeing more people on board 🤗 |
I wrote "Calendar" and meant "Contacts". I'm sorry for that. I just wanted to know if I need to touch another App for that. That's why I asked. Sounds like no, I don't. Well I don't know when I will find the time to implement this. But at least I have a better picture of what needs to be done. Maybe that also helps @brjhaverkamp if he is also working on it... |
Alright. Now the *.vcf files to be exported get indeed created on the server side. Unfortunately I wasn't able to do it using a "CardDAV" plugin. Instead I added a new route, added a method to the PageController and created a GroupExportService to construct my result. This service is the worst part: I used simple database queries to fetch the data and combined it into a string... I think I need to understand the "dav" project and especially the idea of the ImageExportPlugin to avoid this mess. Anyway. It works. If you got some advice for me, go ahead. Oh and please enjoy your vacation first. No need to hurry. |
This is looking close to what we need to do :)
No need to rush for this feature yes. If you're okay with that, I can open a pull request with you on /server and we can start working this feature a bit? So that we could implement it on the next releases? :) |
Ok, so we got a little misunderstanding here. When I asked:
I specifically meant: Do I need to touch other apps than this one to achieve what I want? And I thought the answer was No, but the answer seems to be Yes. So... I think we should open a forum thread or something on this and discuss the requirements first. Only than it will be possible to implement exactly what we need, won't it? Thanks for your quick reply again. I am learning a lot about Nextcloud here. Never contributed to it before, so... It's fun. |
@charismatic-claire I'm so sorry for the misunderstood 😝 |
Did it. |
Alright. Let me know if this is doable. Promises still confuse me, but I think I got it (almost) right... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Claire! :)
Awesome work! Though a bit of changes are needed because you fetch data we already have.
If you don't have this already, I'll strongly suggest you install the vue devtools: https://github.com/vuejs/vue-devtools
You'll be able to see the store data and the current data/props of the views of the app (if you do not compile in production the app) :)
The changes requests are separated for readability, so it might looks a lot, but don't worry! If you have any other way to do something similarly, ignore my code comments! 😉
👐
…tup." This reverts commit ba3dbd3.
6b0a889
to
94f50c7
Compare
…ownload-contact-group-nextcloud#39 Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
94f50c7
to
5847f27
Compare
Works really nicely!!! Thanks a lot! |
Works very well, will give approval when the code remarks above have been addressed! :) |
@charismatic-claire Could you also add your copyright in the headers of the files you edited please? :) |
@skjnldsv Since I only changed |
Leave the copyright, since I created this file originally. But add a new Like the team popcorn did here:
|
@charismatic-claire By the way! We're loving new contributors like you! We're meeting for new releases of nextcloud with a lot of contributors and we help a lot for the travel expenses! The next planned one is the week of the 11/03 in Stuttgart. We'd love to have you there! 😉 Feel free to reach us! 🤗 |
Hi John, sorry, it has been a long time since I checked this thread. Well, thank you! I'm kind of proud that you said that and invited me to your next meeting.
Yeah about that: Actually it is my job. I'm a programmer. I wanted to learn JavaScript and Vue.js and a friend of mine needed this feature so I decided to just do it. Actually, I really want to learn more JavaScript and more Vue.js in the future, so I might stay engaged with Nextcloud. Thanks again for your kind way of supporting me with my first real contribution to an open source project! |
@charismatic-claire awesome to hear! 🎉 We also have the annual nextcloud conference https://nextcloud.com/conf/ |
I everyone. I implemented a way to solve issue #39 .
Please review and let me know if I need to change this in order to make it really work.