Skip to main content

Release 0.3 - Pull Requests Telescope & LifeStyle Ecommerce

In my previous post, I revealed the issues I will be attempting to resolve in order to contribute for an internal project and an external project. I also detailed the projects themselves, so if you haven't already read my previous post, I would advise starting there to give my current post some context.

I can successfully say I reached the goals I set for both the external and internal project in my previous post. Keep reading to find out how I did this, and the challenges I overcame.

Internal Pull Request

Adding Pagination to CDOT Telescope

The responsive page navigation is circled at the bottom

This issue was assigned to me by a colleague and was much trickier than I initially anticipated. The issue simply required to implement paginating functionality to the front end, so that the blog posts are displayed in pages instead of all  being displayed in one very long scrollable feed.

The first challenge came with the starting point. The home page was designed with a very specific bootstrap library (MD Bootsrap) that had some different conventions from traditional bootstrap, therefore I had to pull up the documentation for that library to figure out how to design the page navigation. 

From there I proceeded to implement the functionality in a JS file called Pagination.JS using jQuery. Since the original contributor used a CDN link to jQuery it was not recognizing any of my code initially. After further investigation, I found that the script tag calling the library MUST come before the script tag calling my file in order for it to recognize my jQuery. 

The next challenge was making sure it is implemented in a modular way so that it can be easily configured for how many blog posts per page by simply changing the value of the "limtitPerPage" variable. 

The final bug I bumped into was the eslint linter test. It was initially not recognizing jQuery so I had to add that in it's configuration file, but then it was still throwing errors. These errors involved things such as using "++" operators, or having strings and comments over 100 characters per line. Since I was dynamically creating HTML tags, some strings needed to be long. 

My first approach was to change the rules to correct this problem, but the community rejected this solution as it would conflict with the selected AirBnB standards. So at this point I learned that it would make more sense to change my code, rather than the rules to pass eslint's test.

External Pull Request

Re-Building LifeStyle Ecommerce as an Angular App

This was my biggest issue I've taken to date and it was as challenging as expected. Although it is a smaller project (5 Contributors), I gravitated towards this because it is a front-end theme meant to be used a starting point for web based e-comemrce projects. As a former freelance web developer I always appreciated this kind of projects as expedite the process and provide great starting points.

As I expected, the major challenge here was going to be in re-implementing the logic in typescript. The original app is a basic HTML, CSS, & JS stack with the use of common libraries like bootstrap. These all translate well into angular so re-building this isn't too difficult, just a little tedious. While Javascript (ES6) is syntactically very similar to Typescript, it cant be simply copied over in a singular file. This is mainly for the logic that dictates the state of the app, for example, items being added to the cart while shopping, would have to be implemented in the '.ts' file for the cart component due Angular's component oriented architecture.

Since Angular apps are single-page applications, each page had to be reconstructed as it's own component and dynamic elements of that page were constructed as their own components. Ultimately I managed to achieve output and behavior as the original website.

UPDATE (Nov 15): I have received some feedback and requests for changes from the project author. The first request seems to be in regards to alignment issues in some HTML files. This likely occurred when I had to change some of the custom tag names from the original since Angular's parser does not recognize custom tags by default. The other was in regards to an unused component I created called "lists". I made this initially when trying to "componentize" the website, however never ended up needing it and thus forgot to remove it.

I have made these changes and requested a re-review.

UPDATE (Nov 16): A final change has been requested by the project author. Since I have three identical consecutive commit messages, he requested that I be more specific in them or squash them if they are not significant. In retrospect, I agree that I should have been more specific in the messages, so I will be sure to do that in the future. I will squash and hopefully have my contributions merged soon.

Next Steps for Improvement

As mentioned earlier this was my biggest, most challenging issue I've ever tackled as an open-source contributor, however the project was quite small so that's where I should look to improve. 

My next major milestone would be to take on an issue on a big and popular project. Maybe not an issue of this magnitude that entails re-implementing an entire website, but certainly something in the ball park of adding or enhancing some functionality.

Stay Tuned for the final release!   






Comments

Popular posts from this blog

Micro-Note : My First Steps into Open Source

I just finished building Micro-Note, a simple web based note taking application. While it is not the most innovative app, it marks my first steps into the world of open source. Not only was I able to learn and exercise essential Git skills including the creation and operation of a repo, but also brush up on my web development basics. This involved both features found on the GitHub web app, and the Git command line interface. I found this highly useful as I am aware Git will be a part of my career moving forward, whether it be for open source or other ventures as a developer. The app is simple and fairly self explanatory.  It allows the user to input notes into the web page and save them to continue or edit them later if needed. It is built with the standard web stack, HTML5, CSS, and JavaScript. It uses the  FilerJS Browser Filesystem library to save the user input to a local file so the user can save and resume their note-taking at later time.  This was helpful as...

My First Contributions and Collaborations in Open-Source

This week I continued my journey into the world of open source by contributing to the work of others, as well as accepting contributions from others for my Micro-Note web app detailed in the previous blog post . I was able to contribute one bug fix, and one additional feature to similar applications built by other students. This was done by utilizing Git features such as posting issues, forking repositories, creating new branches, and creating/receiving pull requests. Details of my contributions are explained below. In addition to these, I also received my first pull request to review nad merge another students contributions to my own application. Fixing Another Students Bug One of my colleagues ( dbeigi ) built a note taking application called " whiteboard " that allows users to save their notes using hotkey inputs, otherwise the application is meant to automatically save the users work every 4 seconds. While I was reviewing the code, I noticed the paramter in the setInt...

Hacktoberfest - My First of Many Open Source Events

After establishing a basic foundation in open-source concepts and skills, I eagerly look forward to participating in Hacktoberfest this upcoming October, and hopefully many more to come. Hacktoberfest is hosted by Digital Ocean and it is a month long event that runs throughout the month of October and encourages contributions to a variety of projects. It is highly accessible and welcoming to individuals across all regions and skill levels globally, which is great news since I still consider myself a beginner as an open-source developer. On top of all this, they also offer the prize of a Hacktoberfest shirt for registered users that successfully complete 4 or more pull requests. After reading through all the information on the Hacktoberfest website, I proceeded to set two goals and find three issues I would like to tackle. Here are the goals I set for this event: 1 . Get involved in a project that you find interesting As a student, its often difficult to pursue personal pr...