Skip to content

Commit

Permalink
Merge pull request #813 from droptica/feature/DROOP-756-release-fixes-4
Browse files Browse the repository at this point in the history
DROOP-759 Changes for release 3.1.0
  • Loading branch information
grzegorz-pietrzak-droptica authored Jul 1, 2022
2 parents 4b7e886 + 3927f47 commit 694603b
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="https://droopler-demo.droptica.com/themes/custom/droopler_subtheme/logo.svg" width=300 alt="Droopler Logo" />

## What is Droopler?
Droopler is a Drupal 8/9 profile designed to build corporate websites. It's based on the latest frontend technologies, including Bootstrap 4. The maintainer of Droopler is [Droptica](https://www.droptica.com).
Droopler is a Drupal 9 profile designed to build corporate websites. It's based on the latest frontend technologies, including Bootstrap 4. The maintainer of Droopler is [Droptica](https://www.droptica.com).

[![Build Status](https://github.com/droptica/droopler/workflows/Drupal%20coding%20standards/badge.svg?branch=master)](https://github.com/droptica/droopler/actions)

Expand All @@ -22,7 +22,7 @@ The Droopler profile should be installed via Composer. We recommend using [Droop

```json
"require": {
"droptica/droopler": "^8.3.0"
"droptica/droopler": "^8.3.1"
}
```

Expand Down
31 changes: 31 additions & 0 deletions UPDATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
# Updating Droopler

## Droopler 3.1.0

### PHP 8.x
If you want to run Droopler with PHP 8.x, you should include `cweagans/composer-patches` package in your `composer.json`:
```json
{
"require": {
"cweagans/composer-patches": "^1.6"
},
"extra": {
"enable-patching": true,
}
}
```

### Composer 2.2
If you are using Composer >= 2.2.0, remember to add these lines to your `composer.json`:
```json
{
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"composer/installers": true,
"cweagans/composer-patches": true,
"drupal/console-extend-plugin": true,
"drupal/core-composer-scaffold": true,
"oomphinc/composer-installers-extender": true,
"zaporylie/composer-drupal-optimizations": true
}
}
```

### Droopler Commerce
Class `DrooplerProductVariation` has been removed, if you want to restore it for your project, you can find it [here](https://github.com/droptica/droopler/tree/master/modules/custom/d_commerce/modules/d_commerce_product/src/Entity):

You can attach it by using this hook:
Expand Down
11 changes: 10 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"bower-asset/colorbox": "^1.6",
"bower-asset/lazysizes": "^5.2",
"bower-asset/masonry": "^4.2",
"cweagans/composer-patches": "^1.6",
"drupal/admin_toolbar": "^3.0",
"drupal/advagg": "^4.0",
"drupal/better_exposed_filters": "^5.0",
Expand Down Expand Up @@ -76,6 +77,14 @@
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
"sort-packages": true
},
"extra": {
"patches": {
"drupal/we_megamenu": {
"PHP 8.1 Deprecations": "https://www.drupal.org/files/issues/2022-02-24/we_megamenu_deprecated.patch",
"PHP 8.1 Compatibility": "web/profiles/contrib/droopler/patches/we_megamenu_compatibility_php81.patch"
}
}
}
}
3 changes: 1 addition & 2 deletions droopler.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies:
- drupal:block_content
- drupal:breakpoint
- drupal:ckeditor
- drupal:color
- drupal:config
- drupal:contact
- drupal:content_translation
Expand Down Expand Up @@ -109,6 +108,6 @@ themes:

distribution:
name: 'Droopler Profile'
version: '3.0.0'
version: '3.1.0'
project: 'droopler'
core_incompatible: false
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ core.entity_form_display.paragraph.d_p_carousel_item.default:
change:
expected:
content:
field_d_settings:
type: link
field_d_cta_link:
type: link_default
new:
content:
field_d_settings:
field_d_cta_link:
type: link_attributes
27 changes: 27 additions & 0 deletions patches/we_megamenu_compatibility_php81.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/src/WeMegaMenuBuilder.php b/src/WeMegaMenuBuilder.php
index eb5a2bc..2467ac2 100644
--- a/src/WeMegaMenuBuilder.php
+++ b/src/WeMegaMenuBuilder.php
@@ -387,13 +387,15 @@ class WeMegaMenuBuilder {
}
}

- $menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count]->col_content[] = $tmp_col_content;
- $items_validate_serialize = array_map("serialize", $menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count]->col_content);
- $items_validate_unique = array_unique($items_validate_serialize);
- $items_validate = array_map("unserialize", $items_validate_unique);
- $menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count]->col_content = $items_validate;
- if (!isset($menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count]->col_config)) {
- $menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count]->col_config = $tmp_col_cfg;
+ if (isset($menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count])) {
+ $menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count]->col_content[] = $tmp_col_content;
+ $items_validate_serialize = array_map("serialize", $menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count]->col_content);
+ $items_validate_unique = array_unique($items_validate_serialize);
+ $items_validate = array_map("unserialize", $items_validate_unique);
+ $menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count]->col_content = $items_validate;
+ if (!isset($menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count]->col_config)) {
+ $menu_config->menu_config->{$key_menu}->rows_content[$row_count][$col_count]->col_config = $tmp_col_cfg;
+ }
}
}
}
21 changes: 0 additions & 21 deletions themes/custom/droopler_theme/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
const fs = require('fs');
const rename = require("gulp-rename");
const del = require('del');
const argv = require('yargs').argv;

