FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: prevent multiple command palettes from being added by chrismwendt · Pull Request #178 · sourcegraph/browser-extensions · GitHub

This repository was archived by the owner on Jan 22, 2019. It is now read-only.

fix: prevent multiple command palettes from being added - #178

Merged
chrismwendt merged 2 commits into
masterfrom
1-hamburger
Sep 14, 2018
Merged

fix: prevent multiple command palettes from being added#178
chrismwendt merged 2 commits into
masterfrom
1-hamburger

Conversation

Copy link
Copy Markdown

This is really hacky (uses a flag to check if the palette has already been added), but it was quick to implement.

In parallel with reviews of this PR, I'll be working on a more robust solution involving each inject* function returning a Disposable/Unsubscribable that the top level can dispose of when lifecycle events occur.

Resolves #174
Resolves https://github.com/sourcegraph/sourcegraph/issues/13206

chrismwendt requested review from ijsnow and sqs September 14, 2018 13:14

ijsnow left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM


function createCommandList(): HTMLElement {
const commandListElem = document.createElement('div')
commandListElem.className = commandListClass

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Doesn't really matter here since you're creating the element from scratch but I always use element.classList.add

chrismwendt merged commit 7aa19f0 into master Sep 14, 2018
chrismwendt deleted the 1-hamburger branch September 14, 2018 21:20

Copy link
Copy Markdown

🎉 This PR is included in version 1.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL