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

Bolt v2.6.0-beta.2 #1335

Merged
merged 26 commits into from Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8ae41fe
docs: Document guidelines for npm `patch-package` usage
remydenton Jul 30, 2019
ce9a25d
feat: deprecate `isBackgroundVideo`, remove from demos, add todos whe…
Aug 5, 2019
f2b7eef
chore: add comments for deprecated `isBackgroundVideo` prop in CSS an…
Aug 8, 2019
24b5cb2
fix: make sure lerna bootstrap runs for local dev installs + devDeps …
bolt-bot Aug 9, 2019
dc83aaf
revert: hook into postbootstrap for building new pkg
bolt-bot Aug 9, 2019
ab073c2
fix: update build tools Jest snapshot
sghoweri Aug 10, 2019
3fe3e98
fix: update root NPM scripts to automatically pre-build the new `@bol…
sghoweri Aug 10, 2019
d2dfe0c
fix: add missing `yeoman-doctor` dependency
sghoweri Aug 10, 2019
7c48959
chore: update yarn.lock
sghoweri Aug 10, 2019
eb68074
chore: update JS-converted SVG icons based on upstream SVGO / compres…
sghoweri Aug 10, 2019
5b9c569
fix: update icon snapshot to reflect minor SVG compression changes
sghoweri Aug 10, 2019
c567f08
Merge pull request #1333 from bolt-design-system/fix/post-2.6.0-beta.…
sghoweri Aug 10, 2019
fa827eb
Merge branch 'master' into feature/deprecate-is-background-video-prop
sghoweri Aug 12, 2019
f34d22e
Merge pull request #1326 from bolt-design-system/feature/deprecate-is…
danielamorse Aug 12, 2019
919330a
Merge branch 'master' of https://github.com/bolt-design-system/bolt i…
Aug 16, 2019
1fc59df
Merge pull request #1301 from bolt-design-system/feature/BDS-1695-doc…
danielamorse Aug 16, 2019
7158bda
docs: add comment about autoplay on iOS
Aug 22, 2019
407360e
test: test Drupal Lab build after configuring Sass Loader default output
bolt-bot Aug 27, 2019
72afb1b
test: re-run build tool tests
bolt-bot Aug 27, 2019
1b73dab
hotfix: update webpack Sass loader config to always output nested CSS…
sghoweri Aug 27, 2019
230e96d
hotfix: update CLI to force i18n to be enabled by default for prod bu…
sghoweri Aug 27, 2019
13b8015
Merge pull request #1347 from bolt-design-system/feat/comment-on-vide…
danielamorse Aug 27, 2019
8ea933f
Merge branch 'release/2.x'
sghoweri Aug 27, 2019
49a12de
chore: revert build tool version change in Drupal Lab
sghoweri Aug 27, 2019
bdcc8f3
Merge branch 'master' into fix/sass-build-issues
sghoweri Aug 27, 2019
4b0db7d
Merge pull request #1362 from bolt-design-system/fix/sass-build-issues
sghoweri Aug 27, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs-site/src/pages/docs/45-development/25-patching=npm-package.md
@@ -0,0 +1,32 @@
---
title: Patching NPM Packages
---

## How it works
Use the [patch-package](https://www.npmjs.com/package/patch-package) npm package to apply small changes to npm package
on the Bolt consumer end (e.g. in a Drupal theme) without the need for a Bolt release.

## When Patching is helpful
IMPORTANT: Packages should only be patched with changes we intend to add to the Bolt code base. Ideally, this means
there's an open (or better yet, merged) PR on the Bolt side with the exact changes in your patch. The intention to get
the problem fixed in Bolt (even if the final upstream code is slightly different) is 100% necessary though. Changes not
intended to be merged upstream create a maintenance nightmare and should be handled in custom, non-Bolt code instead.

Patches can be useful for:
1. Testing. Sometimes, a problem can't be fully replicated in Bolt and therefore needs to be pulled into Drupal to
confirm the proposed fix works. Patching allows us to prevent a "guess and check" cycle of multiple hotfix releases.
2. Urgency. For example:
- The fix is blocking additional integration work (e.g. someone needs to do more work on modals after we pull in a
patch to the modal component). In this case, the patch allows them to keep working (and validate the proposed
solution) without waiting for a Bolt release.
- There's an imminent Drupal release and we have only one or two blockers. In this case, the patch can be tested
by QA and even deployed to production without needing an 11th hour Bolt release and full regression testing.
3. Ease of development. A bug discovered in Drupal might be easiest to fix and test directly in the Drupal codebase.
This would be most relevant if you were a Drupal developer and already had the Drupal bug reproduced locally. The
patch could then be duplicated as a Bolt PR, or at least used to guide the Bolt development team to the problem.

## When to avoid patches
- By default. Unless one of the "When to patch" scenarios applies, lean toward not patching.
- Complicated patches. If a fix involves more than one component, many lines of code, and/or binary files, lean toward
not patching.
- Changes are not intended to be merged upstream.
Expand Up @@ -31,8 +31,9 @@
} only %}
</div>

{# @todo: `isBackgroundVideo` will be removed with Bolt v3.0. Hide this demo page for now and remove it entirely with v3.0. #}
{# Background Video #}
{% set content_video %}
{# {% set content_video %}
{% include "@bolt-components-headline/headline.twig" with {
size: "xxxlarge",
text: "This Band Has a Backround Video",
Expand Down Expand Up @@ -71,4 +72,4 @@
]
},
content: content_video
} only %}
} only %} #}
@@ -1,3 +1,5 @@
{# @todo: `isBackgroundVideo` will be removed with Bolt v3.0. Hide this demo page for now and remove it entirely with v3.0. #}

{% embed "@bolt-components-band/band.twig" with {
theme: "dark",
size: "medium",
Expand Down
@@ -1,6 +1,5 @@
<p>
This video has <code>autoplay</code> set to <code>true</code>, <code>loop</code> set to <code>true</code>, and <code>controls</code> set to <code>false</code>. When a video is autoplaying without any controls, it is muted by default. This is purely intended for decorations and not practical. Autoplaying video with sound is against best practices.
</p>
<p>This video has <code>autoplay</code> set to <code>true</code>, <code>loop</code> set to <code>true</code>, and <code>controls</code> set to <code>false</code>. When a video is autoplaying without any controls, it is muted by default. This is purely intended for decorations and not practical. Autoplaying video with sound is against best practices.</p>
<p><mark>Note: videos are not expected to autoplay on iOS.</mark></p>

{% include "@bolt/video.twig" with {
"videoId": "5780495299001",
Expand Down
@@ -1,6 +1,6 @@
<p>
This video has <code>autoplay</code> set to <code>true</code> and <code>loop</code> set to <code>true</code>.
</p>
<p>This video has <code>autoplay</code> set to <code>true</code> and <code>loop</code> set to <code>true</code>.</p>
<p><mark>Note: videos are not expected to autoplay on iOS.</mark></p>


{% include "@bolt/video.twig" with {
"videoId": "5780495299001",
Expand Down
@@ -1,6 +1,6 @@
<p>
This video has <code>autoplay</code> set to <code>true</code>.
</p>
<p>This video has <code>autoplay</code> set to <code>true</code>.</p>
<p><mark>Note: videos are not expected to autoplay on iOS.</mark></p>


{% include "@bolt/video.twig" with {
"videoId": "5780495299001",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -58,10 +58,10 @@
"release:beta": "./scripts/release/release-beta.sh",
"release:rc": "./scripts/release/release-rc.sh",
"serve": "node packages/servers/default-server",
"setup": "npx lerna bootstrap && yarn run setup:php",
"setup": "yarn && yarn run setup:php",
"setup:full": "yarn --force && yarn run setup:php",
"setup:php": "npx lerna exec --parallel --scope @bolt/twig-renderer --scope @bolt/drupal-twig-extensions --scope @bolt/core-php --scope @bolt/website -- composer install --prefer-dist --quiet",
"setup:quick": "yarn install --production && yarn run setup:php",
"setup:quick": "yarn && yarn run setup:php",
"start": "cd docs-site && yarn run start",
"test": "npm-run-all --parallel --aggregate-output test:js test:php test:monorepo test:build-tools",
"test:e2e:full": "./node_modules/.bin/nightwatch --config packages/testing/testing-nightwatch/nightwatch.js --env chrome,firefox,ie11",
Expand All @@ -81,7 +81,7 @@
"test:php": "cd packages/core-php -- composer run test",
"test:pkgs": "lerna run test",
"test:types": "tsc",
"postinstall": "patch-package"
"postinstall": "patch-package && npx lerna run postbootstrap"
},
"husky": {
"hooks": {
Expand Down
Expand Up @@ -13583,6 +13583,26 @@ bolt-icon[size=\\"xlarge\\"] {
fill: currentColor;
fill: var(--bolt-theme-text, currentColor);
}
bolt-figure {
display: block;
}
bolt-figure:not(:last-child) {
margin-bottom: 1.155rem;
}
.c-bolt-figure {
margin: 0;
padding: 0;
display: block;
}
.c-bolt-figure__media {
display: block;
}
.c-bolt-figure__caption {
padding-top: 0.412rem;
font-size: 0.8rem;
line-height: 1.595;
display: block;
}
bolt-link {
outline: 0;
}
Expand Down Expand Up @@ -13654,26 +13674,6 @@ bolt-link {
.c-bolt-link--headline:hover {
text-decoration: underline;
}
bolt-figure {
display: block;
}
bolt-figure:not(:last-child) {
margin-bottom: 1.155rem;
}
.c-bolt-figure {
margin: 0;
padding: 0;
display: block;
}
.c-bolt-figure__media {
display: block;
}
.c-bolt-figure__caption {
padding-top: 0.412rem;
font-size: 0.8rem;
line-height: 1.595;
display: block;
}
bolt-ratio {
display: block;
width: 100%;
Expand Down Expand Up @@ -27216,6 +27216,26 @@ bolt-icon[size=\\"xlarge\\"] {
fill: currentColor;
fill: var(--bolt-theme-text, currentColor);
}
bolt-figure {
display: block;
}
bolt-figure:not(:last-child) {
margin-bottom: 1.65rem;
}
.c-bolt-figure {
margin: 0;
padding: 0;
display: block;
}
.c-bolt-figure__media {
display: block;
}
.c-bolt-figure__caption {
padding-top: 0.412rem;
font-size: 0.8rem;
line-height: 1.45;
display: block;
}
bolt-link {
outline: 0;
}
Expand Down Expand Up @@ -27282,26 +27302,6 @@ bolt-link {
.c-bolt-link--headline:hover {
text-decoration: underline;
}
bolt-figure {
display: block;
}
bolt-figure:not(:last-child) {
margin-bottom: 1.65rem;
}
.c-bolt-figure {
margin: 0;
padding: 0;
display: block;
}
.c-bolt-figure__media {
display: block;
}
.c-bolt-figure__caption {
padding-top: 0.412rem;
font-size: 0.8rem;
line-height: 1.45;
display: block;
}
bolt-ratio {
display: block;
width: 100%;
Expand Down
2 changes: 2 additions & 0 deletions packages/components/bolt-band/src/band.js
Expand Up @@ -38,6 +38,7 @@ class BoltBand extends withLitHtml() {
this.classList.add('is-ready');
}

// @todo: `isBackgroundVideo` will be removed with Bolt v3.0
if (this.querySelector('bolt-video[is-background-video]')) {
if (this.expandedHeight === null) {
this.expandedHeight = '56.25vh';
Expand Down Expand Up @@ -88,6 +89,7 @@ class BoltBand extends withLitHtml() {
}

playHandler(event) {
// @todo: `isBackgroundVideo` will be removed with Bolt v3.0
if (event.detail.isBackgroundVideo && this.expanded === false) {
this.expand();

Expand Down
1 change: 1 addition & 0 deletions packages/components/bolt-band/src/band.scss
Expand Up @@ -5,6 +5,7 @@
@import '@bolt/core';

// Custom element styles, some are neccessary for the video background
// @todo: remove any unnecessary styles when `isBackgroundVideo` is removed in Bolt v3.0
bolt-band {
display: flex;
width: 100%;
Expand Down