Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Remove globbing from all frontend code#49687

Merged
philipp-spiess merged 6 commits into
mainfrom
ps/rm-globbing-from-frontend
Mar 21, 2023
Merged

Remove globbing from all frontend code#49687
philipp-spiess merged 6 commits into
mainfrom
ps/rm-globbing-from-frontend

Conversation

@philipp-spiess

@philipp-spiess philipp-spiess commented Mar 20, 2023

Copy link
Copy Markdown
Contributor

As @fkling noticed in #49684, these option is no longer supported:

Time to do some cleanup in the front end code!

Process:

  • Grep for globbing
  • Delete everything that is related to front end code

Test plan

  • CI

App preview:

Check out the client app preview documentation to learn more.

As @fkling noticed in #49684, these option is no longer supported:

- https://github.com/sourcegraph/sourcegraph/pull/27886
- https://github.com/sourcegraph/sourcegraph/pull/46045

Time to do some cleanup in the front end code!
@philipp-spiess philipp-spiess marked this pull request as ready for review March 20, 2023 13:29
@philipp-spiess philipp-spiess requested review from a team March 20, 2023 13:30
@sourcegraph-bot

sourcegraph-bot commented Mar 20, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 299422e...877e163.

Notify File(s)
@fkling client/shared/src/search/query/completion-utils.ts
client/shared/src/search/query/completion-utils.ts
client/shared/src/search/query/completion.ts
client/shared/src/search/query/completion.ts
client/shared/src/search/query/providers.ts
client/shared/src/search/query/providers.ts
client/web/src/search/SearchConsolePage.tsx
client/web/src/search/index.test.ts
client/web/src/search/index.ts
client/web/src/search/input/SearchNavbarItem.tsx
client/web/src/search/input/suggestions.ts
@limitedmage client/web/src/enterprise/code-monitoring/components/FormTriggerArea.tsx
client/web/src/search/SearchConsolePage.tsx
client/web/src/search/index.test.ts
client/web/src/search/index.ts
client/web/src/search/input/SearchNavbarItem.tsx
client/web/src/search/input/suggestions.ts
@vdavid client/jetbrains/src/main/java/com/sourcegraph/config/ConfigUtil.java
client/jetbrains/src/main/java/com/sourcegraph/config/SettingsComponent.java
client/jetbrains/src/main/java/com/sourcegraph/config/SettingsConfigurable.java
client/jetbrains/src/main/java/com/sourcegraph/config/SourcegraphApplicationService.java
client/jetbrains/src/main/java/com/sourcegraph/config/SourcegraphProjectService.java
client/jetbrains/webview/src/bridge-mock/call-java-mock.ts
client/jetbrains/webview/src/search/App.tsx
client/jetbrains/webview/src/search/index.tsx
client/jetbrains/webview/src/search/input/JetBrainsSearchBox.story.tsx
client/jetbrains/webview/src/search/input/JetBrainsSearchBox.tsx
client/jetbrains/webview/src/search/js-to-java-bridge.ts
client/jetbrains/webview/src/search/types.d.ts

@sg-e2e-regression-test-bob

sg-e2e-regression-test-bob commented Mar 20, 2023

Copy link
Copy Markdown

Bundle size report 📦

Initial size Total size Async size Modules
-0.01% (-0.32 kb) -0.01% (-0.90 kb) -0.00% (-0.58 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits 877e163 and b7d28f7 or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

@vovakulikov vovakulikov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested locally, code insights pickers and core search functionality works as expected, left small comments

*/
export const regexInsertText = (value: string, options: { globbing: boolean }): string => {
const insertText = options.globbing ? value : `^${escapeRegExp(value)}$`
export const regexInsertText = (value: string, _options: {}): string => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If option was only about globbing property can we delete this argument?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes

} else {
aSettings.remoteUrlReplacements = mySettingsComponent.getRemoteUrlReplacements();
}
//noinspection ReplaceNullCheck

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Old good java.

async (token, type) =>
(await fetchDynamicSuggestions(token, type)).flatMap(suggestion =>
suggestionToCompletionItems(suggestion, { globbing })
suggestionToCompletionItems(suggestion, {})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we remove empty object arguments?

@limitedmage limitedmage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

@valerybugakov valerybugakov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@philipp-spiess philipp-spiess merged commit ff5e665 into main Mar 21, 2023
@philipp-spiess philipp-spiess deleted the ps/rm-globbing-from-frontend branch March 21, 2023 12:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/code-exploration Issues owned by the Code Exploration team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants