Code Monkey home page Code Monkey logo

fireplace's Introduction

Marketplace Frontend

Build Status

The Firefox Marketplace frontend.

screenshot of Marketplace homepage

Installation and Usage

make install
make serve

This will start a web server on http://localhost:8675.

Building for Production

Our build process bundles up our JS, minifies our CSS, compiles our templates, and extracts locales into JS modules. To run the build process:

make build

This will generate files including:

src/media/templates.js
src/media/js/include.js
src/media/js/include.js.map
src/media/css/include.css

Developing the Packaged App

To package the Marketplace frontend, run:

make package

This will output a package and output to package/archives/. You can use WebIDE to install this package in the device or simulator.

Further details can be found in the Marketplace documentation.

Marketplace Mock API

We have an instance of a mocked version of the Marketplace API at https://flue.paas.allizom.org. Documentation can be found in marketplace-api-mock's repository.

iframed Package

We currently ship with an iframed version of the Marketplace frontend. It is a package that contains an iframe pointing to the Marketplace website. See more details within the iframe package directory.

Localizing

A detailed guide to extracting strings and creating JS language packs is located on the wiki.

Tests

We use CasperJS to write UI tests and mocha, chai and sinon for unit tests.

Running Unit Tests

make unittest

This will launch the karma test runner that will run the unit tests in a new instance of Firefox.

Running Functional and UI Tests

Before running the functional and UI tests, your settings_local.js should have api_url and media_url pointing to an instance of marketplace-api-mock. You can easily achieve this by setting the API environment variable when calling make serve, this will overwrite your current api_url and media_url settings.

First, start a server with:

API=mock make serve

Then, run the tests against it. We support both PhantomJS and SlimerJS to run tests in WebKit and Gecko, respectively. To run both use make uitest, if you just want to run them in one browser make uitest-phantom or make uitest-slimer.

make uitest-phantom

Running Functional and UI Tests in SlimerJS

SlimerJS requires a path to a firefox binary. make uitest-slimer will try to use /Applications/Firefox.app/Contents/MacOS/firefox which is the path to your default Firefox on Mac. This path might not work for you and best results are achieved by using Firefox 30. You can download a copy of Firefox 30 on ftp.mozilla.org. To set the path to your firefox use the SLIMERJSLAUNCHER environment variable. You might want to call export SLIMERJSLAUNCHER=/path/to/firefox in your shell's setup script.

SLIMERJSLAUNCHER=/Applications/Firefox-30.app/Contents/MacOS/firefox make uitest-slimer

Running a Single Functional or UI Test

UITEST_FILE=tests/ui/<PATH_TO_TEST_FILE> make uitest

Serving with Nginx

If you wish to serve the Marketplace frontend with nginx, which is often useful for keeping all the Marketplace projects on the same domain, read about serving Fireplace with Nginx.

fireplace's People

Contributors

andy-moz avatar artpoli avatar cesperanc avatar chuckharmston avatar civas avatar clouserw avatar cvan avatar dethe avatar devaneymoz avatar diox avatar ibaios avatar kelemeng avatar kitsunenosarat avatar koehlermichael avatar kumar303 avatar kyoshino avatar mattbasta avatar milupo avatar mstriemer avatar muffinresearch avatar ngokevin avatar petercpg avatar robhudson avatar spasovski avatar theochevalier avatar tonnesm avatar ujdhesa avatar unghost avatar witia1 avatar yfdyh000 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

fireplace's Issues

Kill RECAPTCHA

The ability for anonymous users to POST data is a thing we need. And captchas are stupid and there are countries of low-waged humans employed to solve captchas. So let's decide on a possible alternative:

  • Make a hidden field (e.g., input[name=notarobot]) in every form and add middleware to the API endpoints that checks that request.POST.get('notarobot') == '' upon each POST
  • http://areyouhuman.com

Category Drop Down Menu

There are 2 things that seems to be wrong(atleast to me):

  1. The Categories Menu items are made to listen 2 events mousedown and mouse click well the former one make a category selected even though i would have accidentally just pressed the mouse and then moved it away.
    Could have a mouseup handler if you are insisting to keep it, a flag(element attribute as flag) or something that tells that whether it was a click or just a mouse up-down game.
  2. Whenever i click categories[the drop down list], clicking out somewhere should have made it disappear or even a Esc key handler would be great.

Solve caching

Do it.

Cache-control headers, throw ish in an object, etc.

Minify assets

Require gives us one JS file, but we need to still pass this to uglify-js. And we should probably get cleancss to optimize our CSS.

please add LICENSE file

This repository lacks information on how it's licensed for distribution. Please add a LICENSE file and copyright information.

Duplicated string in Greek (el) messages.po

No idea what happens to the website, but for sure this is breaking a script I run to extract l10n stats (msgfmt --statistics).

fireplace/locale/el/LC_MESSAGES/messages.po:596: duplicate message definition...
fireplace/locale/el/LC_MESSAGES/messages.po:574: ...this is the location of the first definition

[back] Home

Give us a list of featured apps and categories.

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.