Skip to content

Commit

Permalink
Merge branch 'master' into feature/update-picture-demo
Browse files Browse the repository at this point in the history
* master:
  Fix `npm run new` (#909)
  feature: revise layout and add bottom spacer option (#903)
  issue-906: phpcs validation. (#907)
  bug: update particle namespace and update details class (#900)
  Remove reference to composer.json in editorconfig (#881)
  Update dependency yeoman-generator to ^4.11.0 (#866)
  July 02, 2020 npm dependencies (#882)
  task: update js config for forms (#880)
  Feature :: Add Tailwind Custom Forms Plugin + Drupal Templates (#859)
  PHP deprecated warning: Swapping parameters order in implode() function. (#858)
  NPM update to fix eslint regression (#865)
  Update dependency eslint to ^7.3.0 (#855)
  Update dependency terser-webpack-plugin to ^3.0.6 (#853)
  Update dependency webpack-cli to ^3.3.12 (#852)
  Update dependency stylelint to ^13.6.1 (#850)
  Update dependency eslint-import-resolver-webpack to ^0.12.2 (#846)
  Update Font Awesome (#854)
  NPM updates (#843)
  Prettier now runs against twig, update files with new linting (#839)

# Conflicts:
#	apps/pl-default/pattern-lab/_patterns/01-atoms-demo/image/images.twig
#	source/default/_patterns/01-atoms/image/_image--bg.twig
#	source/default/_patterns/01-atoms/image/_image--picture.twig
#	source/default/_patterns/01-atoms/image/_image.twig
madhaze committed Jul 24, 2020
2 parents 277299d + bd5a73b commit 4710a82
Showing 150 changed files with 5,850 additions and 4,834 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -7,6 +7,3 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[composer.{json,lock}]
indent_size = 4
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -5,11 +5,11 @@ Closes Issue #X
<!--
These markdown comments are for description only. They can be deleted.
Please submit pull requests against the develop branch.
Please submit pull requests against the master branch.
Follow the existing code style. Check the tests succeed, including lint.
npm run test
npm run lint
npm run fmt
-->

## Issue Description
18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Compiled files
dist/
dependencyGraph.json
patterns.zip
# Dependencies
node_modules
vendor

# OS generated files
*.swp
@@ -10,17 +9,18 @@ patterns.zip
._.DS_Store
._.DS_Store?

# Dependencies
node_modules
vendor

# Generated files
.eslintcache
*unison.*

#IDE plugins
# IDE plugins
.idea

# Errors
npm-debug.log
php_errors.log

# Particle
dist/
dependencyGraph.json
patterns.zip
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10
12
18 changes: 12 additions & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Ignore any path/file using .gitignore syntax, ie:
# Ignore any path/file using .gitignore syntax

node_modules/
vendor/
# Dependencies
node_modules
vendor

# Particle
dist/
pattern-lab/
dependencyGraph.json
tools/new-component/templates/

package.json
package-lock.json
*.inc
# Ignore head|foot.twig due to closing </body> and </html> tags with no openers
_00-head.twig
_01-foot.twig
# Ignore _button.twig while prettier-twig fails to recognize dynamic elements
_button.twig
6 changes: 5 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
module.exports = {
plugins: ['./node_modules/prettier-plugin-twig-melody'],
proseWrap: 'always',
singleQuote: true,
trailingComma: 'es5',
twigAlwaysBreakObjects: true,
twigOutputEndblockName: true,
twigPrintWidth: 120,
};
4 changes: 3 additions & 1 deletion apps/drupal-default/particle_helper/particle_helper.info.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: 'Particle Helper'
type: module
description: 'Particle Components and Particle Tools. Theme utilities to integrate Drupal with Particle themes.'
description:
'Particle Components and Particle Tools. Theme utilities to integrate Drupal
with Particle themes.'
core: 8.x
package: 'Particle'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
particle_helper.twig_extension:
arguments: ["@renderer"]
arguments: ['@renderer']
class: Drupal\particle_helper\TwigExtension\ParticleHelperTwig
tags:
- { name: twig.extension }
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php

namespace Drupal\particle_helper\Plugin\Layout;

/**
* @file
* Contains \Drupal\particle_helper\Plugin\Layout\ParticleLayout.
*/

use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Layout\LayoutDefault;
use Drupal\Core\Plugin\PluginFormInterface;
use Drupal\particle\Particle;

/**
* Provides a layout options for Layout Builder.
*/
class ParticleLayout extends LayoutDefault implements PluginFormInterface {

/**
* {@inheritdoc}
*/
public function defaultConfiguration() {
return parent::defaultConfiguration() + [
'spacer_bottom' => '',
];
}

/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = parent::buildConfigurationForm($form, $form_state);
$configuration = $this->getConfiguration();

$spacings = Particle::SPACING;
$spacer_bottom_options = [];
foreach ($spacings as $key => $value) {
$spacer_bottom_options['mb-' . $key] = $value;
}
$spacer_bottom_options = array_merge(['_none' => $this->t('-None-')], $spacer_bottom_options);

$form['spacer_bottom'] = [
'#type' => 'select',
'#options' => $spacer_bottom_options,
'#title' => $this->t('Additional Bottom Spacing'),
'#description' => $this->t('Select a value for additional bottom spacing. These are based on design spacers.'),
'#default_value' => $configuration['spacer_bottom'],
];

return $form;
}

/**
* {@inheritdoc}
*/
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
parent::submitConfigurationForm($form, $form_state);
$this->configuration['spacer_bottom'] = ($form_state->getValue('spacer_bottom') != '_none') ? $form_state->getValue('spacer_bottom') : '';
}

}
Original file line number Diff line number Diff line change
@@ -16,4 +16,4 @@ settings:
label: Breadcrumbs
provider: system
label_display: '0'
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -16,4 +16,4 @@ settings:
label: 'Main page content'
provider: system
label_display: '0'
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -20,4 +20,4 @@ settings:
label_display: '0'
level: 1
depth: 0
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -16,4 +16,4 @@ settings:
label: Help
provider: help
label_display: '0'
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -14,4 +14,4 @@ settings:
label: 'Primary admin actions'
provider: core
label_display: '0'
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -16,4 +16,4 @@ settings:
label_display: '0'
primary: true
secondary: true
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -20,4 +20,4 @@ settings:
label_display: '0'
level: 1
depth: 2
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -16,4 +16,4 @@ settings:
label: 'Status messages'
provider: system
label_display: '0'
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -14,4 +14,4 @@ settings:
label: 'Page title'
provider: core
label_display: '0'
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -16,4 +16,4 @@ settings:
label: 'Powered by Drupal'
provider: system
label_display: '0'
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -16,4 +16,4 @@ settings:
label: 'Search form'
provider: search
label_display: '0'
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -19,4 +19,4 @@ settings:
use_site_logo: true
use_site_name: true
use_site_slogan: true
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -20,4 +20,4 @@ settings:
label_display: '0'
level: 1
depth: 2
visibility: { }
visibility: {}
Original file line number Diff line number Diff line change
@@ -20,4 +20,4 @@ settings:
provider: views
label_display: '0'
views_label: visible
visibility: { }
visibility: {}
6 changes: 3 additions & 3 deletions apps/drupal-default/particle_theme/includes/admin.theme.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

/**
* @file
* Functions to support theming admin in the Particle theme.
*/
* @file
* Functions to support theming admin in the Particle theme.
*/
10 changes: 1 addition & 9 deletions apps/drupal-default/particle_theme/includes/misc.theme.inc
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
* Functions to support theming miscellaneous things the Particle theme.
*/

use Drupal\theme\custom\Particle\Particle;
use Drupal\particle\Particle;

/**
* Implements hook_preprocess().
@@ -34,11 +34,3 @@ function particle_page_attachments_alter(array &$page) {
];
$page['#attached']['html_head'][] = [$ie_edge, 'ie_edge'];
}

/**
* Implements hook_preprocess_details().
*/
function particle_preprocess_details(array &$variables) {
$variables['attributes']['class'][] = 'details';
$variables['summary_attributes']['class'] = 'summary';
}
Original file line number Diff line number Diff line change
@@ -55,7 +55,6 @@ function particle_theme_suggestions_image_alter(array &$suggestions, array $vari
* Implements hook_theme_suggestions_HOOK_alter().
*
* @TODO evaluate for Search.
*
*/
function particle_theme_suggestions_form_alter(array &$suggestions, array $variables) {
$id = $variables['element']['#id'];
Loading

0 comments on commit 4710a82

Please sign in to comment.