HomeDevCentral

Separate data from layout

Description

Separate data from layout

Summary:
[ Data ]

The data/ folder contains 4 information sources extracted from
current homepage:

  • communities: communities using Dæghrefn
  • dev_resources: for a developer, where are repos and tasks?
  • doc_links: where is store the Dæghrefn documentation?
  • tasks: Phabricator forms URL, parameters and calls for action

This allows a better separation of concerns, and allows in the
future some API to return these values.

[ Helpers ]

The ucfirst Handlebars helpers capitalizes the first character
of a string.

[ Note about panini ]

Data and helpers folders are given in configuration to panini.

In watch mode, when a page is modified, it's called again, but
it doesn't seem to take in consideration changes in these folders.

You so need to quit npm and relaunch npm start to force update.

This doesn't affect build mode workflow.

[ Note about DevCentral calls ]

To avoid long URLs, a GET form now builds them from data/tasks.yml
using hidden input fields.

[ Style ]

Handlebars variables are called with spaces around them: {{ foo }}.

Operators and partials includes keep {{<token> <variable>}} syntax.

Test Plan:

  • Correct build with npm start
  • Compared former and new output, assert they are the same

Reviewers: dereckson

Differential Revision: https://devcentral.nasqueron.org/D552

Details

Auditors
dereckson
Provenance
derecksonAuthored on Jul 24 2016, 13:31
derecksonPushed on Jul 24 2016, 14:05
Differential Revision
D552: Separate data from layout
Parents
rVIPERWWWaf75c3f24120: Improve punctuation
Branches
Unknown
Tags
Unknown