Blog > Product > GoLinks Contributes to Open Source: A Tale of Two Browsers.

GoLinks Contributes to Open Source: A Tale of Two Browsers.

Contributing to open source software is a great way for companies and engineers to influence new ideas, and improve public projects over time. In this post, we describe our journey of identifying and fixing a bug in the open source browser Firefox from a feature in Chrome.

When we first implemented the GoLinks browser extension, we used the keyword “go” to trigger a search for go links in the browser. This allowed users to just type “go” and then a “space” to trigger the search functionality.

In order to do this, we added a keyword under the “omnibox” property in the manifest file of our extension.

// manifest.json"omnibox": {
"keyword": "go",
}

This omnibox go links search feature is a power feature that our users love and continue to use. The feature worked great, except in one particular use case. If you wanted to do a Google search for anything that started with “go” it would trigger the GoLinks omnibox search, and prevent you from doing a Google search.

Go is a very common word to search if you write code in golang or if you search for other “go” related items.

  • “go lang switch syntax”
  • “go fund me”
  • “go forward”
  • “Go Daddy”
  • “Go Blue!”

Each of these searches would trigger the GoLinks omnibox search feature and frustrate our users from doing their work. So we had to seek out a solution.

Our solution was to change the “go” term to “go/” to ensure that the omnibox functionality was triggered intentionally. It also followed the same syntax as a go link so it was a sound solution. This fix worked great in Chrome, however, it caused Firefox to throw an error and prevent the extension from loading.

In Chrome, you are allowed to use special characters in the keyword that triggers the omnibox functionality, however in Firefox 62.0, adding a slash would throw this message: There was an error during installation: Extension is invalid. So we filed a bug with Mozilla since the Web Extension standard should allow this behavior.

https://bugzilla.mozilla.org/show_bug.cgi?id=1500320

We continued to receive customer complaints about users searching for “golang” syntaxes or “go fund me” campaigns, and they would have to uninstall the extension in order to search for “go” related items. The bug was filed as a low priority (P3) by the Mozilla community, however, for us, this was a high priority issue.

It was also marked as a good-first-bug followed by a link on how to contribute if someone wanted to take on this bug. So, as any good engineering team would do, we planned a way to solve this issue for our customers directly: by fixing the bug in Firefox.

We realized that fixing the bug directly was a more proactive approach to solving the issue, than waiting around for someone else to fix the problem. Firefox is an open source browser, so anyone can go in and fix any issues in the backlog, including engineering teams like us. None of us had ever worked on writing code for a browser before, but when your customers have an issue, you have to do everything in your ability to solve their issue.

On our team, we use the common version control software: Git. However, to contribute to Firefox you must use a version control called Mercurial. Once the repository is downloaded you can run the build command to build the browser. This took a very long time to compile the first time, so we let it run overnight.

Next, we found the bug and made the necessary changes. We compiled the browser and tested to see if it worked manually. In addition to manual tests, we had to write unit tests for our change. Tests are important because it gives the reviewers confidence that the code change does what is expected, and it prevents unexpected code from breaking the current functionality.

Once the code changes and tests were in, we submitted the changes to Phabricator which is the software used to review code.⚙ D12242 Updating the omnibox keyword regex to allow trailing slashesPreviously the omnibox keyword would not allow trailing slashes, such as go/ Chrome allows this keyword, and Firefox…phabricator.services.mozilla.com

From here we did a normal code review with the community. The reviewer, Rob Wu, suggested that our Regular Expression could be further simplified.

With the necessary edits, our code was approved.

Next, it needed to be accepted by a module peer before it landed.

When the revision was ready to land it got merged into master and was ready to be released in a future version.

For us this was great, but there was also a small problem that prevented us from getting the new feature out to our users. The fix was now available in 65.0a1, which is the Alpha version of Firefox Nightly, but all of our users were using the latest publicly available version which, at the time, was 63.0.3.

At this point, it was just a waiting game. We would need customer support to let our users know that a fix was on the way, but it was out of our control to release this feature.

Eventually, version 65 was released to the public, and our fix could go out. We updated our extension with the changes, updated our users about the change, and responded to the happy customers that have been waiting for a fix for this feature.

Email to our customers

This whole process took about 3–4 months to go from identifying the bug to releasing a fix to the feature available to the public, but we moved as fast as we could once we learned customers were having an issue.

If you are a current user of GoLinks, be sure to check out the new omnibox feature which is triggered with “go/” in the address bar of Chrome and Firefox.

If you aren’t a user of GoLinks, sign up today at https://www.golinks.io/, and learn how companies are improving productivity and communication within their organizations.

Try for free

Share this article
11 Enterprise Apps That Boost Company Productivity

11 Enterprise Apps That Boost Company Productivity

Discover the top AI-powered enterprise software tools to boost productivity, streamline workflows, and enhance collaboration.
What's New at GoLinks November 2024

What’s New at GoLinks: November 2024 

Discover GoLinks updates for November 2024! Explore new features like Jots for note-taking and team collaboration in your dashboard.

Explore our AI productivity suite