Skip to content
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

Add default board on first use [$10 awarded] #197

Closed
2 tasks
juliusknorr opened this issue Jun 20, 2017 · 10 comments · Fixed by #527
Closed
2 tasks

Add default board on first use [$10 awarded] #197

juliusknorr opened this issue Jun 20, 2017 · 10 comments · Fixed by #527

Comments

@juliusknorr
Copy link
Member

juliusknorr commented Jun 20, 2017

from #12:

  • There should be one board called »Personal« by default from the beginning. Just like in the Calendar app with the first calendar, and for Contacts too with the default address book.
  • There should be default stacks in the first board for sure, and ideally also in every one created: To do, Doing, Done

This might be a good starter issue to get a bit into the php code part. So if anyone wants to give it a try, here is how the implementation should basically look like:

  • Implement a class OCA\Deck\Service\DefaultBoardService, methods could be checkFirstRun and createDefaultBoard
  • checkFirstRun(): Add a user config value like 'firstrun' to check if the default board has already been created for the current user
  • createDefaultBoard(): Create the board, stacks and cards that should appear by default
  • check and call createDefaultBoard in PageController::index()

The $10 bounty on this issue has been claimed at Bountysource.

@juliusknorr
Copy link
Member Author

@artemanufrij Are you still up for this?

@juliusknorr juliusknorr modified the milestones: 0.3.0, 0.4.0 Dec 16, 2017
@juliusknorr juliusknorr modified the milestones: 0.4.0, Backlog Jun 28, 2018
@juliusknorr juliusknorr changed the title Add default board on first use Add default board on first use [$10] Jul 6, 2018
@NebriBlackwing
Copy link
Member

Hello!

I'm interested in finding a solid open source project to contribute to, I wouldn't mind trying to tackle this. Will update once I get a dev environment setup and running locally on my machine.

@juliusknorr
Copy link
Member Author

@Nebri Hi, great to hear that and welcome here 😉

You'll find some details regarding the development environment at https://docs.nextcloud.com/server/13/developer_manual/general/devenv.html and https://github.com/nextcloud/deck#developing

If you have further questions, feel free to ask either here or join our IRC channel on freenode.net: #nextcloud-deck

@NebriBlackwing
Copy link
Member

NebriBlackwing commented Jul 10, 2018

it looks like I've got everything running correctly in my development virtual machine now :D. I'm a bit confused on how to set up my git config so that I can automatically sign on my commits to respect the projects Developer Certificate of Origin policy.

I'm using visual studio code, this is something that I absolutely will forget to do on a regular basis, any instructions / references on how to set that up so it's automatic would be most appreciated.

UPDATE: I just found the wonders that is gitkraken, was able to get everything setup from there! I'm at the point where I can start playing around with the code and get going on trying to close the issue now.

@NebriBlackwing
Copy link
Member

NebriBlackwing commented Jul 10, 2018

alright here is my first attempt at implementing the createDefaultBoard() function suggested by @juliushaertl https://github.com/Nebri/deck/commit/e208fd8222f457f3865f14d8feadfd822a4d754f (Work In Progress :))

I'm getting a null reference error on the new DefaultBoardService class that I created, but I'm really not sure how I need to instantiate it. Is there a factory / builder? I saw a mock builder in the unit tests but I don't think that's the way to go.

A little education on the application life cycle would be appreciated.

UPDATE: 683354d apparently I'm just out of practice. Managed to catch my own errors and got things working. Moving on to the config part of this :).

@NebriBlackwing
Copy link
Member

I found the IConfig and set it up in my DefaultBoardService, and tried setting a userValue through it. But that doesn't appear to be persisting as each time I test it in my local browser, it's always coming back yes.

Commit in question: a36dfcc Can anyone give me some insights here? Am I missing a step to persist it to database?

@juliusknorr
Copy link
Member Author

@Nebri I've added some comments to the commits, but in general this looks pretty good already. 👍

Please make sure you use tabs instead of spaces when coding, since those are used across the project.

@NebriBlackwing
Copy link
Member

@juliushaertl I'm trying to address the l10n translations in my code, I think I've implemented it correct but I"m not sure where l10n is pulling it's strings from. I've found the folder l10n which keeps the translations as I was expecting. I tried adding the new strings into en_GB.js + en_GB.json expecting that populate the strings, however l10n->t is still returning back empty.

Is there another process that generates these files?

Link to Commit

@juliusknorr
Copy link
Member Author

The translations are added automatically every night by a bot based on the translations from transifex: https://www.transifex.com/nextcloud/nextcloud/

No need to care about this further 😉 manually added translations there would be overwritten anyway.

@juliusknorr
Copy link
Member Author

Also feel free to already open a pull request with your work in progress changes. This makes testing, reviewing and keeping track a bit easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants