Skip to content

Commit 1d924e2

Browse files
committed
Reworks & reorganizes the webview code
Splits App into AppBase & AppWithConfigBase for impl of new webviews
1 parent 018a024 commit 1d924e2

File tree

100 files changed

+413
-416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+413
-416
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
.cache-loader
33
dist
44
node_modules
5-
settings.html
6-
welcome.html
75
images/settings
86
gitlens-*.vsix

.vscodeignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@
22
.cache-loader/**
33
.github/**
44
.vscode/**
5-
dist/ui/**
5+
dist/webviews/main.js
66
emoji/**
77
images/docs/**
88
images/**/*.pdn
99
node_modules/**
1010
src/**
1111
test/**
1212
*.map
13+
.eslintrc.json
1314
.gitignore
15+
.mailmap
1416
.prettierignore
1517
.prettierrc
1618
CODE_OF_CONDUCT.md
1719
CONTRIBUTING.md
20+
generateEmojiShortcodeMap.js
1821
package-lock.json
1922
tsconfig.json
20-
tslint.json
21-
ui.tsconfig.json
22-
webpack.config.js
23+
webpack.config.js
24+
webviews.tsconfig.json

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4978,8 +4978,8 @@
49784978
"rebuild": "npm run reset && npm run build",
49794979
"reset": "npm run clean && npm install --no-save",
49804980
"watch": "webpack --watch --env.development --info-verbosity verbose",
4981-
"ui:optimize": "webpack --config-name ui --env.optimizeImages",
4982-
"ui:watch": "webpack --watch --config-name ui --env.development --info-verbosity verbose",
4981+
"webviews:optimize": "webpack --config-name webviews --env.optimizeImages",
4982+
"webviews:watch": "webpack --watch --config-name webviews --env.development --info-verbosity verbose",
49834983
"update:emoji": "pushd emoji && node ./shortcodeToEmoji.js && popd",
49844984
"postinstall": "node ./node_modules/vscode/bin/install",
49854985
"vscode:prepublish": "npm run reset && npm run bundle"
@@ -5004,6 +5004,7 @@
50045004
"eslint-loader": "2.1.2",
50055005
"eslint-plugin-import": "2.16.0",
50065006
"eslint-plugin-prettiest": "0.0.1",
5007+
"html-webpack-exclude-assets-plugin": "0.0.7",
50075008
"html-webpack-inline-source-plugin": "0.0.10",
50085009
"html-webpack-plugin": "3.2.0",
50095010
"imagemin-webpack-plugin": "2.4.2",

src/annotations/annotations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
GitUri
2222
} from '../git/gitService';
2323
import { Objects, Strings } from '../system';
24-
import { toRgba } from '../ui/shared/colors';
24+
import { toRgba } from '../webviews/apps/shared/colors';
2525

2626
export interface ComputedHeatmap {
2727
cold: boolean;

src/commands/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export enum Commands {
7878
ShowQuickStashList = 'gitlens.showQuickStashList',
7979
ShowRepositoriesView = 'gitlens.showRepositoriesView',
8080
ShowSearchView = 'gitlens.showSearchView',
81+
ShowHistoryPage = 'gitlens.showHistoryPage',
8182
ShowSettingsPage = 'gitlens.showSettingsPage',
8283
ShowWelcomePage = 'gitlens.showWelcomePage',
8384
StashApply = 'gitlens.stashApply',

src/container.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import { RepositoriesView } from './views/repositoriesView';
2121
import { SearchView } from './views/searchView';
2222
import { ViewCommands } from './views/viewCommands';
2323
import { VslsController } from './vsls/vsls';
24-
import { SettingsEditor } from './webviews/settingsEditor';
25-
import { WelcomeEditor } from './webviews/welcomeEditor';
24+
import { SettingsWebview } from './webviews/settingsWebview';
25+
import { WelcomeWebview } from './webviews/welcomeWebview';
2626

2727
export class Container {
2828
private static _configsAffectedByMode: string[] | undefined;
@@ -49,8 +49,8 @@ export class Container {
4949
context.subscriptions.push((this._statusBarController = new StatusBarController()));
5050
context.subscriptions.push((this._codeLensController = new GitCodeLensController()));
5151
context.subscriptions.push((this._keyboard = new Keyboard()));
52-
context.subscriptions.push((this._settingsEditor = new SettingsEditor()));
53-
context.subscriptions.push((this._welcomeEditor = new WelcomeEditor()));
52+
context.subscriptions.push((this._settingsWebview = new SettingsWebview()));
53+
context.subscriptions.push((this._welcomeWebview = new WelcomeWebview()));
5454

5555
if (config.views.compare.enabled) {
5656
context.subscriptions.push((this._compareView = new CompareView()));
@@ -238,9 +238,9 @@ export class Container {
238238
return this._searchView;
239239
}
240240

241-
private static _settingsEditor: SettingsEditor;
242-
static get settingsEditor() {
243-
return this._settingsEditor;
241+
private static _settingsWebview: SettingsWebview;
242+
static get settingsWebview() {
243+
return this._settingsWebview;
244244
}
245245

246246
private static _statusBarController: StatusBarController;
@@ -266,9 +266,9 @@ export class Container {
266266
return this._vsls;
267267
}
268268

269-
private static _welcomeEditor: WelcomeEditor;
270-
static get welcomeEditor() {
271-
return this._welcomeEditor;
269+
private static _welcomeWebview: WelcomeWebview;
270+
static get welcomeWebview() {
271+
return this._welcomeWebview;
272272
}
273273

274274
private static applyMode(config: Config) {

src/ui/ipc.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/ui/settings/index.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/ui/welcome/app.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)