Page MenuHomeDevCentral

Separate data from layout
ClosedPublic

Authored by dereckson on Jul 24 2016, 13:45.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 18:05
Unknown Object (File)
Wed, Nov 20, 18:04
Unknown Object (File)
Wed, Nov 20, 18:03
Unknown Object (File)
Wed, Nov 20, 16:56
Unknown Object (File)
Wed, Nov 20, 16:10
Unknown Object (File)
Wed, Nov 20, 15:17
Unknown Object (File)
Wed, Nov 13, 09:20
Unknown Object (File)
Tue, Nov 12, 20:20
Subscribers
None

Details

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

Diff Detail

Repository
rVIPERWWW Dæghrefn website
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson retitled this revision from to Separate data from layout.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson added inline comments.
src/pages/index.html
40

{{ root }}

70

To be coherent with other templates calls, consider {{ @key }}

dereckson edited edge metadata.

Adressing previous comments.

{{foo}} → {{ foo }} everywhere.

Spacing more YAML lists.

dereckson updated this object.
dereckson edited edge metadata.
dereckson updated this object.
dereckson edited edge metadata.
dereckson marked 2 inline comments as done.
This revision is now accepted and ready to land.Jul 24 2016, 14:05
This revision was automatically updated to reflect the committed changes.