diff --git a/docs/content/getting-started/overview.md b/docs/content/getting-started/overview.md index f2082b7..9a76b6b 100644 --- a/docs/content/getting-started/overview.md +++ b/docs/content/getting-started/overview.md @@ -74,7 +74,13 @@ The appid follows reverse dns naming conventions. For example, Fushra owns the d ? Enter an appid › dev.gluon.example ``` -Next you need to chose a starting template for your browser. You can go with userchrome, where you apply css changes to firefox or custom html, where you have to write everything (tabs, navigation, search boxes) yourself. We generally recommend userchrome for new users, as it has the lowest learning curve. Additionally, you can chose to use no template. +Next you need to chose a starting template for your browser. If you know what you are doing, you can go with `None` and configure it how you like. Otherwise, we recommend you stick with `UserChrome`. + +``` +? Select a ui mode template › - Use arrow-keys. Return to submit. + None +❯ User Chrome (custom browser css, simplest) +``` Now you have created the directory structure for your project, you can build it for the first time. First, ask melon to download the firefox source. diff --git a/src/commands/setupProject.ts b/src/commands/setupProject.ts index 25cf07f..d2984ca 100644 --- a/src/commands/setupProject.ts +++ b/src/commands/setupProject.ts @@ -115,16 +115,16 @@ export async function setupProject(): Promise { choices: [ { title: 'None', + description: + 'No files for the ui will be created, we will let you find that out on your own', value: 'none', }, { - title: 'User Chrome (custom browser css, simplest)', + title: 'UserChrome', value: 'uc', }, - { - title: 'Custom html', - value: 'html', - }, + // TODO: We also need to add extension based theming like the version + // used in Pulse Browser ], }, ]) @@ -142,13 +142,7 @@ export async function setupProject(): Promise { await copyRequired() - if (ui === 'html') { - await copyOptional([ - 'customui', - 'toolkit-mozbuild.patch', - 'confvars-sh.patch', - ]) - } else if (ui === 'uc') { + if (ui === 'uc') { await copyOptional(['browser/themes']) } diff --git a/template/src/browser/confvars-sh.patch.optional b/template/src/browser/confvars-sh.patch.optional deleted file mode 100644 index 978253d..0000000 --- a/template/src/browser/confvars-sh.patch.optional +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/browser/confvars.sh b/browser/confvars.sh -index 92871c9516f98e065c5240a4a1cc7ead1de8ef9d..f9c515c48b67ee581e1280d587de5cdcf380002f 100755 ---- a/browser/confvars.sh -+++ b/browser/confvars.sh -@@ -26,7 +26,7 @@ if test "$OS_ARCH" = "WINNT"; then - fi - fi - --BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml -+BROWSER_CHROME_URL=chrome://customui/content/browser.html - - # MOZ_APP_DISPLAYNAME will be set by branding/configure.sh - # MOZ_BRANDING_DIRECTORY is the default branding directory used when none is diff --git a/template/src/customui.optional/browser.html b/template/src/customui.optional/browser.html deleted file mode 100644 index 8eaa9ff..0000000 --- a/template/src/customui.optional/browser.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - Welcome to the browser - - - - -
-
- -
-
-

Good, you are setup!

-

You chose the option to customize the html of the browser. This means you inherit none of the UI or logic firefox has in relation to tabs, etc. I wish you the best of luck!

- - -
-
- - - - \ No newline at end of file diff --git a/template/src/customui.optional/css/browser.css b/template/src/customui.optional/css/browser.css deleted file mode 100644 index 156390b..0000000 --- a/template/src/customui.optional/css/browser.css +++ /dev/null @@ -1,14 +0,0 @@ -body { - background-color: #333333; - color: white; - font-family: sans-serif; - height: 100vh; - margin: 0; -} - -#grid { - display: grid; - grid-template-columns: 1fr 1fr; - height: 100%; - align-content: center; -} diff --git a/template/src/customui.optional/jar.mn b/template/src/customui.optional/jar.mn deleted file mode 100644 index 00a1390..0000000 --- a/template/src/customui.optional/jar.mn +++ /dev/null @@ -1,5 +0,0 @@ -browser.jar: -% content customui %content/customui/ contentaccessible=yes - content/customui/browser.html (browser.html) - content/customui/css/ (css/**/**) - content/customui/scripts/ (scripts/**/**) \ No newline at end of file diff --git a/template/src/customui.optional/moz.build b/template/src/customui.optional/moz.build deleted file mode 100644 index 8a88d61..0000000 --- a/template/src/customui.optional/moz.build +++ /dev/null @@ -1 +0,0 @@ -JAR_MANIFESTS += ["jar.mn"] \ No newline at end of file diff --git a/template/src/customui.optional/scripts/browser.js b/template/src/customui.optional/scripts/browser.js deleted file mode 100644 index 8c29162..0000000 --- a/template/src/customui.optional/scripts/browser.js +++ /dev/null @@ -1,3 +0,0 @@ -import { launchDevTools } from './devtools.js' - -document.getElementById('launchDevTools').addEventListener('click', launchDevTools) diff --git a/template/src/customui.optional/scripts/devtools.js b/template/src/customui.optional/scripts/devtools.js deleted file mode 100644 index 115c9e4..0000000 --- a/template/src/customui.optional/scripts/devtools.js +++ /dev/null @@ -1,7 +0,0 @@ -const launcher = ChromeUtils.import( - "resource://devtools/client/framework/browser-toolbox/Launcher.jsm" -).BrowserToolboxLauncher - -export function launchDevTools() { - launcher.init() -} diff --git a/template/src/toolkit/toolkit-mozbuild.patch.optional b/template/src/toolkit/toolkit-mozbuild.patch.optional deleted file mode 100644 index 12423eb..0000000 --- a/template/src/toolkit/toolkit-mozbuild.patch.optional +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild -index fd9903bac5b07c655ee77c94f8f795b6773676ad..3127dc35fd8793b91ddd437f30b1917f6eff29ce 100644 ---- a/toolkit/toolkit.mozbuild -+++ b/toolkit/toolkit.mozbuild -@@ -202,3 +202,6 @@ if CONFIG['ENABLE_TESTS']: - - if CONFIG['FUZZING']: - DIRS += ['/tools/fuzzing'] -+ -+# Custom UI toolkit -+DIRS += ['/customui']