profile
viewpoint

felixfbecker/cli-highlight 178

Syntax highlighting for your terminal 💻✨

aaronpowell/ps-nvm 84

PowerShell module for managing multiple Node.js versions

codecov/sourcegraph-codecov 50

See code coverage information from Codecov on GitHub, Sourcegraph, and other tools.

felixfbecker/abortable-rx 13

Drop-in replacements for RxJS Observable methods and operators that work with AbortSignal

felixfbecker/angular-async-filter 6

Angular2's async pipe for Angular 1. Promise in controller, value in view.

felixfbecker/aggregate-map 4

Read-only ES6 Map implementation that aggregates results from multiple Maps in O(n)

felixfbecker/bundlesize 1

Keep your bundle size in check

felixfbecker/actor-js-npm 0

A https://www.dependencies.io actor for updating npm dependencies.

felixfbecker/actor-php-composer 0

A https://www.dependencies.io actor that updates php composer dependencies and creates a pull request.

felixfbecker/aggregate-error 0

Create an error from multiple errors

issue commentsourcegraph/sourcegraph

Sourcegraph UI Sometimes Displaying Stale Repository History

Without a clear reproduction, can we get any details?

  • Does it get updated with a page reload 🔄?
  • Is a TreeCommits request made in the network tab, and does it show the stale data? (if yes, this is a backend issue for team/cloud)
tistru

comment created time in 11 hours

Pull request review commentsourcegraph/sourcegraph-find-replace

Create find-replace extension

+import { Subscription } from 'rxjs'+import * as sourcegraph from 'sourcegraph'+import { evaluateAndCreateCampaignSpec } from '@sourcegraph/campaigns-client'+import slugify from 'slugify'+import { getCurrentUser } from './util'++// TODO(sqs) SECURITY(sqs): sanitize for real+const escapedMarkdownCode = (text: string): string => '`' + text.replace(/`/g, '\\`') + '`'++// TODO: make this file filter configurable.+// The filter is applied on all files of each matching repo (confirm - is that correct?)+const fileFilter = (path: string): boolean => path.endsWith('.yaml') || path.endsWith('.yml') || path.endsWith('.md')++export const registerFindReplaceAction = (): Subscription => {+    const subscription = new Subscription()+    subscription.add(+        sourcegraph.commands.registerCommand('start-find-replace', async () => {+            // To create campaigns, a namespace is used, which can be the current user's username.+            const currentUser = await getCurrentUser()+            const namespaceName = currentUser?.username+            console.log('currentUser', currentUser)++            const match = await sourcegraph.app.activeWindow!.showInputBox({+                prompt: 'Find all matches of:',+            })+            if (!match) {+                return+            }+            const replacement = await sourcegraph.app.activeWindow!.showInputBox({+                prompt: 'Replace with:',+            })+            if (replacement === undefined) {+                return+            }++            const name = `replace-${slugify(match)}-with-${slugify(replacement)}`+            const description = `Replace ${escapedMarkdownCode(match)} with ${escapedMarkdownCode(replacement)}`++            let percentage = 0+            const { applyURL, diffStat } = await sourcegraph.app.activeWindow!.withProgress(+                { title: '**Find-replace**' },+                async reporter =>+                    evaluateAndCreateCampaignSpec(namespaceName, {+                        name,+                        on: [+                            {+                                repositoriesMatchingQuery: match,+                            },+                        ],+                        description,+                        steps: [+                            {+                                fileFilter,+                                editFile: (path, text) => {+                                    if (!text.includes(match)) {+                                        return null+                                    }+                                    try {+                                        console.log('editFile running on', path)+                                    } catch (error) {+                                        console.error('Caught', error)+                                    }++                                    percentage += (100 - percentage) / 100+                                    reporter.next({ message: `Computing changes in ${path}`, percentage })+                                    return text.split(match).join(replacement)+                                },+                            },+                        ],+                        changesetTemplate: {+                            title: description,+                            branch: `campaign/${name}`,+                            commit: {+                                message: description,+                                author: {+                                    name: currentUser.username,+                                    email: currentUser.email,+                                },+                            },+                            published: false,+                        },+                    })+            )+            await sourcegraph.app.activeWindow!.showNotification(+                `[**Find-replace changes**](${applyURL}) are ready to preview and apply.<br/><br/><small>${diffStat.added} additions, ${diffStat.changed} changes, ${diffStat.deleted} deletions</small>`,

suggestion: use markdown syntax for paragraphs

                `[**Find-replace changes**](${applyURL}) are ready to preview and apply.\n\n<small>${diffStat.added} additions, ${diffStat.changed} changes, ${diffStat.deleted} deletions</small>`,
marekweb

comment created time in 4 days

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentsourcegraph/sourcegraph

codeintel: Update index UI pages

And it's bug-free too according to Sonarcloud!

efritz

comment created time in 11 hours

PullRequestReviewEvent

issue closedsourcegraph/sourcegraph

Create extensions for opening in additional editors - Atom, IntelliJ and Sublime Text

Let's agree on the next steps regarding extensions for opening the file in the editor.

Currently

Right now we enable opening in the editor by:

  • using vs-code extension Screenshot 2020-08-24 at 08 26 09

  • using open-in-editor extension developed recently by @limitedmage as the onboarding task. User can configure their preferred editor in settings. Screenshot 2020-08-24 at 08 26 19

Proposition

  1. Develop separate extensions for each supported editor In Sourcegraph we list VS Code, Atom, IntelliJ, and Sublime Text.

