Deck: Add default board on first use [$10 awarded]

Created on 20 Jun 2017  路  10Comments  路  Source: nextcloud/deck

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 OCADeckServiceDefaultBoardService, 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.

2. developing bounty enhancement good first issue hacktoberfest

All 10 comments

@artemanufrij Are you still up for this?

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.

@Nebri Hi, great to hear that and welcome here :wink:

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

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.

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: 683354da9d89a5275aa18a32ca3845e793ef1b29 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 :).

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: a36dfcc14448422da75a5fc8048f74593e4893df Can anyone give me some insights here? Am I missing a step to persist it to database?

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

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

@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

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 :wink: manually added translations there would be overwritten anyway.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

poVoq picture poVoq  路  4Comments

Dubidubiduu picture Dubidubiduu  路  4Comments

desperateCoder picture desperateCoder  路  3Comments

wdfee picture wdfee  路  4Comments

fm-sys picture fm-sys  路  4Comments