Git Product home page Git Product logo

examples's Introduction

@dojo/examples

Build Status

This repository contains example applications built using Dojo.

For current progress on Dojo, contribution guidelines and other information, please visit dojo/meta.

Examples

Here is a table of the current examples available in this repository complete with code and a hosted demonstration:

Example Code Demo Sandbox Overview
TodoMVC Link Link Link Reference implementation of TodoMVC built using Dojo packages.
TodoMVC (kitchen sink) Link Link Link Feature-enhanced version of TodoMVC built using Dojo packages.
iCache Basic Link Link Link Basic example of icache middleware usage
iCache Advanced Link Link Link Example of getOrSet icache API and typed icache
Resize Middleware Link Link Link Demonstrates working with an element that changes dimensions
HNPWA Link Link Link Reference implementation of HNPWA built using Dojo packages.
Custom Element Showcase Link Link Showcase of widgets from @dojo/widgets compiled as custom elements.
Custom Element Menu Link Link Demonstration of a menu widget compiled as a custom element.
Real-world Application Link Link Link A real-world implementation of an existing site using Dojo packages: conduit.
Intersection Observer Link Link Link Demonstration of the Intersection meta and how it can be used to create an infinite scrolling list.
Resize Observer Link Link Demonstration of the Resize meta and how it can be used to create responsive components.
Dgrid Wrapper Link Link Demonstration of the Dgrid Wrapper for running dgrid in a reactive way in a modern Dojo application.
World Clock Link Link Demonstration of i18n in an application built using Dojo packages.
Static Blog Link Link Link Template for creating a blog using dojo with build time rendering and blocks
Store Arrays Link Link Link Demonstrates working with arrays in @dojo/stores

How Do I Contribute?

We appreciate your interest!

Adding an Example

To add an example to the project, create the example in the packages directory. In order to build and deploy the application there are a few required.

Npm Scripts

There are two required npm scripts:

build:deploy

The build:deploy script needs to install node modules at the beginning and remove them at the end after successfully building the example. E.g.

"build:deploy": "npm install && dojo build --dojorc .dojorc-deploy && shx rm -rf node_modules",

package

The package script needs move the built output into the correct directory in the main output/dist directory. E.g.

"package": "shx cp -r output/dist/ ../../output/dist/hnpwa/",

.dojorc-deploy file

A .dojorc-deploy file that extends the base .dojorc but specifies a base of the examples directory name. E.g.

{
	"extends": ".dojorc",
	"build-app": {
		"base": "/hnpwa/"
	}
}

Installation & Testing

Refer to each README.md for details on installing and testing the examples:

Building all Examples

From the root directory, run npm install and then npm run build. The built examples are output into the output/dist directory at the of the product.

Licensing Information

© 2018 JS Foundation. New BSD license.

Link |

examples's People

Contributors

agubler avatar bitpshr avatar dependabot[bot] avatar dylans avatar edhager avatar itorrey avatar jameslmilner avatar jdonaghue avatar kanefreeman avatar kitsonk avatar lzhoucs avatar maier49 avatar matt-gadd avatar mwistrand avatar novemberborn avatar rishson avatar rorticus avatar sebilasse avatar smhigley avatar tomdye avatar umaar avatar vansimke 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

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

examples's Issues

Purchase a book

Given
  standard user
  successful login
When
  I select a book
  And I select 'Buy' on the book details page
Then
  The book should be added to my shopping basket.

Search for cards

Given
  standard user
  successful login
When
  the user enters search criteria
  And the user performs a search
Then
  [output] the user should be presented with a list of cards that match the search criteria
  [post condition] clearing the search criteria should remove any filtering of the result set of cards.

Monster Cards Pinned Versions

The versions of Maquette and Immutable are pinned for Monster Cards:

{
  "dependencies": {
    "immutable": "3.8.1",
    "maquette": "2.3.2"
  }
}

They should be more properly semvered. Currently this is causing the following warning on npm install:

npm WARN [email protected] requires a peer of maquette@^2.3.5 but none was installed.

Page layouts

Non-functional requirement

  • The home page should be the first page displayed after the user has logged in.
  • The home page should consist of a header, main section and footer.
  • The header should not scroll out of view when the page is scrolled, but the main section and footer should scroll if they extend below the fold.
  • If the height of the main section is less than the viewport height, then the footer should align to the bottom of the page (sticky footer).

Initial display of cards

Given 
  standard user
  successful login
When
  the user is shown the home page after login
Then
  [output] the user should be presented with a list of cards that are available in the game
  And The list of cards should be divided into monsters and heros.

View a monster card's details

Given
  standard user
  successful login
When
  the user selects a card from the cards page (monsters or momentum pages)
Then
  output: 
  • The user should see the details for the selected card on a page devoted entirely to the selected card.
  • The details should include the card's title, description, large format image of the character, and the details of what the card does.
  • 'Last seen with' section should be displayed with medium sized card images.
  • Links to twitter and facebook should be displayed
  post condition: you should be able to get back to the home page from the card detail page.
   If the user was on a certain 'page' of results on the home page, then going back to the home page should take the user back to the last viewed 'page' of results.

Implement 'deploy' task for example apps

Implement a basic dojo deploy cli task for the example apps, when supported in cli.
In the meantime, implement sitepen specific deploy task to put on demo servers.

todo-mvc comments

Outside of the MemoryStore which was ported from another repo, the rest of the source code has exactly 2 comments, both of which are /* I suspect this needs to go somewhere else */ and don't follow the convention of /* TODO: ... */.

While things are named logically and TypeScript is somewhat self documenting, the total lack of comments for an example application is not a good idea as those looking to "judge" how our architecture would not be impressed.

Remove MIDs from declarative markup in todoMVC

Until there is a resolution on how to build an application that presumes to load modules using AMD style MIDS we are going to remove the usage of this functionality from our example applications.

Non-functionals

Build the app:

  • any perf work (concat, minification..)
  • generate sourcemaps
  • build layer file

Assess suitability of TodoMVC functional tests

Related to #16

We should figure out if reusing the TodoMVC tests makes sense for us maintaining TodoMVC. It is a totally separate toolchain to what we already have integrated into the repo. While they are canonical tests, they may are may not be the sorts of tests we need to utilise TodoMVC as a proving ground to detect regressions in our other packages.

So the suitability of the tests and the ease of integrating and using them should be considered.

Todo MVC Improvements

This is the Epic for different user stories related to the Todo MVC example for Dojo 2.

Filter cards

Given
When
the user enters filter criteria
Then
[output] the user should be presented with a list of cards that match the filter criteria
[post condition] clearing the filter criteria should remove any filtering of the result set of cards.

todoMVC: new to-dos not added after completed are cleared.

Steps to reproduce (tested in FF latest and Chrome latest):

  1. Add any number of to-dos.
  2. Mark all to-dos as completed.
  3. Click "Clear completed".
  4. Add more to-dos.

Expected result:
The new to-dos should be rendered as part of the to-do list.

Actual result:
The new to-dos are not rendered, even though the footer text (e.g., "1 item left") is updated.

Build it

We should be able to production-ify our Todo-MVC application

Initial page layout

Work to go through any bootstrap process and render basic home page with header/main/footer placeholder divs.

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.