Screenshot 2020-08-24 at 08 46 46

Reasoning

  • It is easier to enable the extension then configure settings for open-in-editor extension
  • Better visibility of those extensions in the extensions registry page
  • in open-in-editor extension, the user chooses only one preferred editor. Many developers use more than one editor and we should accommodate their needs.
  1. Present open-in-editor extension as an option for adding an editor that is not supported yet

Users who use the editor from outside the supported editors' list can configure it in the open-in-editor extension. For now, I think that configuring one additional editor is enough, let's see how many people use this option. If it turns out to be necessary in the future, maybe we can develop this extension further to let users add more than one additional editor.

@christinaforney @felixfbecker @tjkandala

closed time in 17 hours

AlicjaSuska

issue commentsourcegraph/sourcegraph

Create extensions for opening in additional editors - Atom, IntelliJ and Sublime Text

@tjkandala implemented and released these 🚀

AlicjaSuska

comment created time in 17 hours

pull request commentsourcegraph/sourcegraph-git-extras

feat: support toggling 'whole file' annotations

@tjkandala checking in - are you working on the fix for the problem @AlicjaSuska pointed out?

tjkandala

comment created time in 17 hours

PullRequestReviewEvent
MemberEvent

Pull request review commentsourcegraph/sourcegraph-link-preview-expander

Turn URLs into links, display OpenGraph hover preview

 # link-preview-expander (Sourcegraph extension) -.+Show hover previews for links

@tjkandala this was not resolved

tjkandala

comment created time in 19 hours

PullRequestReviewEvent

issue commentsourcegraph/sourcegraph

Log Sourcegraph extensions events in BigQuery

@tsenart please see https://docs.google.com/document/d/1NHi0nDohuPLdaJjV0l-Bk7NG_pI-A8s0H5CSzE9RWrQ/edit

ebrodymoore

comment created time in 20 hours

pull request commentSchemaStore/schemastore

Add Prettier

Suggestion: Add a .vscode/extensions.json which includes the Prettier extension in recommended extension. VS code will then ask to auto-install it. .vscode/settings.json can also include editor.formatOnSave: true.

dhruvin2910

comment created time in a day

Pull request review commentSchemaStore/schemastore

