Giter VIP home page Giter VIP logo

tofino's Introduction

Project Tofino

Linux Build Status Windows Build Status Coverage Status

Project Tofino is a browser interaction experiment.

The kinds of things we use browsers for on PCs and mobile devices are different than they were when the current "tabs across the top" browsers were designed. We believe we can do a lot better by focusing on the tasks and activities users engage browsers for. Project Tofino is one of our explorations.

This project is extremely immature. It's currently at the "OK, lets throw some stuff together to see what happens" stage. Please adjust your expectations accordingly. The tools we're using are not a statement on the set of technologies we'll use to build a final product if these ideas pan out. We're looking for the quickest way to build the experiments we want, not a long-term technical strategy.

If you like a wild ride and you've got another browser for real work, we'd love to have your comments on what works and what doesn't. But right now the "what works" list is a lot shorter than the "what doesn't" list, so maybe check back in a few weeks when there's more to look at.

We blog here: https://medium.com/project-tofino

We hang out on Slack here: https://project-tofino.slack.com (you can get an invite at http://tofino-slack-invite.mozilla.io)

Build

Documentation for building is found in docs/building.md.

Developing

  • npm start - Runs the build in production mode. Should be similar to a packaged build.
  • npm run dev - Runs the build in development mode with hot module reloading.
  • npm run package - Creates a distributable package.
  • npm run clobber - Destroys a handful of temporary files (electron build, node modules, configurations) to clean up invalid states. If running into strange issues, try this command, followed by an npm install.

Even though the user agent and content services are reused between multiple browser instances, they don't outlive their parent process by default when it exits, to ease development. To have them kept alive even when there are no more clients left, npm run serve will start these services standalone for finer lifetime control.

Testing

Currently runs linting, unit and webdriver tests with mocha.

npm test

Contributing

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

See CONTRIBUTING.md for further notes.

This project is very new, so we'll probably revise these guidelines. Please comment on a bug before putting significant effort in if you'd like to contribute.

The code uses examples from many different places, but the foundation was started from a set of posts from Paul Frazee:

License

This software is licensed under the Apache License Version 2. See LICENSE for details.

tofino's People

Contributors

aaorris avatar bgrins avatar campd avatar darkwing avatar gabrielluong avatar greenkeeperio-bot avatar joewalker avatar jonathankingston avatar jsantell avatar legneato avatar linclark avatar lmorchard avatar mactkg avatar mossop avatar ncalexan avatar rnewman avatar suriyaakudoisc avatar victorporof avatar vsethuooo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tofino's Issues

Rename npm script 'start-dev' task to 'dev'

I think the original intentions was that the npm scripts was gonna be called 'npm start-dev', but in reality, you need to use 'npm run' to run scripts. Instead of calling 'npm run start-dev', let's simplify to 'npm run dev'

Add a style guide

We have the eslint rules enforcing certain styles but there are other things to say here.

Can't find a local build of electron anymore

Started happening after #62

After this, gulp run is failing on a fresh clone, even after a npm install:

fs.js:584
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/Users/victorporof/Desktop/tofino/node_modules/electron-prebuilt/dist/Electron.app/Contents/MacOS/version'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at Object.getElectronVersion (utils.js:25:13)
    at Object.<anonymous> (config-builder.js:25:24)
    at Module._compile (module.js:413:34)
    at loader (/Users/victorporof/Desktop/tofino/node_modules/babel-register/lib/node.js:126:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/victorporof/Desktop/tofino/node_modules/babel-register/lib/node.js:136:7)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)

Need License

A LICENSE file as well as license in package.json

Moving pieces around to match mockups

Moving the NavBar to the top, and TabBar below, and moving buttons around to match the mockups. TabBar will eventually be hidden like the mockups and revealed with the "Pages" button.

Working on this now.

Collect rudimentary event metrics

This ticket tracks collecting rudimentary metrics. It's the kind of thing we'll want on day one. Google Analytics is easy and has the simplest analysis set-up. It's intended to be used event-by-event without much (if any) batching. Historically, Mozilla has been reluctant to share fine-grained data with Google in any form.

Mozilla's own Telemetry system is an option. It's intended to be used in batch form. The ping format is more or less free-form, but if we use Mozilla's Telemetry we probably want to converge on the v4 core ping format at least. The new data pipeline is fast (~15 minutes to view in Spark) and supports a range of analyses. It's nothing like Google Analytics, though.

