• Stars
    star
    526
  • Rank 84,247 (Top 2 %)
  • Language
    HTML
  • License
    Other
  • Created about 10 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Polymer 1.0 version of New Gmail app

PolyMail

PolyMail is an offline, mobile-first, web version of the new Gmail native app UI. It's built using Polymer 1.0 and Service Worker and...is a WIP.

Demo: https://poly-mail.appspot.com/   (mock data: https://poly-mail.appspot.com/?debug)

PolyMail

Note: the app is read only despite what the permissions popup says. Also, most of the buttons don't do anything. There's a lot of missing functionality.

Performance

TLDR: paint is ~393ms and the app loads ~1s on Chrome desktop. Motorola G - Chrome - 3G Fast connection first paint is 1.66s The full performance improvements over the Polymer 0.5 version are documented here.

Full results

===

Setup

In your local checkout, install the deps and Polymer elements

npm install

This will also run bower install for you.

Development & Building

Compile the ES6

While ES6 Classes run natively in Chrome, FF Nightly, Safari 9, and Edge, some of JS in PolyMail still requires compilation using Babel. In particular, scripts/googleapis.js uses ES6 => functions and modules (import statement) in addition to classes.

Compile the JS/CSS:

gulp

This produces a single built and concatenated dist/scripts/bundle.js and compiles the rest of the app into dist/. You're ready to run the app!

Run the app

Use any webserver you'd like. I use npm serve:

serve -p 8080

You must run from /dist

serve -p 8080 serves the root folder, but the app runs the production version from dist/. So be sure to first run gulp, then hit http://localhost:8080/dist/.

Watching files

For easier development, there's a task for rebuilding the vulcanized elements.html bundle and compiling the ES6 as you make changes:

gulp watch

Using test data

Hitting http://localhost:8080?debug will bypass Google Sign-in and use mock data for threads. Under this testing mode, you will no see custom labels in the left nav or user profile images show up on threads.

Deploying

npm run deploy

Future improvements

  • Push notifications
  • Reading emails in a thread
  • Creating emails
  • Clicking Label actually does filtering
  • Pagination (currently only the first few emails are visible)
  • a11y (keyboard access, tab support)
  • i18n
  • http2 push
  • Service Worker offline support & caching
  • Caching API requests
  • Auto-refresh inbox
  • Use Google Sign-in 2.0
  • Use GMail API push notifications (docs)
  • Use GMail API history feature (docs)
  • Searching emails. Full gmail search (e.g. to:me from:[email protected] is supported`).

More Repositories

1

filer.js

A wrapper library for the HTML5 Filesystem API what reuses UNIX commands (cp, mv, ls) for its API.
JavaScript
1,486
star
2

appmetrics.js

A small (< 1kb) library for measuring things in your web app and reporting the results to Google Analytics.
JavaScript
1,370
star
3

try-puppeteer

Run Puppeteer code in the cloud
JavaScript
727
star
4

idb.filesystem.js

HTML5 Filesystem API polyfill using IndexedDB
JavaScript
486
star
5

html5demos

HTML5 Demos
JavaScript
384
star
6

material-playground

Polymer material design playground
JavaScript
258
star
7

html5can

My "The Web Can Do That!?" presentation from Google I/O 2012
CSS
216
star
8

demos

HTML
146
star
9

lighthouse-badge

Lighthouse score badge
HTML
136
star
10

polymer-experiments

Example/useful Polymer elements
HTML
104
star
11

geo-location

Web component element for the Geolocation API
HTML
86
star
12

puppeteer-functions

Puppeteer Firebase Functions demo
JavaScript
79
star
13

polymer-change

Google I/O 2014 session
CSS
66
star
14

i18n-msg

Polymer element for i18n string replacement
HTML
63
star
15

headless-karma-travis

Example repo for testing on Headless Chrome with Travis + Karma + Mocha + Chai
JavaScript
44
star
16

declarative-web-components

Author web components, declaratively
JavaScript
35
star
17

lighthouse-hue

Big Lighthouse Kiosk at Google I/O 2017
JavaScript
29
star
18

webcomponentsshift

Web Components: A Tectonic Shift for Web Development
CSS
28
star
19

polymer-todomvc-codelab

Codelab for Polymer-based TodoMVC app
CSS
20
star
20

icanbeyourlighthouse

When you need guidance
HTML
14
star
21

webcomponents

Resources for Web Components
13
star
22

spark-line

<spark-line> web component for making...spark lines!
JavaScript
11
star
23

lighthouse-httparchive

Lighthouse metrics from HTTPArchive snapshots
JavaScript
8
star
24

io-2012-slides

Automatically exported from code.google.com/p/io-2012-slides
CSS
7
star
25

beacon-send

Web component for the Beacon API
HTML
7
star
26

wedding-site

HTML
7
star
27

oauthplayground

The original OAuth (1.0) Playground
PHP
7
star
28

moreawesomeweb

A More Awesome Web: Features You've Always Wanted @ Google I/O 2013
CSS
7
star
29

html5wow

Automatically exported from code.google.com/p/html5wow
JavaScript
5
star
30

Gauntlet

Gauntlet card game
5
star
31

featurepolicy-extension

Feature Policy Tester DevTools Extension
JavaScript
4
star
32

blink-components

web service that lists the components used by the Blink team
HTML
4
star
33

blog

My Blog
HTML
4
star
34

select-y

Clippy like helper
CSS
4
star
35

strum

3
star
36

github-quarterly-stats

Adds a button on a user's Github landing page to fetch contributions for the quarter
JavaScript
3
star
37

site-template

Static, Node/Express server setup
JavaScript
2
star
38

dotfiles

Resources
Shell
2
star