Add Prettier

     "remote": "grunt remote_test"   },   "devDependencies": {+    "@exodus/schemasafe": "^1.0.0-rc.3",+    "find-duplicated-property-keys": "^1.2.4",+    "got": "^11.7.0",

Why are these extra dependencies needed?

dhruvin2910

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentfelixfbecker/cli-highlight

Upgrade to Chalk 4, Node >= 10

Don't know why CI didn't run, can you try pushing again to the branch?

MatthiasKunnen

comment created time in a day

PullRequestReviewEvent

pull request commentfelixfbecker/php-language-server-protocol

fix: support PHP 8

@muglug your comment hit a spot, thank you for the offer! I'm scared of handing out write access lightly but given you're maintaining Psalm I trust this is in good hands with you. Added you to the repo and feel free to not block on me for any changes. I just don't have time to dedicate to PHP anymore because I'm exclusively in the TypeScript world nowadays, but of course I'd still love to see these projects continue to be useful to the PHP community.

chris-doehring

comment created time in a day

issue closedfelixfbecker/php-language-server-protocol

PHP ^8 support

Any chance of adding support for php:^8.0 before the GA release?

closed time in a day

brendt

issue commentfelixfbecker/php-language-server-protocol

PHP ^8 support

Done, thanks @chris-doehring !

brendt

comment created time in a day

push eventfelixfbecker/php-language-server-protocol

Chris Döhring

commit sha a431aeff92df50ed6bb6bc3840e4839c70fc1dac

fix: support PHP 8 (#15)

view details

push time in a day

PR merged felixfbecker/php-language-server-protocol

fix: support PHP 8

Hey there,

your package is a dependency for many other packages and therefor it would be nice to allow php 8. There is only one change that I would classify as "potentially critical" in order to have a running phpstan analysis: I had to add a default behaviour to the switch case of LanguageServerProtocol\CompletionItemKind::fromSymbolKind, which is indeed required, as the return type hint only allows integer values.

Otherwise travis CI runs without problems under php 7.0, 7.3, 7.4 and 8.0-dev.

+24 -6

2 comments

9 changed files

chris-doehring

pr closed time in a day

Pull request review commentfelixfbecker/php-language-server-protocol

php 8 support

 language: php php:   - '7.0'   - '7.3'+  - '7.4'+  - nightly

Alright, doesn't need to block this PR then

chris-doehring

comment created time in a day

PullRequestReviewEvent

Pull request review commentfelixfbecker/php-language-server-protocol

php 8 support

 language: php php:   - '7.0'   - '7.3'+  - '7.4'+  - nightly

Is there an explicit version we could set here so that CI can't break for the next major PHP version?

chris-doehring

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

issue commentsourcegraph/sourcegraph

Keep 'References' panel open after clicking on one reference

I'm actually surprised it doesn't, that's unexpected to me. When clicking references, they are links that need to update the URL. The references panel is open whenever there is a URL param in the URL. What could be happening here is that the references links do not include that URL param anymore so it gets removed, which closes the panel. So I would check where those links are rendered.

AlicjaSuska

comment created time in a day

push eventsourcegraph/sourcegraph

Felix Becker

commit sha 701f322074a9a94402caa8deeb0fda08655e8842

Fix externalURLs alert logic (#14980)

view details

push time in 2 days

delete branch sourcegraph/sourcegraph

delete branch : fix-external-urls-destructure

delete time in 2 days

PR merged sourcegraph/sourcegraph

Reviewers
Fix externalURLs alert logic bug customer important team/web

Fixes https://github.com/sourcegraph/customer/issues/118

The issue was that the code assumed the array always had an element, but it doesn't need to have. I also noticed that we didn't check whether we actually support the code host. With this PR, we take the first code host from external links that we support, and show nothing if there is none.

cc @dadlerj

+129 -50

2 comments

3 changed files

felixfbecker

pr closed time in 2 days

pull request commentsourcegraph/sourcegraph

Fix externalURLs alert logic

@sourcegraph/distribution please include this in a patch release when this is merged, thanks!

felixfbecker

comment created time in 2 days

push eventsourcegraph/sourcegraph

Felix Becker

commit sha 9934dd18cee4031c398cb21a336170fa6cec6247

Final fixes for the browser extension (#14958)

view details

push time in 2 days

delete branch sourcegraph/sourcegraph

delete branch : no-theme-flashes

delete time in 2 days

PR merged sourcegraph/sourcegraph

Reviewers
Final fixes for the browser extension

Noticed a few last things in my final round of testing.

image

image

+11 -4

0 comment

6 changed files

felixfbecker

pr closed time in 2 days

push eventsourcegraph/sourcegraph

Felix Becker

commit sha c19f4c68ca450c1f9263a8541b128844556d41f1

Update snapshot

view details

push time in 2 days

Pull request review commentsourcegraph/sourcegraph-open-in-intellij

Implement open-in-intellij

+{+  "$schema": "https://raw.githubusercontent.com/sourcegraph/sourcegraph/main/client/shared/src/schema/extension.schema.json",+  "name": "open-in-intellij",+  "description": "Open the current file in the Intellij editor",+  "publisher": "sourcegraph",+  "activationEvents": [+    "*"+  ],+  "wip": true,+  "categories": [+    "Code editors"+  ],+  "tags": [+    "intellij",+    "editor",+    "open"+  ],+  "contributes": {+    "actions": [+      {+        "id": "openInIntellij.open.file",+        "command": "openInIntellij.open.file",+        "commandArguments": [+          "${resource.uri}"+        ],+        "title": "Open file in Intellij",+        "category": "Open in Intellij",+        "actionItem": {+          "description": "Open file in Intellij",+          "iconURL": "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 70'%3E%3ClinearGradient id='a' gradientUnits='userSpaceOnUse' x1='.79' y1='40.089' x2='33.317' y2='40.089'%3E%3Cstop offset='.258' stop-color='%23f97a12'/%3E%3Cstop offset='.459' stop-color='%23b07b58'/%3E%3Cstop offset='.724' stop-color='%23577bae'/%3E%3Cstop offset='.91' stop-color='%231e7ce5'/%3E%3Cstop offset='1' stop-color='%23087cfa'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23a)' d='M17.7 54.6L.8 41.2l8.4-15.6L33.3 35z'/%3E%3ClinearGradient id='b' gradientUnits='userSpaceOnUse' x1='25.767' y1='24.88' x2='79.424' y2='54.57'%3E%3Cstop offset='0' stop-color='%23f97a12'/%3E%3Cstop offset='.072' stop-color='%23cb7a3e'/%3E%3Cstop offset='.154' stop-color='%239e7b6a'/%3E%3Cstop offset='.242' stop-color='%23757b91'/%3E%3Cstop offset='.334' stop-color='%23537bb1'/%3E%3Cstop offset='.432' stop-color='%23387ccc'/%3E%3Cstop offset='.538' stop-color='%23237ce0'/%3E%3Cstop offset='.655' stop-color='%23147cef'/%3E%3Cstop offset='.792' stop-color='%230b7cf7'/%3E%3Cstop offset='1' stop-color='%23087cfa'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23b)' d='M70 18.7l-1.3 40.5L41.8 70 25.6 59.6 49.3 35 38.9 12.3l9.3-11.2z'/%3E%3ClinearGradient id='c' gradientUnits='userSpaceOnUse' x1='63.228' y1='42.915' x2='48.29' y2='-1.719'%3E%3Cstop offset='0' stop-color='%23fe315d'/%3E%3Cstop offset='.078' stop-color='%23cb417e'/%3E%3Cstop offset='.16' stop-color='%239e4e9b'/%3E%3Cstop offset='.247' stop-color='%23755bb4'/%3E%3Cstop offset='.339' stop-color='%235365ca'/%3E%3Cstop offset='.436' stop-color='%23386ddb'/%3E%3Cstop offset='.541' stop-color='%232374e9'/%3E%3Cstop offset='.658' stop-color='%231478f3'/%3E%3Cstop offset='.794' stop-color='%230b7bf8'/%3E%3Cstop offset='1' stop-color='%23087cfa'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23c)' d='M70 18.7L48.7 43.9l-9.8-31.6 9.3-11.2z'/%3E%3ClinearGradient id='d' gradientUnits='userSpaceOnUse' x1='10.72' y1='16.473' x2='55.524' y2='90.58'%3E%3Cstop offset='0' stop-color='%23fe315d'/%3E%3Cstop offset='.04' stop-color='%23f63462'/%3E%3Cstop offset='.104' stop-color='%23df3a71'/%3E%3Cstop offset='.167' stop-color='%23c24383'/%3E%3Cstop offset='.291' stop-color='%23ad4a91'/%3E%3Cstop offset='.55' stop-color='%23755bb4'/%3E%3Cstop offset='.917' stop-color='%231d76ed'/%3E%3Cstop offset='1' stop-color='%23087cfa'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23d)' d='M33.7 58.1L5.6 68.3l4.5-15.8L16 33.1 0 27.7 10.1 0l22 2.7 21.6 24.7z'/%3E%3Cg%3E%3Cpath d='M13.7 13.5h43.2v43.2H13.7z'/%3E%3Cpath fill='%23fff' d='M17.7 48.6h16.2v2.7H17.7zM29.4 22.4v-3.3h-9v3.3H23v11.3h-2.6V37h9v-3.3h-2.5V22.4zM38 37.3c-1.4 0-2.6-.3-3.5-.8-.9-.5-1.7-1.2-2.3-1.9l2.5-2.8c.5.6 1 1 1.5 1.3.5.3 1.1.5 1.7.5.7 0 1.3-.2 1.8-.7.4-.5.6-1.2.6-2.3V19.1h4v11.7c0 1.1-.1 2-.4 2.8-.3.8-.7 1.4-1.3 2-.5.5-1.2 1-2 1.2-.8.3-1.6.5-2.6.5'/%3E%3C/g%3E%3C/svg%3E"+        }+      }+    ],+    "menus": {+      "editor/title": [+        {+          "action": "openInIntellij.open.file",+          "when": "resource.type === 'textDocument'"+        }+      ],+      "commandPalette": [+        {+          "action": "openInIntellij.open.file",+          "when": "resource.type === 'textDocument'"+        }+      ]+    },+    "configuration": {+      "properties": {+        "openInIntellij.basePath": {+          "description": "The absolute path on the machine to the folder that is expected to contain all repositories.",+          "type": "string",+          "format": "regex",+          "pattern": "^[^~]+"+        }+      }+    }+  },+  "version": "0.0.0-DEVELOPMENT",+  "repository": {+    "type": "git",+    "url": "https://github.com/sourcegraph/sourcegraph-open-in-intellij"+  },+  "license": "Apache-2.0",+  "main": "dist/open-in-intellij.js",+  "scripts": {+    "eslint": "eslint 'src/**/*.ts'",+    "typecheck": "tsc -p tsconfig.json",+    "build": "parcel build --out-file dist/open-in-intellij.js src/open-in-intellij.ts",+    "symlink-package": "mkdirp dist && lnfs ./package.json ./dist/package.json",+    "serve": "yarn run symlink-package && parcel serve --no-hmr --out-file dist/open-in-intellij.js src/open-in-intellij.ts",+    "watch:typecheck": "tsc -p tsconfig.json -w",+    "watch:build": "tsc -p tsconfig.dist.json -w",+    "sourcegraph:prepublish": "yarn run typecheck && yarn run build"+  },+  "browserslist": [+    "last 1 Chrome versions",+    "last 1 Firefox versions",+    "last 1 Edge versions",+    "last 1 Safari versions"+  ],+  "devDependencies": {+    "@sourcegraph/eslint-config": "^0.20.0",+    "@sourcegraph/tsconfig": "^4.0.1",+    "@types/node": "14.0.27",+    "eslint": "^7.6.0",+    "lnfs-cli": "^2.1.0",+    "mkdirp": "^1.0.4",+    "parcel-bundler": "^1.12.4",+    "sourcegraph": "^24.7.0",+    "typescript": "^3.9.7"+  },+    "icon": "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 70'%3E%3ClinearGradient id='a' gradientUnits='userSpaceOnUse' x1='.79' y1='40.089' x2='33.317' y2='40.089'%3E%3Cstop offset='.258' stop-color='%23f97a12'/%3E%3Cstop offset='.459' stop-color='%23b07b58'/%3E%3Cstop offset='.724' stop-color='%23577bae'/%3E%3Cstop offset='.91' stop-color='%231e7ce5'/%3E%3Cstop offset='1' stop-color='%23087cfa'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23a)' d='M17.7 54.6L.8 41.2l8.4-15.6L33.3 35z'/%3E%3ClinearGradient id='b' gradientUnits='userSpaceOnUse' x1='25.767' y1='24.88' x2='79.424' y2='54.57'%3E%3Cstop offset='0' stop-color='%23f97a12'/%3E%3Cstop offset='.072' stop-color='%23cb7a3e'/%3E%3Cstop offset='.154' stop-color='%239e7b6a'/%3E%3Cstop offset='.242' stop-color='%23757b91'/%3E%3Cstop offset='.334' stop-color='%23537bb1'/%3E%3Cstop offset='.432' stop-color='%23387ccc'/%3E%3Cstop offset='.538' stop-color='%23237ce0'/%3E%3Cstop offset='.655' stop-color='%23147cef'/%3E%3Cstop offset='.792' stop-color='%230b7cf7'/%3E%3Cstop offset='1' stop-color='%23087cfa'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23b)' d='M70 18.7l-1.3 40.5L41.8 70 25.6 59.6 49.3 35 38.9 12.3l9.3-11.2z'/%3E%3ClinearGradient id='c' gradientUnits='userSpaceOnUse' x1='63.228' y1='42.915' x2='48.29' y2='-1.719'%3E%3Cstop offset='0' stop-color='%23fe315d'/%3E%3Cstop offset='.078' stop-color='%23cb417e'/%3E%3Cstop offset='.16' stop-color='%239e4e9b'/%3E%3Cstop offset='.247' stop-color='%23755bb4'/%3E%3Cstop offset='.339' stop-color='%235365ca'/%3E%3Cstop offset='.436' stop-color='%23386ddb'/%3E%3Cstop offset='.541' stop-color='%232374e9'/%3E%3Cstop offset='.658' stop-color='%231478f3'/%3E%3Cstop offset='.794' stop-color='%230b7bf8'/%3E%3Cstop offset='1' stop-color='%23087cfa'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23c)' d='M70 18.7L48.7 43.9l-9.8-31.6 9.3-11.2z'/%3E%3ClinearGradient id='d' gradientUnits='userSpaceOnUse' x1='10.72' y1='16.473' x2='55.524' y2='90.58'%3E%3Cstop offset='0' stop-color='%23fe315d'/%3E%3Cstop offset='.04' stop-color='%23f63462'/%3E%3Cstop offset='.104' stop-color='%23df3a71'/%3E%3Cstop offset='.167' stop-color='%23c24383'/%3E%3Cstop offset='.291' stop-color='%23ad4a91'/%3E%3Cstop offset='.55' stop-color='%23755bb4'/%3E%3Cstop offset='.917' stop-color='%231d76ed'/%3E%3Cstop offset='1' stop-color='%23087cfa'/%3E%3C/linearGradient%3E%3Cpath fill='url(%23d)' d='M33.7 58.1L5.6 68.3l4.5-15.8L16 33.1 0 27.7 10.1 0l22 2.7 21.6 24.7z'/%3E%3Cg%3E%3Cpath d='M13.7 13.5h43.2v43.2H13.7z'/%3E%3Cpath fill='%23fff' d='M17.7 48.6h16.2v2.7H17.7zM29.4 22.4v-3.3h-9v3.3H23v11.3h-2.6V37h9v-3.3h-2.5V22.4zM38 37.3c-1.4 0-2.6-.3-3.5-.8-.9-.5-1.7-1.2-2.3-1.9l2.5-2.8c.5.6 1 1 1.5 1.3.5.3 1.1.5 1.7.5.7 0 1.3-.2 1.8-.7.4-.5.6-1.2.6-2.3V19.1h4v11.7c0 1.1-.1 2-.4 2.8-.3.8-.7 1.4-1.3 2-.5.5-1.2 1-2 1.2-.8.3-1.6.5-2.6.5'/%3E%3C/g%3E%3C/svg%3E"

question: Did you run this through SVGOMG?

tjkandala

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentsourcegraph/sourcegraph-who-knows-about-this

Create who-knows-about-this extension

+import gql from 'tagged-template-noop'+import sourcegraph from 'sourcegraph'++/**+ * Resolve a URI of the forms git://github.com/owner/repo?rev#path and file:///path to an absolute reference, using+ * the given base (root) URI.+ */+export function resolveURI(uri: string): { repo: string; rev: string; path: string } {+    const url = new URL(uri)+    if (url.protocol === 'git:') {+        return {+            repo: (url.host + url.pathname).replace(/^\/*/, '').toLowerCase(),+            rev: url.search.slice(1).toLowerCase(),+            path: url.hash.slice(1),+        }+    }+    throw new Error(`unrecognized URI: ${JSON.stringify(uri)} (supported URI schemes: git)`)+}++export interface Hunk {+    startLine: number+    endLine: number+    author: {+        person: {+            email: string+            displayName: string+            user: {+                username: string+            } | null+        }+        date: string+    }+    rev: string+    message: string+    commit: {+        url: string+    }+}++export const queryBlameHunks = async (uri: string): Promise<Hunk[]> => {+    const { repo, rev, path } = resolveURI(uri)+    const { data, errors } = await sourcegraph.commands.executeCommand(+        'queryGraphQL',+        gql`+            query GitBlame($repo: String!, $rev: String!, $path: String!) {+                repository(name: $repo) {+                    commit(rev: $rev) {+                        blob(path: $path) {+                            blame(startLine: 0, endLine: 0) {

thought: So does this only take whoeever changed the first line in the file? Shouldn't it better aggregate authors in promixity of the cursor, or from the whole file? If it's not related to the current line but to the file, it could also be as a panel view (but probably not worth investing time in this now).

marekweb

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventsourcegraph/sourcegraph

Felix Becker

commit sha 4096b045dd746667ca784d718621d74b7961cba1

Fix externalURLs alert logic

view details

push time in 2 days

PR opened sourcegraph/sourcegraph

Fix externalURLs alert logic bug customer important team/web

Fixes https://github.com/sourcegraph/customer/issues/118

The issue was that the code assumed the array always had an element, but it doesn't need to have. I also noticed that we didn't check whether we actually support the code host. With this PR, we take the first code host from external links that we support, and show nothing if there is none.

+127 -50

0 comment

3 changed files

pr created time in 2 days

create barnchsourcegraph/sourcegraph

branch : fix-external-urls-destructure

created branch time in 2 days

Pull request review commentsourcegraph/sourcegraph

Update development section

 Now, follow the steps below for the browser you intend to work with. ### Chrome  - Browse to [chrome://extensions](chrome://extensions).-- If you already have the Sourcegraph extension installed, disable it by unchecking the "Enabled" box.-- Click on [Load unpacked extensions](https://developer.chrome.com/extensions/getstarted#unpacked), and select the `build/chrome` folder.+- If you already have the Sourcegraph extension installed, disable it using the toggle.+- Enable 'developer mode', click on [Load unpacked extensions](https://developer.chrome.com/extensions/getstarted#unpacked), save it in the `sourcegraph/client/browser/build/chrome` folder. - Browse to any public repository on GitHub to confirm it is working.-- After making changes it is necessary to refresh the extension. This is done by going to [chrome://extensions](chrome://extensions) and clicking "Reload".+- After making changes it is necessary to refresh the extension. This is done by going to [chrome://extensions](chrome://extensions) and clicking the "Reload" icon.
- After making changes it is sometimes necessary to refresh the extension. This is done by going to [chrome://extensions](chrome://extensions) and clicking the "Reload" icon.
AlicjaSuska

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

issue openedsourcegraph/sourcegraph

GraphQL ExternalLink should expose kind: ExternalServiceKind (enum) instead of serviceType: String

ExternalLink in GraphQL currently only exposes the serviceType as a string. This has caused a lot of headache in the frontend as we need to enumerate it to show appropiate icons, show the right browser extension install alerts, etc. Every time I have to go dig up the possible values in the backend, which is non-trivial because we have many properties named serviceType that are different things.

In a recent case this caused our alert logic to not be aware that external services like AWS code commit exist (which we don't support in the browser extension), resulting in us showing alerts to install the browser extension despite that code host not being supported. We could have avoided that mistake with more diligence of course, but I'm convinced that would not have happened had the property been an enum, so that the possible values would have been easily visible in TypeScript types/hovers/autocompletion.

Expected:

    kind: ExternalServiceKind

created time in 2 days

PullRequestReviewEvent

pull request commentsourcegraph/sourcegraph-open-in-sublime

Implement open-in-sublime

I think it's good to have

tjkandala

comment created time in 2 days

PullRequestReviewEvent
IssuesEvent

issue commentsourcegraph/sourcegraph

Support using native colors for code hosts running Sourcegraph extensions

I think what's missing here is adding documentation and maybe exposing a string enum in the API to reference these.

As a comparison, VS Code has ThemeColor in the API for this (string only) and a reference.

sqs

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentsourcegraph/sourcegraph

Fix blob viewer Percy flake

 describe('Blob viewer', () => {          it('shows a hover overlay from a hover provider and updates the URL when a token is clicked', async function () {             await driver.page.goto(`${driver.sourcegraphBaseUrl}/github.com/sourcegraph/test/-/blob/test.ts`)+            await driver.page.evaluate(() => localStorage.removeItem('hover-count'))+            await driver.page.reload()

This looks like a band-aid fix that only applies to this specific test. The root cause here seems to be that a previous test primes the localStorage so that the alert is shown on the next test. Tests should be isolated. Instead of adding this code to the test, we should be using beforeEach() to clear localStorage entirely before each test. Ideally even in createIntegrationTestContext() if there are no side effects of that.

tjkandala

comment created time in 2 days

PullRequestReviewEvent

PR merged sourcegraph/sourcegraph

Update dependency @sourcegraph/eslint-config to ^0.20.12 bot internal package npm

This PR contains the following updates:

Package Type Update New value References Sourcegraph
@sourcegraph/eslint-config devDependencies patch ^0.20.12 source code search for "@sourcegraph/eslint-config"

Release Notes

<details> <summary>sourcegraph/eslint-config</summary>

v0.20.12

Compare Source

Bug Fixes
  • deps: update typescript-eslint monorepo to ^4.5.0 (#​156) (669c6b1)

</details>


Renovate configuration

:date: Schedule: "" in timezone America/Los_Angeles.

:vertical_traffic_light: Automerge: Enabled.

:recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

:no_bell: Ignore: Close this PR and you won't be reminded about this update again.


  • [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

+50 -52

1 comment

2 changed files

renovate[bot]

pr closed time in 2 days

push eventsourcegraph/sourcegraph

renovate[bot]

commit sha dd7faa4c27b9e69d7ada674a84c39f7fa6e9ca09

Update dependency @sourcegraph/eslint-config to ^0.20.12 (#14959) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

push time in 2 days

delete branch sourcegraph/sourcegraph

delete branch : renovate/sourcegraph-eslint-config-0.x

delete time in 2 days

Pull request review commentsourcegraph/sourcegraph

Fix browser extension end-to-end tests

 export function testSingleFilePage({     describe('File views', () => {         it('adds "View on Sourcegraph" buttons to files', async () => {             await getDriver().page.goto(url)++            // Make sure the tab is active, because it might not be active if the install page has opened.+            await getDriver().page.bringToFront()

This looks like it should be done for all tests, not just this specific one. Should we put this in a beforeEach() somewhere, do it in the Driver perhaps?

marekweb

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

PR opened sourcegraph/sourcegraph

Final fixes for the browser extension

Noticed a few last things in my final round of testing.

image

image

+8 -4

0 comment

5 changed files

pr created time in 3 days

push eventsourcegraph/sourcegraph

Felix Becker

commit sha a7d8015e24bb7ed638bc4c8cca83a3af8a6f0e86

Fix invisible background highlight on code host icon

view details

Felix Becker

commit sha db67dbc2d03a8c7b96f67ef1abb392f654e47ed2

Fix icons not being centered

view details

push time in 3 days

delete branch sourcegraph/eslint-config

delete branch : renovate/typescript-eslint-monorepo

delete time in 3 days

push eventsourcegraph/eslint-config

renovate[bot]

commit sha 669c6b193baca2847cdcc1bd173befb435c3f9b4

fix(deps): update typescript-eslint monorepo to ^4.5.0 (#156) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

push time in 3 days

PR merged sourcegraph/eslint-config

Reviewers
fix(deps): update typescript-eslint monorepo to ^4.5.0 bot npm

This PR contains the following updates:

Package Type Update New value References Sourcegraph
@typescript-eslint/eslint-plugin dependencies minor ^4.5.0 source code search for "@typescript-eslint/eslint-plugin"
@typescript-eslint/parser dependencies minor ^4.5.0 source code search for "@typescript-eslint/parser"

Release Notes

<details> <summary>typescript-eslint/typescript-eslint</summary>

v4.5.0

Compare Source

Bug Fixes
  • eslint-plugin: [array-type] fix issues with readonly option (#​2667) (63d1d81)
  • eslint-plugin: [lines-between-class-members] fix typo in schema (#​2681) (a2a2514)
  • eslint-plugin: [naming-convention] check bodyless function parameters (#​2675) (c505863)
  • eslint-plugin: [no-invalid-this] allow "this" in class property definitions (#​2685) (dccb6ee)
  • eslint-plugin: [no-misused-promises] False negative in LogicalExpression (#​2682) (30a6951), closes #​2544
  • eslint-plugin: [no-unnecessary-type-assertion] correct fixer for vue files (#​2680) (55111af)
  • eslint-plugin: [return-await] do not auto-fix when type is any/unknown (#​2671) (d690c8d)
  • parser: minor fix regexp, map-filter to reduce (#​2684) (f1329f6)
Features
  • eslint-plugin: [dot-notation] add allowProtectedClassPropertyAccess option (#​2622) (bbc9e35)
  • eslint-plugin: [prefer-readonly-parameter-types] add ignoreInferredTypes option (#​2668) (91010e8)
  • eslint-plugin: [restrict-plus-operands] add intersection type determination logic (#​2628) (da71362)
  • typescript-estree: add flag EXPERIMENTAL_useSourceOfProjectReferenceRedirect (#​2669) (90a5878)

4.4.1 (2020-10-12)

Bug Fixes
  • eslint-plugin: [ban-ts-comment] support block comments (#​2644) (9c3c686)
  • eslint-plugin: [ban-types] allow banning types with specific parameters (#​2662) (77732a2)
  • eslint-plugin: [consistent-type-assertions] check type assertion in jsx props (#​2653) (393e925)
  • eslint-plugin: [no-duplicate-imports] distinguish member, default (#​2637) (c71f423)
  • eslint-plugin: [no-throw-literal] false positive with logical expressions (#​2645) (57aa6c7)
  • eslint-plugin: [no-unused-vars] fix false positives for duplicated names in namespaces (#​2659) (0d696c7)
  • eslint-plugin: [no-use-before-define] correctly handle typeof type references (#​2623) (8e44c78)
  • scope-manager: don't create a variable for global augmentation (#​2639) (6bc9325)

v4.4.1

Compare Source

Bug Fixes
  • eslint-plugin: [ban-ts-comment] support block comments (#​2644) (9c3c686)
  • eslint-plugin: [ban-types] allow banning types with specific parameters (#​2662) (77732a2)
  • eslint-plugin: [consistent-type-assertions] check type assertion in jsx props (#​2653) (393e925)
  • eslint-plugin: [no-duplicate-imports] distinguish member, default (#​2637) (c71f423)
  • eslint-plugin: [no-throw-literal] false positive with logical expressions (#​2645) (57aa6c7)
  • eslint-plugin: [no-unused-vars] fix false positives for duplicated names in namespaces (#​2659) (0d696c7)
  • eslint-plugin: [no-use-before-define] correctly handle typeof type references (#​2623) (8e44c78)
  • scope-manager: don't create a variable for global augmentation (#​2639) (6bc9325)

</details>


Renovate configuration

:date: Schedule: "on the 1st through 7th day of the month" in timezone America/Los_Angeles.

:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

:recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

:no_bell: Ignore: Close this PR and you won't be reminded about these updates again.


  • [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

+43 -43

0 comment

2 changed files

renovate[bot]

pr closed time in 3 days

push eventsourcegraph/sourcegraph

Felix Becker

commit sha ab76bf767e12c08a476182558542efd12c280ac6

Fix white background flash in options menu dark mode

view details

push time in 3 days

create barnchsourcegraph/sourcegraph

branch : no-theme-flashes

created branch time in 3 days

pull request commentsourcegraph/sourcegraph

Update browser extension icon state on private repositories

:shipit:

marekweb

comment created time in 3 days

PullRequestReviewEvent

issue commentwhatwg/html

Provide a way to have disabled form controls to be submitted (was: readonly attribute)

I was very disappointed to see <input type="color" value="..." readonly> doesn't work. It would be very useful to display colors consistently in an application that cannot be changed, but where you still want the user to be able to trigger the native OS color picker UI where you can see the individual components of the color broken down, where it sits in the hue wheel, potentially UI to add it to an OS-level favorite color palette etc. Just not apply any changes. disabled works, but will make the input non-interactive, i.e. it will not open the picker UI.

ilisepe1

comment created time in 3 days

PullRequestReviewEvent

Pull request review commentsourcegraph/sourcegraph

Clean up `<code>` styles

 $code-font-family: sfmono-regular, consolas, menlo, dejavu sans mono, monospace; $code-font-size: 12px; +.theme-dark {+    --code-bg: var(--color-bg-2);+}++.theme-light {+    --code-bg: var(--color-bg-2);+}

It is as of https://github.com/sourcegraph/sourcegraph/pull/14936 :)

sqs

comment created time in 3 days

push eventsourcegraph/sourcegraph

Felix Becker

commit sha 26cd3ffc2a786d22d61fd99efc42a9475ffd50ce

Add meta tag for color-scheme (#14936)

view details

push time in 3 days

delete branch sourcegraph/sourcegraph

delete branch : meta-color-scheme

delete time in 3 days

PR merged sourcegraph/sourcegraph

Add meta tag for color-scheme webapp

This prevents flashing a white background when reloading the page in dark mode and lets the browser pick better default styles, e.g. for forms. It also gives browser extensions adding dark modes to pages the ability to detect we have native dark mode and they shouldn't modify it.

More info: https://web.dev/prefers-color-scheme/

Also updates usage of deprecated APIs and moves the theme to <html>/:root instead of <body>.

I tested manually in Chrome, Firefox and Safari that theme switching and auto-theme-switching still work.

cc @sqs you may want to copy this for doc, handbook and about.

+16 -13

1 comment

4 changed files

felixfbecker

pr closed time in 3 days

Pull request review commentsourcegraph/sourcegraph

Add storybook for HierarchicalLocationsView, remove hardcoded theme colors

 const parsePosition = (string: string): Position => {  */ export function parseRepoURI(uri: RepoURI): ParsedRepoURI {     const parsed = new URL(uri)-    const repoName = parsed.hostname + parsed.pathname+    const repoName = parsed.hostname + parsed.pathname.replace(/^\/\//, '')

We should just include all polyfills in Storybook - we already include e.g. focus-visible. Iirc we have a shared polyfill.ts file that we could just properly share with the webapp.

URL polyfill comes from babel-preset-env/core-js, which we share in Storybook too, so that should work.

BTW, I think it would be good to completely remove these git:// URIs from this part of our app if possible (and probably even everywhere). What do you think?

I totally agree, these URIs are a pain everywhere they exist. I just never had the time to really rip them out. I think we're also gonna add alternative APIs to extensions next iteration so URI parsing is no longer needed, but even just not relying on them outside of the extension host would be great.

sqs

comment created time in 3 days

PullRequestReviewEvent

pull request commentsourcegraph/sourcegraph-git-extras

feat: support toggling 'whole file' annotations

@tjkandala just make sure that the visual pressed state stays correct even for users who were users of git blame before and that it defaults to "line" (on). I think it's fine to ignore any old setting.

tjkandala

comment created time in 3 days

pull request commentsourcegraph/sourcegraph

Add missing mocks to search integration tests

Logs are lookin good in Buildkite ✨

lguychard

comment created time in 3 days

PullRequestReviewEvent

pull request commentsourcegraph/sourcegraph

Fix blob viewer Percy flake

I just ran into this flakiness too and filed #14928

What do you mean with this?

This will be a short-lived fix, since we'll be able to disable the discoverability features in commonWebGraphQlResults soon.

tjkandala

comment created time in 3 days

Pull request review commentsourcegraph/sourcegraph-contact-author

Create contact-author extension

 {   "$schema": "https://raw.githubusercontent.com/sourcegraph/sourcegraph/main/client/shared/src/schema/extension.schema.json",   "name": "contact-author",-  "description": "",+  "description": "Contact the author (last committer) of any line of code, directly from a file view.",

I assumed what is called "author" is the author of the last commit that touched that line

That statement is correct :) But the description says "committer". "Committer" and "author" are two separate things in Git (and you can query both through our GraphQL API). See https://stackoverflow.com/questions/18750808/difference-between-author-and-committer-in-git

marekweb

comment created time in 3 days

PullRequestReviewEvent

Pull request review commentsourcegraph/sourcegraph-contact-author

Create contact-author extension

   "scripts": {     "eslint": "eslint 'src/**/*.ts'",     "typecheck": "tsc -p tsconfig.json",-    "build": "parcel build --out-file dist/contact-author.js src/contact-author.ts",+    "build": "parcel build --out-file dist/contact-author.js src/activate.ts",     "symlink-package": "mkdirp dist && lnfs ./package.json ./dist/package.json",-    "serve": "yarn run symlink-package && parcel serve --no-hmr --out-file dist/contact-author.js src/contact-author.ts",+    "serve": "yarn run symlink-package && parcel serve --no-hmr --out-file dist/contact-author.js src/activate.ts",

Keeping the extension named after the extension name makes it easier to identify in Chrome dev tools (stack traces, sources panel etc)

marekweb

comment created time in 3 days

PullRequestReviewEvent

Pull request review commentsourcegraph/sourcegraph-contact-author

Create contact-author extension

 {   "$schema": "https://raw.githubusercontent.com/sourcegraph/sourcegraph/main/client/shared/src/schema/extension.schema.json",   "name": "contact-author",-  "description": "",+  "description": "Contact the author (last committer) of any line of code, directly from a file view.",

It seems a bit weird to say "contact the author" but then clarify that it will contact the committer. Wouldn't contacting the author make more sense? E.g. the person who wrote the PR, not the one who merged it.

EDIT: reading the code, it seems it does look at the author, not the committer, so it's just the description that is wrong.

marekweb

comment created time in 3 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentsourcegraph/sourcegraph-git-extras

feat: support toggling 'whole file' annotations

           "description": "Whether to decorate all lines in a file, rather than just selected lines.",           "type": "boolean",           "default": false+        },+        "git.blame.decorations": {

The other setting should be removed, right?

tjkandala

comment created time in 3 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventsourcegraph/sourcegraph

Felix Becker

commit sha b83b657ff5dec15313b7c60df6b89357e3396aaf

Convert indentation to tabs

view details

push time in 3 days

more