There are other off-the-shelf systems, but I don't know the competitive merits.

Use 7z for packaging

It provides nearly 50% compression ratio improvement due to solid archive.

I checked some similar formats (like tar.gz/bz2/xz), but they seem weaker than 7z. If this brings a compatibility issue, I hope it can serve as an alternative option or provided according to the platform.

Debian buid fail

Hi
When i try i Debian building i receive:
root@debian:/home/fabrizio/Scrivania# npm install tofino
npm WARN engine [email protected]: wanted: {"node":">=5.8.0"} (current: {"node":"4.3.1","npm":"1.4.21"})
npm WARN optional dep failed, continuing [email protected]
|

[email protected] postinstall /home/fabrizio/Scrivania/node_modules/tofino
electron-rebuild

sh: 1: electron-rebuild: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] postinstall: electron-rebuild
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the tofino package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron-rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls tofino
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.4.0-1-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "tofino"
npm ERR! cwd /home/fabrizio/Scrivania
npm ERR! node -v v4.3.1
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/fabrizio/Scrivania/npm-debug.log
npm ERR! not ok code 0
root@debian:/home/fabrizio/Scrivania#

Inactive tabs are not resized when opened.

Inactive tabs don't seem to resize when they are shown.

Steps to reproduce:

  • Start with the small browser window
  • Double click on the top bar to make full screen
  • Select the second tab which was opened at first load also
  • Notice that the tab is the same size as the initial window

Ubuntu 16.04 and Node 5.8.0

Should prevent transpiling of node modules

Maybe we can do this via eslint.

Since we transpile our code before packaging, these values get turned into strings of the current machine, not the machine where a distributable is actually run. Most of the time it would be ok (like the os.platform() value), but there may be other discrepencies. Either way, it's a bit confusing.

If you need to query similar info, we should do it at build time -- look at build/config-builder.js at how the build-config.js is created during build time to have build-specific configurations, not runtime specific.

I'm sure I could be missing some nuisances, but this seems to make sense. How do others feel about this? Is this nothing to worry about?

Transpile main process code via webpack

Right now we're doing this in runtime. We need to transpile this code (put it in app-built/app.js? no idea) and then move all the babel deps to devDependency so we don't put it in the distributed package.

[I'm definitely not working on this]

Make components "dumb"

Extra reading: https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0#.8e28rxk9a

Especially when using with redux, almost all of our components should be "dumb" -- that is, just take props and construct a DOM fragment. This includes handlers and the like, where our main container/app passes in all handlers necessary into its children components. This also will lead to easier testing due to having control over the props passed in, but also minimize the area in which we directly access electron methods in components.

Make hotload not bring App to the foreground

I hit save in Emacs, a lot. I manage my git tree in Emacs, a lot. We hot reload the App front-end even when it's not the foreground App; and that brings the window to the front. Can we not do that?

Expose webpack failures when running in dev mode

Right now, if there's a build failure when running gulp run-dev, we just get a useless 404 error for static/built/browser.js.

When running in gulp run, we can open the tools and see "Uncaught Error: Cannot find module "./navbar/navbar.jsx". We need to display this information somewhere.

Browser chrome doesn't interact

All of the interface of the top bar is not clickable (url bar, reload, close etc) and I get the grabbing hand cursor.

The tabs and new button are clickable and selectable.

I'm running this on Ubuntu 16.04 with Node 5.8.0.

Support Private windows or Private tabs

I have no opinion on the value of the "Private browsing" product feature, but it does raise require particular architectural features. This is relevant to #44 in particular, since the profile service needs to know when certain windows (or tabs) are private, and should have different views of the profile data.

Loop bookmark star action through the main process

This is a piece demonstrating part of the profile service envisioned by #44. Right now, we have a "bookmark" external action that writes to IndexedDB; that's shared by each rendering process. This cross-process sharing should happen, but with the main process managing the global bookmark state.

Extract main process Profile service

Right now, there's a global set of bookmarks shared between BrowserWindow instances via IndexedDB. This approach doesn't address Sync (in the future) well. @rnewman has written about this in https://github.com/FractalBrew/blueharvest/wiki/Profile-service (currently (temporarily?) private).

This ticket tracks fleshing out a main process profile service, fleshing out the IPC required to move between the two, and moving the existing approach to the new hotness.

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.