Skip to content

Commit

Permalink
11.1.0
Browse files Browse the repository at this point in the history
11.1.0
  • Loading branch information
joegl authored Jun 26, 2024
2 parents c510fd4 + 55737ce commit 964078a
Show file tree
Hide file tree
Showing 159 changed files with 5,085 additions and 3,218 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ plugins:
# Stylelint requires a config from the .stylelintrc file in the repo in order to tweak settings.
# Without the .stylelintrc file it will run with the defaults.
stylelint:
enabled: true
enabled: false
checks:
property-no-unknown:
enabled: false
Expand Down
42 changes: 41 additions & 1 deletion .github/workflows/sites-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
themePath: docroot/themes/humsci/humsci_basic
jobs:
test_phpunit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -82,8 +84,27 @@ jobs:
vendor/bin/blt blt:telemetry:disable --no-interaction &&
SITES=$(echo -n "$(blt blt:config:get multisites | shuf -n 10)" | jq -R -s -c 'split("\n") | sort')
echo "matrix={\"site\": $SITES}" >> $GITHUB_OUTPUT
lint_theme:
runs-on: ubuntu-latest
container:
image: pookmish/drupal8ci:latest
steps:
- uses: actions/checkout@v4
- name: Cache theme node_modules
id: cache-theme-node-modules
uses: actions/cache@v4
with:
path: ${{ env.themePath }}/node_modules
key: ${{ runner.os }}-${{ hashFiles(format('{0}/package-lock.json', env.themePath)) }}
- name: Install theme node_modules
if: steps.cache-theme-node-modules.outputs.cache-hit != 'true'
run: npm install --prefix $themePath
- name: Lint Theme
run: npm run lint --prefix $themePath
test_existing_site:
needs: set_sites
needs:
- set_sites
- lint_theme
strategy:
fail-fast: false
matrix: ${{fromJSON(needs.set_sites.outputs.matrix)}}
Expand Down Expand Up @@ -134,6 +155,11 @@ jobs:
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: fail
- run: git config --system --add safe.directory '*'
- name: Restore theme node_modules
uses: actions/cache@v4
with:
path: ${{ env.themePath }}/node_modules
key: ${{ runner.os }}-${{ hashFiles(format('{0}/package-lock.json', env.themePath)) }}
- name: Sync Database
run: |
mysql -h mysql -P 3306 -u root -pdrupal -e 'SET GLOBAL max_allowed_packet=67108864;' &&
Expand All @@ -158,6 +184,7 @@ jobs:
path: /var/www/html/artifacts
test_new_site:
runs-on: ubuntu-latest
needs: lint_theme
container:
image: pookmish/drupal8ci:latest
options: '--network-alias drupal8ci'
Expand Down Expand Up @@ -208,6 +235,13 @@ jobs:
mkdir -p docroot/sites/default/files &&
chmod -R 777 docroot/sites/default/files/ &&
blt drupal:install -n
- name: Restore theme node_modules
uses: actions/cache@v4
with:
path: ${{ env.themePath }}/node_modules
key: ${{ runner.os }}-${{ hashFiles(format('{0}/package-lock.json', env.themePath)) }}
- name: Compile theme assets
run: npm run build --prefix $themePath
- name: Codeception Tests
run: |
apachectl stop
Expand All @@ -222,6 +256,7 @@ jobs:
deploy_branch:
needs:
- test_phpunit
- lint_theme
- set_sites
- test_existing_site
- test_new_site
Expand Down Expand Up @@ -252,6 +287,11 @@ jobs:
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: fail
- run: git config --system --add safe.directory '*'
- name: Restore theme node_modules
uses: actions/cache@v4
with:
path: ${{ env.themePath }}/node_modules
key: ${{ runner.os }}-${{ hashFiles(format('{0}/package-lock.json', env.themePath)) }}
- name: Deploy Branch
run: |
git config --global user.email "[email protected]" &&
Expand Down
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,17 @@ docroot/modules/stanford
docroot/themes/stanford
docroot/profiles/stanford

# Ignore custom theme build artifacts
# Ignore custom theme build artifacts and compiled files
node_modules
styleguide

docroot/themes/humsci/humsci_airy/css/humsci_airy.css
docroot/themes/humsci/humsci_colorful/css/humsci_colorful.css
docroot/themes/humsci/humsci_traditional/css/humsci_traditional.css
docroot/themes/humsci/humsci_airy/css/humsci_airy-ckeditor.css
docroot/themes/humsci/humsci_colorful/css/humsci_colorful-ckeditor.css
docroot/themes/humsci/humsci_traditional/css/humsci_traditional-ckeditor.css
docroot/themes/humsci/humsci_traditional/js/index.js
docroot/themes/humsci/humsci_colorful/js/index.js
# Ignore build artifacts
deployment_identifier
/deploy
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
5 changes: 5 additions & 0 deletions .tugboat/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ services:

# Commands that set up the basic preview infrastructure
init:
# Add nodeJS to build theme assets after composer install
- curl -fsSL https://deb.nodesource.com/setup_current.x | bash -
- apt-get install -y nodejs
# Symlink the tugboat directory to the docker image expected path.
- rm -rf /var/www/localhost
- ln -snf ${TUGBOAT_ROOT} /var/www/localhost
Expand Down Expand Up @@ -62,6 +65,8 @@ services:
- drush @hs_traditional.local eval '\Drupal::moduleHandler()->loadInclude("user", "install");user_update_10000();'
- blt drupal:update --site=hs_traditional

- npm run theme-build

# Collection of urls to compare visual results.
urls:
- /
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ To set up your local environment and begin developing for this project, refer to

CSS assets are built using the Grunt task runner, but are run using npm scripts as shortcuts.

