Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

122-part-2-use-yaml-for-pattern-pages #143

Open
wants to merge 72 commits into
base: master
Choose a base branch
from

Conversation

misscs
Copy link
Contributor

@misscs misscs commented May 22, 2016

Closes #122

  • Move completed pattern page data objects to yaml
  • Clean-up and simplify data structure
  • Changes to macros based on data structure changes
    • Simplify how data is passed and handled
    • Add checks so patterns look good if data is incomplete

Todo

Test

  1. rm -rf dist folder to start from clean slate
  2. Run gulp
  3. Navigate to popovers, tooltips, buttons, banners. Content should match what's live on nightshade.rocks.

misscs and others added 30 commits May 1, 2016 16:49
File for public paths and settings
Push dist folder to aws reading from ENV vars
temporarily sets favicon to casper C
Add favicon and gulp tasks for image processing
Update breadcrumbs demo to match new styles
Also make a new npm shrinkwrap
@stewartyu
Copy link
Contributor

^ I had the same issue that @josephco mentioned. I think it was complaining that data/content_api.json was missing.

<span class="popover-container js-popover-container">
<span class="popover-toggle js-popover-toggle">?</span>
<span class="popover js-popover is-invisible" data-position="right" aria-expanded="false">Density refers to the amount of material per cubic foot. High-density materials are more durable.</span>
</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A general thought - is there a way to pull the macro in, instead of duplicating the HTML here? We'll get out of sync quickly if the macro changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stewartyu Yes! We really like to have everything auto-generated. Looking at our yaml files, I feel like the macro and html ideally should render by just specifying a path to a template.

Tackling that was outside the scope of this PR where I just wanted to move content over to YAML. Moving content over to yaml also helped to expose some other improvements/ways we can simplify generation of pages.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I'm cool with putting that as a todo for later.

josephco and others added 3 commits May 24, 2016 14:16
It's now a dependency of nightshade-core
* Set page title and description with data obj if available

- Add indentation for readbility

* Remove page title from nightshade_layout

- Inherits from parent template

* Integrate data object. Allows tpls to run of yaml

* Add yaml content files for all the patterns

- The content in the files is temporary and will be expanded in
subsequent PRs

* Ignore content_api.json

* Add tasks to use yaml as content data storage

- Add gulp data task to convert yaml to json
- Ammend gulp compile task to use json file as data for templates

* Run gulp data as part of default task

- For better diffs, write each item in array on new line

* Recompile and reload browser when yaml content changes

- Add cb to tasks to ensure dependencies execute correctly

* Remove page title from pattern_layout

* Update key names to avoid regression

- Will move data object into yaml file in subsequent PR

* [Fixup] Use correct key for backgrounds page data

* Update key for homepage content for more clarity

* Regenerate shrinkwrap with depedencies only
@misscs misscs force-pushed the 122-use-yaml-for-pattern-pages branch 2 times, most recently from 68eefb4 to 672f6ed Compare May 24, 2016 20:07
@misscs
Copy link
Contributor Author

misscs commented May 24, 2016

@stewartyu / @josephco I am not able to reproduce the error. I rebased this PR and addressed an error I was getting on Popovers/Tooltip pages. Can I get one more sanity check? Want to make sure I'm not missing the issue you both reported. Thanks!

@josephco
Copy link
Contributor

josephco commented May 24, 2016

@misscs No longer getting errors on running Gulp

Not sure if this is known/expected, but the Code Example section with Macro and HTML toggles (and params below) is missing on the pattern page

JS import paths may need cleaning to remove /src/ such as the Gallery page

@misscs misscs force-pushed the 122-use-yaml-for-pattern-pages branch from ac23498 to f798407 Compare May 26, 2016 03:10
- Change from data object to yaml
- Remove some of the extra objects and arrays
- Tmp move tech notes into a markdown file

Moving content into yaml was a great exercise that left me wondering how
we can simplify pattern creation and move to a very living/automated design
system that reads from files (following name guideliens) and file comment blocks.

Started some ideas/questions here to discuss with folks on Monday: https://www.evernote.com/l/ACQbqm00njxNwYJFo-3uQ8gm2_B1iVdivzA
Need to map this file so that Toggler works.
@misscs misscs force-pushed the 122-use-yaml-for-pattern-pages branch from f798407 to c606ce9 Compare May 26, 2016 03:25
- Gallery
- Backgrounds
transpiler: "plugin-babel",
map: {
"feature.js": "github:viljamis/[email protected]"
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kind of liked the import feature from 'viljamis/feature.js path; it gives me some context around where the package is coming from.

@josephco
Copy link
Contributor

@misscs Some remaining items:

  • Get the Code Example section (that has Macro/HTML toggle) showing, and move Usability Paramaters directly below (instead of below all imports)
  • Fix Icons page, as icons are not being loaded/shown
  • Popover example shouldn't be exposed by default, and extra character next to toggle should be removed
  • Content Panel and Links pages are missing heading/descriptions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants