Hacktoberfest PR 3
Tags: hacktoberfest23, javascript, webdev, opensource
Published: 2023-10-20 17:00:19

## Repo
https://github.com/Esri/esri-leaflet-vector -
A plugin for Esri Leaflet to visualize Vector tiles from ArcGIS Online.

## Issue
* https://github.com/Esri/esri-leaflet-vector/issues/194
* https://github.com/Esri/esri-leaflet-vector/issues/158

## PR
* https://github.com/Esri/esri-leaflet-vector/pull/201
* https://github.com/Esri/esri-leaflet-vector/pull/202

## Process
The process was to fork the repo, create a feature branch, add all changes to that branch and issue a PR for the changes that were to be merged.

## Setup
The setup was quite simple, after cloning the repo I installed the dependencies using `npm install`, and generated a build folder using `npm run build`. This would generate static HTML files which are essentially maps of certain locations. I also tested the pre-written test cases before pushing the code to my PR using `npm test`. Besides, I had to go through the readme file to get a better understanding of the project, the tech stack being used, and how to set up the project, among other things.

## Bug Fix & Feature Addition
* https://github.com/Esri/esri-leaflet-vector/pull/201

> This PR was a feature-related issue where I had to bump up a dependency to the latest version. The change was quite simple, I ran the command `npm i maplibre-gl@latest` to update the underlying dependency version. However, there was quite a bit of human intervention needed to get the PR in. First, the issue mentioned to run tests and see if there are no breaking changes after the version is upgraded which came out all clear and attached the test results to the PR. Also, one of the reviewers mentioned updating the peer dependency to `^2.0.0||^3.0.0` in the package.json to show the support for v2 or v3 for MapLibre dependency, which was pushed by another reviewer. Everything looked good after that point, they merged my PR and the change was released in the 4.2.1 release of this plugin/repo.

* https://github.com/Esri/esri-leaflet-vector/pull/202

> This PR was a bug-related issue where I had to log an error message on the console when an invalid API key passed. This was sort of a failed attempt to get the PR merged because the project was hard to understand, I was still trying to make sense of what's the purpose of this project, what the classes in the src directory do, and how everything is connected together, among other things. I tried my best to get as much information from the repo owner as you can notice on the filed issue and the PR itself, and they did reply initially for the first couple of days but I still needed more information and unfortunately couldn't get any help from them. The PR is stalled as we speak and haven't gotten any response on it for 2 weeks now. Initially, I asked for clarification on how to solve the bug on the issue itself and I didn't get any response. I didn't want to wait for their response so I filed a PR, a day later based on what I thought made sense. The reviewer then commented on the PR mentioning that all the changes I made must be discarded since they were not the right changes, as committed [here](https://github.com/Esri/esri-leaflet-vector/compare/93e330e88f72e5009ac58e4d30f0f35eacffcb28..642eca4048898c5d0b0cce512022bd06f7e1d3b2) (Wish they told me earlier when I was asking for help on the filed issue :), but oh well!). I wrote new test cases and quite a few code changes on this PR which I had to revert back and force push a new change suggested by the reviewer which is a one-liner code that logs out the error when the API key is not provided. They responded to me quite clearly on where exactly the log should be added to show the user that the API key was invalid and they also added a few test cases to make sure that the changes were tested thoroughly. However, they didn't tell me exactly how to test these changes, I even asked for help on the PR again to clarify whether I'm doing it right when it comes to testing these changes, but no response yet, and that's where the PR is currently stuck. May be they got busy after that point. I tried my best to test the changes manually, in a way that made sense to me and asked that if anything else needs to be added and to let me know, I'm open to make additions/deletions from the PR.

## Interactions
I had quite a lot of interactions with the repo owner/reviewer. Most of the interactions were about getting clarification and getting guidance on how to do certain tasks.