GithubHelp home page GithubHelp logo

planula's Introduction

Planula

Planula is an HTML based web browser UI built on top of Gecko.

Goals

After an explanatory phase, the goal is to pave the way for a migration of the Firefox product to rely on web technologies, instead of XUL/XPCOM.

The migration strategy rely on incremental changes, trying to modularize the Firefox codebase based on the necessary needs that has been discovered with Planula.

At the same time Planula tries to offer a strict separation of concerns between the various parts that composite a browser UI in order to make contributions simpler, and put the focus on reducing the time it takes to deliver changes to users.

Concepts

  • Load the core navigation interface (the chrome) from https
  • Use WebExtensions to implement features and extend the chrome
    • Migrate those extensions back into Firefox (e.g: Download Manager)
  • Reuse as much as possible from mozilla-central (e.g: about:home, about:preferences, devtools, addon manager, gecko)
  • Focus on A/B testing with small and distinct incremental updates
    • Use Service Workers for the chrome
    • Use Web Extensions update for features

Prototype

In order to validate the concept, a small prototype has been set up.

It is very unstable and/or many features are in a half baked shape but it let us see what are the missing pieces, what will be the challenges, and does the concept simply works.

Currently performances are not great. This is vasly due to Web Extensions support and the highly scoped nature of Planula. Digging a little bit it does seems most of those can be fixed. It just needs times.

Features

  • Multiple windows with tabs
  • Basic Awesome bar
  • Basic tab session
  • Basic popup support
  • about: pages (about:addons, about:home, about:preferences[for gecko/platform prefs])
  • WebExtensions support (core + toolkit + incomplete tabs/browserAction API)
  • Devtools
  • De-facto support e10s
  • Able to run mochitest-plain test suite

Giving it a try

Try build, patch queue gecko. Screencast?

Installation

$ git clone http://github.com/vingtetun/planula.git planula

Currently Planula needs a couple of small patches to run on top of Gecko (e.g allow about: pages to be loaded into a mozbrowser iframe), but many parts should work by default on top of Firefox Nightly.

The project comes with its own built-in httpd daemon serving resources on port 8081. You need to specify the absolute path of the directory containing planula as an ENV variable called MOZ_BASE_DIR.

TODO > Create a shell script to start

$ MOZ_BASE_DIR=/path/to/planula firefox -profile planula/config/profile

Technology

Planula use a number of technologies to make it works properly:

  • ["The Web"] - HTML/JS/CSS are used to craft the build the interface
  • ["The Internet"] - The code chrome (toolbar, tab strip, tabs) is loaded on https
  • [Browser API] - aka mozbrowser API, to load web pages from HTML
  • [Service Workers] - Offline support for the chrome
  • [Support Web Extensions] - User Interface features are implemented as Web extensions
  • [Implement Web Extensions] - Support existing addons, and allows to abstract all browser related APIs
  • [BroadcastChannel] - Cross-contexts / Cross-processes communication
  • [System XMLHttpRequest] - To support open search. Will likely be replaced by a chrome.omnibox.
  • [Shared Worker] - Cross context shared libraries
  • [Bootstrap Extensions] - Allows to make the Web Extensions API to work and also workaround some Gecko limitations until they are fixed

Todos

  • uses WebExtensions to implement browser features: bookmarks, downloads, opensearch
  • add support for pdf.js/shumway
  • add Support for Firefox Hello
  • add support for Firefox Sync
  • add support for Private Windows.
  • add support for Session Restore
  • and many many things...

FAQ

Why a new project instead of starting directly from the Firefox codebase ?

There are many different options when it comes to change the underlying set of technologies used by Firefox. But it is hard to envision all the pros and cons of moving from XUL/XPCOM to something else (native, HTML, etc...). Also it seems extremelly hard to try to convert all of Firefox in once, whatever the choosen option is. And making something modular, or context agnostic, when you have only one consumer is often tricky.

Because of those reasons, it seems reasonable to create a small shell, acting as a new consumer for some specific browser chrome needs. Planula will then try to reuse as much as possible from Firefox by cleaning some pieces of code that relies on some browser.xul specificities, and when possible, upstream those changes. Planula also makes the assertions that some of the chrome will always be written using Web Technologies (e.g about:home, about:newtab). That without preventing reusing existing self contained components using XUL like DevTools or the Addon Manager. We believe that working on isolating those pieces, to reuse them in our small shell will not be lost work, whatever technologies for the front-end is choosen in the future. We also believe that making those consumers specifities agnostic may make it easier to migrate to Servo one day. Lastly, there are some others initiatives at Mozilla to explore HTML based UI for the browsers, such as browser.html and Hope. By implementing our own HTML shell, it will be easier for those to integrate with gecko.

What are the current need of the project ?

Like many projects: time, resources and supports.

The 2 current maintainers are not officialy dedicated to this project, and even if they were, 2 persons is not enough. Futhermore, because of the will to reuse existing parts and make them independent adding new people and finding them specific tasks is easy and will be highly beneficial to the project. Also, with Firefox OS and most of its codebase beeing shifted to Tier-3, we would like to ensure some parts stay under maintenance and under the radar of the platform. Mostly the Browser API so far. We need support if we start providing patches against gecko. These patches would mostly be about:

  • supporting <html:iframe mozbrowsertgt; rather than <xul:browser>,
  • stop assuming the top level browser is browser.xul and accessing its Javascript internal (like gBrowser) and instead use WebExtension APIs to interact with the browser,
  • maintain and enhance mozbrowser API.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.