GithubHelp home page GithubHelp logo

lastcallmedia / mannequin Goto Github PK

View Code? Open in Web Editor NEW
37.0 7.0 8.0 1.98 MB

Mannequin Component Theming Tool

Home Page: https://mannequin.io/

License: MIT License

PHP 67.15% HTML 1.57% CSS 7.83% JavaScript 15.07% SCSS 7.45% Twig 0.93%
component twig

mannequin's Introduction

Mannequin

Welcome to the main repository for Mannequin, a component theming tool for the web. This repository is primarily used for development on Mannequin itself - see the "Quick Start" section below if you are here to install Mannequin.

Quick Start

# Pick one or more of the "flavors" below:
composer require lastcall/mannequin-html
composer require lastcall/mannequin-twig
composer require lastcall/mannequin-drupal

# Create your .mannequin.php file for
# HTML - https://mannequin.io/extensions/html/#usage
# Twig - https://mannequin.io/extensions/twig/#usage
# Drupal - https://mannequin.io/extensions/drupal/#usage

vendor/bin/mannequin start

mannequin's People

Contributors

a-username avatar csj1012 avatar danstafford avatar discipolo avatar jlandfried avatar mrosati84 avatar mrossi113 avatar pjoulot avatar rbayliss avatar romario-agc avatar slipo 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mannequin's Issues

Collapsing Drawer Bug

If you open the navigation drawer, then decide to click a quick link on the homepage while the drawer is still open, the drawer doesn't collapse.

npm-run-all dependency

did i miss something in the installation, but looks like there s a npm-run-all dependency ?

$ yarn start
yarn start v1.0.1
$ npm-run-all -p watch-css start-js
/bin/sh: npm-run-all: command not found
error Command failed with exit code 127.

quick fix

yarn add npm-run-all --dev

Info Site General

This issue exists to for posting non-issue specific comments, and for logging time for general meetings, calls, etc.

Allow configurable branding to be used

As a developer, I want to be able to specify a name for my project and a small logo to be displayed on the splash page for the UI. I want to be able to configure this in .mannequin.php.

Rename CLI commands for better comprehensibility

The commands should be:
start: Starts the development server
snapshot: Renders the HTML and saves it to directory.

So the task is to rename ServerCommand -> StartCommand and RenderCommand -> SnapshotCommand, then update any documentation pointing to these commands.

Variant switcher missing from UI

The variant switcher seems to have disappeared from the UI. This is a select box that should show the current variants that are available and let you hop between them. It should be appearing in the PatternTopBar (white space, just to the right of the word "Callout" in this screenshot).

screen shot 2017-09-07 at 5 21 45 pm

Output message if config has no extensions

When running a mannequin command on a config that doesn’t use any extensions, we should print a warning message to alert the user. A config without extensions isn’t really usable.

Start error when no config file exists is not helpful

This error is not helpful:

www-data@470e8fdde572:/var/www# vendor/bin/mannequin snapshot

Fatal error: Uncaught RuntimeException: Expected config in , but the file does not exist. in /var/www/vendor/lastcall/mannequin-core/Mannequin.php:100
Stack trace:
#0 /var/www/vendor/pimple/pimple/src/Pimple/Container.php(118): LastCall\Mannequin\Core\Mannequin->LastCall\Mannequin\Core\{closure}(Object(LastCall\Mannequin\Core\Mannequin))
#1 /var/www/vendor/lastcall/mannequin-core/Mannequin.php(289): Pimple\Container->offsetGet('config')
#2 /var/www/vendor/lastcall/mannequin-core/Mannequin.php(224): LastCall\Mannequin\Core\Mannequin->getExtensions()
#3 /var/www/vendor/lastcall/mannequin-core/bin/mannequin(54): LastCall\Mannequin\Core\Mannequin->boot()
#4 {main}
  thrown in /var/www/vendor/lastcall/mannequin-core/Mannequin.php on line 100

Use "description", "group" instead of "_description", "_group" in metadata

This will affect the YamlParser. Currently, any key prefixed with "_" is parsed into component metadata. We want to keep this, but we also want unknown, unprefixed keys like "description" and "group" to be parsed into metadata. This will let us write YAML without needing an underscore for description and group. Docs also need to be updated.

Add icons to buttons.

We need to find these three icons for buttons on the homepage. Screenshot of what they need to look like below. We are going to use an icon font to get them. http://fontello.com/
For now let's just download the config file for them. That way if we need to add more icons it will be super easy.

screen shot 2017-09-21 at 6 56 56 pm

screen shot 2017-09-21 at 6 56 43 pm

Button dimensions are off.

We're using "shift+cmd+4" instead of the values on invision inspect. Apologies.

Design corrections

Height: it's 64px on live (according to shift+cmd+4) while on the invision it's 50px.
Width: it's 300px on live (according to shift+cmd+4) while on the invision it's 234px.

Drupal/Composer workflow

Is there a way to use Mannequin with a composer workflow that has Drupal root inside a subfolder of the project root? If I put the .mannequin.php file in the project root I get:

PHP Fatal error:  Uncaught InvalidArgumentException: Directory /Users/josh/Sites/SITE_NAME does not look like a Drupal installation in /Users/josh/Sites/sod/vendor/lastcall/mannequin-drupal/Driver/DrupalTwigDriver.php:43

If I put it in Drupal root I get a bunch of:

[error] Twig error in : Unable to find template "" (looked into: .).

as well as

