ULOG #15: Utopian V2 Contribution - Adding Work Experience to User Profile

in #ulog5 years ago

image.png

This is my second contribution to Utopian V2. Although it took more time than I expected, my PR was finally merged and closed.

Repository

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

Task Request

https://steemit.com/utopian-io/@gregory.latinier/utopian-v2-task-profile-module-work-experiences

Pull Request

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

Feature

work-experience-demo.gif

There are two parts to this post. First is a run-through of my commits history and the second is some technical explanation of the codes.

Commits History

There's a story behind every code.

The major parts in my commits history were:

  • 1794f2f - provided the skeleton - the layout - where I did my changes.
  • 101a243 - added the work experience fields to the user model (to persist the user information).
  • e3e52e7 - updated the work experience layout
  • e97b2d5 - added the work experience API end points
  • db1fb3c - code refactor
  • 8cb2742 - added delete experience function
  • f98fcb3 - exported strings to i18n
  • 4362837 - added validations
  • f811680 - added unit tests
  • 8df58af - sort experiences from most recent to oldest

Code Changes

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

1. API
1a. Main Codes
1b. Unit Tests
2. Client
3. Internationalization

Lessons Learned

I encountered a lot of challenges in completing this task. First, was my unfamiliarity with mongo API. Although I had an idea in mind of what I wanted to happen, my unfamiliarity with mongoose resulted in code smell. Gregory cleaned that up for me by what he did in his last commit:

He removed the getWorkExperience API end point and just returned the whole work experiences document to updateWorkExperience's response. The key mongoose method here was findOneAndUpdate.

The second challenge was my unfamiliarity with flex-box. Gregory just pointed me to use that to adjust the location of the plus icon.

And lastly was my unfamiliarity with vuelidate, this resulted again in code smell and I learned again from the codes committed by Gregory.

There were other changes made by Gregory in that commit. All of them were learnings for me.

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

Sort:  
  • Great job on sharing your lessons learned, everyone can benefit.
  • I see that Gregory gave you some great review comments already within your PR.
  • I'm a bit surprised that there is no comments in the code apart from the function headers.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thanks for the review. I forgot to write inline comments. Lol

Thank you for your review, @helo! Keep up the good work!

@eastmael You have received a 100% upvote from @steemconductor because this post did not use any bidbots and you have not used bidbots in the last 30 days!

Upvoting this comment will help keep this service running.

Hey, @eastmael!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Great to see you after a very long time :)

Thank you. Yup, not that actively posting but just developing.

Hi @eastmael!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Coin Marketplace

STEEM 0.28
TRX 0.11
JST 0.034
BTC 66274.97
ETH 3175.04
USDT 1.00
SBD 4.06