ULOG #14: Contributing to Utopian V2 - Allowing External Contributions

eastmael(68)
Published in
#ulog
Words
367
Reading
2 min
8y
Listen to this post
~2 min

utopian_updates_color.jpg

As announced in SF3, Utopian team will be releasing Utopian v2 on April 2019 just after the planned release of SMTs. This contribution is but a tiny drop in an ocean of contributions.

Repository

https://github.com/utopian-io/v2.utopian.io

Task Request

https://steemit.com/utopian-io/@gregory.latinier/utopian-v2-task-project-module

Pull Request

Add the Allow External Contributions toggle to the project form

Feature Image

image.png

Lessons Learned

There were a couple of issues I encountered when I started my development. First, as you may have guessed it, was setting up my development environment. I vented out this frustration to gregory.latinier@gregory.latinier and he was gracious enough to listen and helped me resolve the issues. Eventually, some of the errors I encountered were caused by the values I set in my .env.

The second was my unfamiliarity with screen layouts. I had three attempts related to this with the last one eventually being accepted.

My first attempt was a combination of a q-field and a q-toggle under it. This worked but Gregory suggested to move the label to the right of the toggle instead of above it. I did this but I didn't like the excess space it created so I went with a q-list which was my second attempt. Gregory didn't like how the q-list looked so we ended up using q-toggle's label property.

I guess what I want to emphasize here is - UI is something that changes often that it's often beautified later. That's the direction Gregory wants and is something I agree to as well.

Technical Explanation of the Contribution

And now the boring stuff...

https://github.com/utopian-io/v2.utopian.io/pull/156/files

These were the main files updated for this contribution.

1) Client Module
  1. /packages/client/src/pages/projects/create-edit/create-edit.vue
    • the project form; added the allowExternals field, some styling, and some code clean-up for errors spat out by greenkeeper
2) API Module
  1. /packages/api/modules/projects/handlers.js
    • added allowExternals to mongoose select for it to be included in the response payload
  2. /packages/api/modules/projects/project.model.js
    • added the allowExternals field to the project model
  3. /packages/api/modules/projects/validate.js
    • added validation to require callers to include allowExternals when submitting new projects (createProject) or updating (updateProject) them
2.1) Unit Tests
  1. /packages/api/test/fixtures/projects.js
  2. /packages/api/test/modules/projects/projects.handlers.spec.js
    • added two test cases to check for projects that had this flag set to true (accepts external contributions) or false
3) i18n Module
  1. /packages/i18n/locales_master/de.json
  2. /packages/i18n/locales_master/en.json
    • added the allowExternals.label string

GitHub Account

https://github.com/eastmaels

This post was made from https://ulogs.org

ULOG #14: Contributing to Utopian V2 - Allowing External Contributi... | Ecency