[critical] RuntimeException: Duplicate component detected: d41d8cd98f00b204e9800998ecf8427e (uncaught exception) at /Users/josh/Sites/sod/vendor/lastcall/mannequin-core/Component/ComponentCollection.php line 50

but only when I refresh the page the first time.

Demo is broken

Hello guys,
I noticed some errors trying the demo you provided in the demo directory.
There is a missing semicolor i fixed in #65, but still, after this fix the demo does not work, the command ./vendor/bin/mannequin gives these errors:

PHP Fatal error:  Uncaught Error: Cannot call constructor in /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-twig/TwigExtension.php:68
Stack trace:
#0 /Users/mrosati/Downloads/Mannequin-master/demo/.mannequin.php(31): LastCall\Mannequin\Twig\TwigExtension->__construct(Array)
#1 /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-core/Mannequin.php(108): require('/Users/mrosati/...')
#2 /Users/mrosati/Downloads/Mannequin-master/demo/vendor/pimple/pimple/src/Pimple/Container.php(118): LastCall\Mannequin\Core\Mannequin->LastCall\Mannequin\Core\{closure}(Object(LastCall\Mannequin\Core\Mannequin))
#3 /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-core/Mannequin.php(300): Pimple\Container->offsetGet('config')
#4 /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-core/Mannequin.php(235): LastCall\Mannequin\Core\Mannequin->getExtensions()
#5 /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-core/bin/mannequin(47): LastC in /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-twig/TwigExtension.php on line 68

Fatal error: Uncaught Error: Cannot call constructor in /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-twig/TwigExtension.php on line 68

Error: Cannot call constructor in /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-twig/TwigExtension.php on line 68

Call Stack:
    0.0016     364120   1. {main}() /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-core/bin/mannequin:0
    0.0153    1702368   2. LastCall\Mannequin\Core\Mannequin->boot() /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-core/bin/mannequin:47
    0.0169    1796040   3. LastCall\Mannequin\Core\Mannequin->getExtensions() /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-core/Mannequin.php:235
    0.0169    1796040   4. LastCall\Mannequin\Core\Mannequin->offsetGet(???) /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-core/Mannequin.php:300
    0.0169    1796040   5. LastCall\Mannequin\Core\Mannequin->LastCall\Mannequin\Core\{closure}(???) /Users/mrosati/Downloads/Mannequin-master/demo/vendor/pimple/pimple/src/Pimple/Container.php:118
    0.0170    1804352   6. require('/Users/mrosati/Downloads/Mannequin-master/demo/.mannequin.php') /Users/mrosati/Downloads/Mannequin-master/demo/vendor/lastcall/mannequin-core/Mannequin.php:108
    0.0182    1912640   7. LastCall\Mannequin\Twig\TwigExtension->__construct(???) /Users/mrosati/Downloads/Mannequin-master/demo/.mannequin.php:31

Guarded Twig metadata in blocks cannot be used in a child template

Twig metadata that is kept in blocks, eg:

{% if _component %}{% block componentinfo %}
name: Foo
...
{%endblock %}{% endif %}
The rest of the template.

This metadata will cause parse errors if the template inherits from another template (Node "1" does not exist for Node "Twig_Node"). Because of this, I don't think we are going to be able to use inline blocks to contain that Twig metadata. Instead, we could parse the metadata out of a special comment, eg:

{# @Component
name: Foo
...
#}
The rest of the template.

I actually like this solution better anyway, since it will be completely ignored when the template is rendered outside of Mannequin.

This is a high priority fix because it affects our primary use case (Drupal), and will be a fairly common occurrence. I'm not sure how we got through the initial release without finding this.

Quick Links Buttons

Last row of quick links should be attached to bottom of screen past browser height 768px.

Anything less than 768px should make the quick links scrollable.

Subtree Split/Publish Packages/CI setup

Before we go live, we need to figure out how to do a subtree split of this repository into the following components:

  • lastcallmedia/mannequin (PHP /core dir published on Packagist)
  • lastcallmedia/mannequin-twig (PHP /twig dir published on Packagist)
  • lastcallmedia/mannequin-html (PHP /html dir published on Packagist)
  • mannequin-ui (JS published on npm registry)

The CI build needs to manage the following things:

  • Run tests
  • A push to this repository should trigger a push to the others
  • A tag push to this repository should trigger a tag push to the others
  • Tags should trigger a publish to Packagist/NPM

Write Documentation for Twig Package

README.md in Twig package should include:

  • How to install the package
  • How to use it in the mannequin config file.
  • Various configuration options

Installation help

I’m probably doing something wrong in installation, any help appreciated.
Steps to reproduce:

  1. I setup a fresh local Drupal 8.4.0 using composer, with folder structure:
    my_manaquin
    —vendor
    —web
    …etc.

  2. I ran composer require lastcall/mannequin-drupal from within my_mannequin

  3. I created a .mannequin.php file per this: https://mannequin.io/extensions/drupal/#usage and changed ->in(__DIR__.'/themes/mytheme') to ->in(__DIR__.'/themes/custom/myclassy’)

  4. I ran vendor/bin/mannequin start (from within my_manaquin) - it did not return anything.

I am stuck at this point: “From the /ui directory, run: yarn start.” I cannot find a /ui directory. I searched my project and found only this: /my_mannequin/vendor/lastcall/mannequin-core/Ui

Is that the correct /ui ?
Thanks,
Rick

PHP 7.1.1
Composer version 1.5.1

Add cache clear command

As a developer, I want to be able to clear Mannequin's various caches using a console command.

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.