- `npm run build` - Compile Sass for production for all themes, **except Humsci_basic** which requires additional Grunt tasks to compile sub-theme specific CSS.
- `npm run watch` - Compile a CSS build and watch for changes in the existing `.scss` files (other than humsci_basic)
- `npm run theme-build` - Compile Sass for production for all themes based on `humsci_basic`.
- `npm run theme-watch` - Compile a CSS build and watch for changes in the existing `.scss` files in all themes based on `humsci_basic`.
- `npm run theme-visreg` - Run Percy VRT on `hs_colorful` and `hs_traditional` sites (see `docroot/themes/humsci/humsci_basic/README.md` for details.)

## Testing

Expand All @@ -40,7 +41,7 @@ be the wrapper around the codeception commands.
- [List of current tests](/docs/Codeception.md)

### SASS
- `npm test` - Run linting for all Sass in the project (including humsci_basic).
- `npm test` - Run tests for all Sass in the project (including humsci_basic).

## Other documentation
* [Change Log](docs/CHANGELOG.md)
Expand All @@ -58,3 +59,4 @@ be the wrapper around the codeception commands.

[![Maintainability](https://api.codeclimate.com/v1/badges/fa85d434c3928bbf8d80/maintainability)](https://codeclimate.com/github/SU-HSDO/suhumsci/maintainability)
[![CircleCI](https://circleci.com/gh/SU-HSDO/suhumsci/tree/develop.svg?style=svg)](https://circleci.com/gh/SU-HSDO/suhumsci/tree/develop)

4 changes: 4 additions & 0 deletions blt/blt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ multisites:
- hs_colorful
- hs_design
- hs_fcp
- hs_fps
- hs_sandbox
- hs_testing_sandbox
- hs_traditional
Expand Down Expand Up @@ -180,6 +181,9 @@ command-hooks:
post-deploy-build:
dir: '${deploy.dir}'
command: 'chmod +x blt/cleanup.sh; blt/cleanup.sh'
frontend-reqs:
dir: ${repo.root}
command: ./hooks/common/theme/theme-build.sh
cm:
strategy: config-split
allow-overrides: true
Expand Down
3 changes: 3 additions & 0 deletions blt/deploy/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ xhprof_*
# Acquia Cli tool
acquiacli.yml

# Theme node_modules
docroot/themes/humsci/*/node_modules

# OS files
# ------------
# - Linux
Expand Down
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@
"allow-plugins": true
},
"scripts": {
"build-theme": [
"npm ci --prefix docroot/themes/humsci/humsci_basic",
"npm run build --prefix docroot/themes/humsci/humsci_basic"
],
"test-theme": [
"npm ci --prefix docroot/themes/humsci/humsci_basic",
"npm run test --prefix docroot/themes/humsci/humsci_basic"
],
"post-drupal-scaffold-cmd": [
"patch -p1 < patches/scaffold.patch"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ dependencies:
- paragraphs.paragraphs_type.hs_spotlight
module:
- ds
- empty_fields
- field_formatter_class
- hs_field_helpers
- link
- linkit
- smart_trim
- stanford_media
third_party_settings:
Expand Down Expand Up @@ -79,6 +80,7 @@ content:
view_mode: caption_credit
link: false
image_style: spotlight_portrait_responsive
remove_alt: false
third_party_settings:
field_formatter_class:
class: ''
Expand All @@ -87,15 +89,18 @@ content:
weight: 0
region: image
field_hs_spotlight_link:
type: link
type: linkit
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: '0'
target: '0'
linkit_profile: default
third_party_settings:
empty_fields:
handler: ''
field_formatter_class:
class: ''
hs_field_helpers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- field_formatter_class
- hs_field_helpers
- layout_builder
- link
- linkit
- smart_trim
- stanford_media
third_party_settings:
Expand Down Expand Up @@ -96,14 +96,15 @@ content:
weight: 0
region: image
field_hs_spotlight_link:
type: link
type: linkit
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: '0'
target: '0'
linkit_profile: default
third_party_settings:
field_formatter_class:
class: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Drupal.behaviors.defaultShortcuts = {
if (!settings.user.uid) {
// If the user is not logged in, clear the active toolbar tab ID.
window.localStorage.removeItem('Drupal.toolbar.activeTabID');
window.sessionStorage.removeItem('Drupal.toolbar.toolbarState')
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% endif %}

{% set text_content = overlay_text %}
{% if overlay_text['field_hs_hero_title'] is defined %}
{% if overlay_text['field_hs_hero_title'] is defined and overlay_text['field_hs_hero_title'][0] is defined %}
{% set text_content %}
<{{ heading_tag }}>
{{ overlay_text['field_hs_hero_title'] }}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const SelectList = ({options = [], label, multiple, ariaLabelledby, required, de
}
{(!optionChosen && multiple) &&
<span style={{padding: "8px 5px 8px 0", color: "#4c4740"}}>
Choose one or more from dropdown
Choose one or more options
</span>
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'Stanford HumSci'
type: profile
description: 'Installation profile for HumSci Drupal'
version: 11.0.0
version: 11.1.0
core_version_requirement: '^9.4 || ^10'
themes:
- material_admin
Expand Down
12 changes: 12 additions & 0 deletions docroot/sites/hs_fps/blt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
project:
machine_name: hs_fps
human_name: hs_fps
local:
protocol: http
hostname: local.hs_fps.com
drush:
aliases:
local: hs_fps.local
remote: hs_fps.prod
drupal:
db: { }
2 changes: 2 additions & 0 deletions docroot/sites/hs_fps/default.local.drush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
options:
uri: '${project.local.uri}'
Loading

0 comments on commit 964078a

Please sign in to comment.