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

Hacktoberfest - Pull Request #3 : Improving Rhymus' UI

In my previous post, I announced and explained my second pull request for this year's Hacktoberfest event, where I added puzzles to Rhymus, a web based word-puzzle game designed to improve a users vocabulary.


The Project: Rhymus

If you have already read my description of Rhymus in my previous post, you can go ahead and skip to "The Issue" section.

Rhymus is an open-source web based game written in HTML, CSS and Javascript. It presents the user with word based puzzles to help users improve their vocabulary and familiarity with some common expressions, Phrases and/or common expressions are shown with on of the words being replaced with a rhyme for the original. The user must input what the correct word is, and has the option to take a hint for less point. The game has a scoring system to measure the users success. All in all, I found it to be a fun project that would be very helpful for those looking to expand their vocabulary. I can see it being useful for foreign…

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 libraryto 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 it allowed me to brus…