// Patterns
const scss_pattern = '**/*.scss';
Expand All @@ -31,20 +30,17 @@
// Theme directory
const theme_dir = '.';


// Subdirectories
const scss_dir = theme_dir + '/scss';
const css_dir = theme_dir + '/css';
const js_dir = theme_dir + '/js';
const jsmin_dir = theme_dir + '/js/min';
const vendor_dir = theme_dir + '/js/vendor';


// Inputs
const scss_input = scss_dir + '/' + scss_pattern;
const js_input = js_dir + '/' + js_pattern;


// Dev SASS options
const sassOptionsDev = {
errLogToConsole: true,
Expand All @@ -61,7 +57,6 @@
overrideBrowserslist: ['last 2 versions', '> 5%', 'Firefox ESR']
};


// MAIN TASKS
// ----------------------------------------------------

Expand All @@ -81,15 +76,13 @@
console.log('[ERROR] Working directory does not exist. Maybe it is not mounted by docker? Or there is a misspell?');
}


// Check for SCSS dir
if (fs.existsSync(scss_dir)) {
console.log('[OK] SCSS directory exists.');
} else {
console.log('[ERROR] SCSS directory does not exist. Create it and get to work!');
}


// Check for CSS dir
if (fs.existsSync(css_dir)) {
console.log('[OK] CSS directory exists.');
Expand Down Expand Up @@ -121,7 +114,6 @@
cb()
}


// Clean everything
function clean(cb) {
return del([
Expand All @@ -134,17 +126,11 @@
const compile = gulp.parallel(sassCompile, jsCopyLibs, jsCompile);
const dist = gulp.parallel(sassDist, jsCopyLibs, jsCompile);


// HELPER TASKS
// ----------------------------------------------------

// Compile SASS
function sassCompile() {
let profileUrl = argv.profile_url;
let variables = {};
if (typeof profileUrl !== 'undefined') {
variables = {profile_path: profileUrl};
}
return gulp
.src(scss_input)
.pipe(sourcemaps.init())
Expand Down Expand Up @@ -178,14 +164,8 @@
], cb);
}


// Generate the production styles
function sassDist() {
let profileUrl = argv.profile_url;
let variables = {};
if (typeof profileUrl !== 'undefined') {
variables = {profile_path: profileUrl};
}
return gulp
.src(scss_input)
.pipe(sass(sassOptionsProd))
Expand All @@ -204,7 +184,6 @@
exports.sassDist = sassDist;
exports.default = exports.watch;


// For Docker - properly catch signals
// Without this CTRL-C won't stop the app, it will send it to background
process.on('SIGINT', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ $geysir-add-more-button: $color-hecuba !default;
.form-actions {
margin-top: 1rem;
}
.button--primary {
.button--primary:not(.no-bootstrap) {
color: #fff;
background: $primary;
font-weight: bold;
Expand Down

0 comments on commit 694603b

Please sign in to comment.