Code Monkey home page Code Monkey logo

mayflower-patternlab's People

Contributors

ajfwebdev avatar avrilpearl avatar clair0917 avatar clairesunstudio avatar damienmckenna avatar edwardchan avatar evanlovely avatar froboy avatar gbirch avatar gleroux02 avatar hackajesse avatar iansholtys avatar isaacchansky avatar jesconstantine avatar legostud avatar lukewertz avatar mariohernandez avatar mathewpeterson avatar meghandavis avatar mrossi113 avatar nstriedinger avatar patrickfweston avatar powpow12 avatar rbayliss avatar reenybeeny avatar sghoweri avatar smurrayatwork avatar weitzman avatar ygannett avatar yriahi 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

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mayflower-patternlab's Issues

Drupal presence in pattern lab (in project scaffolding + in js/twig)

Hoping to start a conversation about decoupling drupal from the pattern lab style guide. I see two opportunities here:

  1. project scaffolding: this current scaffolding seems to imply that our style guide will ship along with / inside of a drupal theme, which is not something that we want (as our goal is to use the style guide twig/css/js assets across the enterprise in other applications, also, perhaps pattern lab will outlive drupal)
  2. pattern lab edition choice: I believe on our phone call last Thursday (with Velir-Palantir-MassIT) I heard that the drupal standard edition of pattern lab was going to be used. I wanted to suggest that we instead use the twig standard edition. This will ensure that pattern lab knows nothing about drupal (either in its js or twig filters/components). We don't want pattern lab to be making any environment assumptions.

I think the coupling will come in on the drupal theme's end, using its twig templates as a Presenter (as in MVP architecture) routing the drupal data model through to the pattern lab view twig template via embeds/includes/etc.

What do people think?

Also - FYI - here are some initiatives that we've been following in the drupal / components community:

Issue with local build and editing pattern files.

yesterday, I was trying to troubleshoot a pr but was having a problem updating the pattern locally. Here are my steps:

  1. git pull dev
  2. git checkout feature-branch
  3. cd styleguide
  4. gulp
  5. edit source/_patterns/03-organisms/by-template/emergency-alerts.twig
  6. Add random html to test editing the right file, <h2>Hello</h2> - save
  7. Go to http://localhost:3000/?p=organisms-emergency-alerts and confirm Hello is there.

This failed for me several times. At first I was concerned that gulp wasn't listening to file changes but we confirmed that it was. Also, there was a possibility I was editing the wrong file but I grep'd the _patterns directory and there were no results suggesting that. Finally, I got @isaacchansky to test locally, and when he did the above steps, PL worked as expected.

Javascript TypeErrors - Can you wrap generated code

Sets the value of $ locally in the function scope, that way we use $

jQuery(function($) {
......
//# sourceMappingURL=index-generated.js.map
});

So we can get rid of TypeErrors and use your JS directly. There may be a better/different way to do this with your compression/aggregation tools. Please investigate and implement.

screen shot 2017-04-12 at 11 34 23 am

Remove hardcoded paths in Javascript.

Please remove hardcoded paths. Add a JS global "directory" setting variable for paths. In this instance, use it for '/assets/'.

For example:
richText.js - fetch('/assets/images/svg-sprite/external-link.svg'

$.ajax({ url : '/assets/js/templates/' + name + '.html',

This should be in a separate file, maybe called 'settings.js' and not aggregated in.

Something like this

  • create a new file called env.js
  • add var themePath = '/assets';
  • update code like so: fetch(themePath + "/images/svg-sprite/external-link.svg"
  • include separately from index-generated.js and vendor-generated.js

Do not version composer dependencies

Let's make Mayflower more consistent with our other Mass.gov projects by not versioning vendor/. We'll want to check circle, phing, and bash scripts to see if / when we should be running composer install prior to builds.

This will ease developer / reviewer processes by removing diff noise and also make dependency updates more efficient, as mentioned in #519

UTILITY Drawers: These need to be generalized.

This "body" field needs to account for:

  • description text

  • and any links added

  • So if we have just a description, this is styled one way

  • So if we have a description and a few links, this is styled the same but includes the links.

Also with links, currently under "log in to..." shouldn't this account for two links?

screen shot 2017-02-02 at 2 34 05 pm

screen shot 2017-02-03 at 10 28 15 am

I need consistent 'ma__contact-group' divs and contact-group.twig needs to support a textarea for address.

screen shot 2016-11-09 at 1 44 22 pm

Like this (in the aside.sidebar):

<div class="ma__contact-group">.....</div>
<div class="ma__contact-group">.....</div>
<div class="ma__contact-group ma__contact-us__extra js-accordion-content">.....</div>
<div class="ma__contact-group">.....</div>
<div class="ma__contact-group">.....</div>

-- and I need molecules/contact-group.twig to support a textarea address. In this instance we are using a simple textarea for the address.

251 Causeway Street
Suite 900
Boston, MA 02114-2104

I need to be able to specify input name for search.

As you can see here, for search input, I need to be able to specify 'name' : 'q'.

'name': 'q',

      'inputText': {
        'labelText': 'Search',
        'required': false,
        'id': 'GUID138490237',
        'name': 'q',
        'placeholder': 'Search...'
      }

Does that make sense?

{%
set searchBanner = {
  'bgWide': search800x400_image_url,
  'bgNarrow': file_url(content.field_image['#items'].entity.uri.value),
  'imageName': content.field_name|field_value,
  'imageAuthor': content.field_caption|field_value,
  'form': {
    'path': '@molecules/search-banner-form.twig',
    'content': {
      'action': '/search',
      'buttonText': 'Search',
      'inputText': {
        'labelText': 'Search',
        'required': false,
        'id': 'GUID138490237',
        'placeholder': 'Search...'
      }
    }
  },
  'title': content.field_title|field_value ? content.field_title|field_value : title,
  'intro': content.field_description|field_value ? content.field_description|field_value : intro,
  'helpfulLinks': {
    'columns': 'true',
    'compHeading': {
      'title': content.field_link['#title'],
      'sub': 'true',
      'color': 'yellow',
      'centered': 'true'
    },
    'items': items
  }
}
%}
{% include '@organisms/by-author/search-banner.twig' %}

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.