Skip to content

Latest commit

 

History

History
80 lines (58 loc) · 4.34 KB

CONTRIBUTING.md

File metadata and controls

80 lines (58 loc) · 4.34 KB

Contributing to this project

First off, thanks for taking the time to contribute! You are awesome! 🎉👏

Table Of Contents

How to contribute

Reporting Bugs

Before creating bug reports, please make sure there isn't already an existing issue describing your problem, for bugs are tracked as GitHub issues. Simply create an issue and provide the necessary information by filling in the template.

Suggesting Enhancements

Enhancement suggestions are also tracked as GitHub issues. Before creating enhancement suggestions, please check the existing issues as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please include as many details as possible. Fill in the template, including the steps that you imagine you would take if the feature you're requesting existed.

Pull Requests

Simply fill in the required template. Please do not include issue numbers in the PR title.

Git Commit Messages

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Consider starting your commit messages with one of the following emojis:
    • :heavy_plus_sign: when adding/implementing a feature or file
    • 🔨 :hammer: when fixing a bug or issue
    • 💚 :green_heart: when improving code, comments or docs
    • 🔑 :key: when dealing with security
    • 🔁 :repeat: when updating dependencies or data
    • 👕 :shirt: when removing linter warnings
    • ⚙️ :gear: when reconfiguring something
    • :x: when removing code or files

Adding Translations

You can add a new translation or improve an existing translation in the src/locales directory. Locales data is stored in JSON files that have the two character language abbreviation as filenames, i.e. en.json for English. The English language file serves as template for other languages. You can simply copy this file, translate all values by keeping the keys as they are and create a pull request. Please pay attention to the icon keys that don't need a translation (just leave them as they are).

Finally you can add your new language file in the src/main.js to the messages object under // Vue i18n.

Adding Achievements

Achievements are meant to keep the user motivated. It is really important that an achievement motivates success and makes somehow sense (good example: "10 successful days in a row", bad example: "alternating successful and failed days for 10 days").

You can propose a new achievements by providing the following information:

  • Key: one word that is unique among all achievements
  • Title: a catching, funny heading for the achievement
  • Description: an explanation how to get the achievement
  • Icon: a free FontAwesome icon. Simply use its name (i.e. address-book).

To implement an achievement, you have to touch the following files:

  • src/main.js: add your icon in camelCase style to both icon lists

  • src/locales/en.json: add your achievement key to the achievements list and provide title, description and icon

  • src/components/info/Achievements.vue:

    • Add your key to the keys list in the data() Object
    • Add your key and the corresponding status function to the getAchievementStatus () function
    • Implement your status function under computed. It always returns the following object:
    {
      // integer (how often the achievement was received, e.g. 2)
      state: count,
      // float (percentage how much progress till next achievement, e.g. 30.0)
      progress: progress,
      // integer (how many units left till next achivement, e.g. 5)
      left: left,
      // string (label of unit, e.g. 'day' or 'monday')
      unit: 'day'
    }