Skip to content

Commit

Permalink
Fixes compatability issues with Craft 3.5. Bump to 1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikkel committed Jul 30, 2020
1 parent 12fd2e8 commit 385f564
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,68 +4,88 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.2.5 - 2020-02-29
## 1.2.6 - 2020-07-30

### Fixed
- Fixes compatability issues with Craft 3.5

## 1.2.5 - 2020-02-29

### Fixed
- Fixes an issue where MatrixMate could fail to apply the correct field config in multi-site setups

### Improved
- Removes the bottom border from Matrix blocks' titlebars for block types with tabs (P&T removed the native border in Craft 3.4.5 and then re-added it in 3.4.7)

## 1.2.4 - 2020-02-15

### Improved
- Adds a bottom border to Matrix blocks' titlebars for block types with tabs (the native bottom border was removed in Craft 3.4.5) - thanks @umkasanki

## 1.2.3 - 2020-01-28

### Fixed
- Fixes Craft 3.4 compatibility issues

## 1.2.2 - 2019-09-29

### Fixed
- Fixes an issue where MatrixMate could fail to apply the correct field config context in element editor modals. Fixes #10.
- Fixes an issue where MatrixMate would hide block content when viewing entry revisions in Craft 3.2+. Fixes #11.
- Fixes an issue where MatrixMate could fail to apply the correct field config context if the URL had a `typeId` query parameter.

## 1.2.1 - 2019-09-04

### Fixed
- Fixes an issue where MatrixMate could make Craft trigger the "Leave site?" confirm dialog, even if no fields in the entry form had been altered

## 1.2.0 - 2019-08-30

### Added
- Added the `hiddenFields` config setting for block type configs, which makes it possible to hide specific fields without having to use the `tabs` setting

### Changed
- MatrixMate will now render tabs even if there is only a single tab defined in config (but it will only display tab buttons in block headers if there is more than one tab rendered). Fixes #9

## 1.1.5 - 2019-05-29

### Fixed
- Fixes issues related to Matrix fields nested in SuperTable fields

## 1.1.4 - 2019-05-10

### Fixed
- Fixes a namespace typo that could make Composer choke in case-sensitive environments. Thanks a lot @Mosnar!

## 1.1.3 - 2019-05-09

### Fixed
- Fixes a layout glitch that could happen when collapsing block types with field tabs within them
- Fixes a layout glitch where block group dropdown menus could display scrollbars

## 1.1.2 - 2019-04-26

### Fixed
- Improves field config parsing and general code quality
- Fixes an issue with maxLimit not being honored for ungrouped block types

## 1.1.1 - 2019-04-23

### Fixed
- Fixes an issue where MatrixMate would mess up field config contexts if neither a `fields` nor `groups` config was added to a field

## 1.1.0 - 2019-04-21

### Added
- Adds `hiddenTypes` setting for explicitly hiding block types
- Adds `defaultTabName` setting

### Improved
- MatrixMate no longer hides ungrouped block types by default
- It's now possible to add the same block type to multiple groups
- MatrixMate no longer renders empty groups or types

## 1.0.0 - 2019-02-07

### Added
- Initial release
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vaersaagod/matrixmate",
"description": "Welding Matrix into shape, mate!",
"type": "craft-plugin",
"version": "1.2.5",
"version": "1.2.6",
"keywords": [
"craft",
"cms",
Expand Down
1 change: 1 addition & 0 deletions src/MatrixMate.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public function onAfterLoadPlugins()
'fieldsConfig' => $fieldConfig,
'isEntryVersion' => $isEntryVersion,
'isCraft34' => \version_compare(Craft::$app->getVersion(), '3.4.0', '>='),
'isCraft35' => \version_compare(Craft::$app->getVersion(), '3.5.0-RC1', '>='),
];

$view = Craft::$app->getView();
Expand Down
4 changes: 4 additions & 0 deletions src/assetbundles/matrixmate/dist/css/MatrixMate.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ body.rtl .matrixmate-buttons > .btn, body.rtl .matrixmate-buttons > .btngroup {
right: 106px;
}

.matrixmate-block-inited.matrixmate-has-tabs > .titlebar {
border-bottom: 1px solid #E4E5E8;
}

.matrixmate-settings-menu h6 {
margin-top: 10px;
margin-bottom: 0;
Expand Down
13 changes: 9 additions & 4 deletions src/assetbundles/matrixmate/dist/js/MatrixMate.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,14 @@

var $tabs = $('<ul class="matrixmate-tabs"/>').appendTo($block);

var $fields = $block.find('> .fields');
var $fields;
if (this.settings.isCraft35) {
$fields = $block.find('> .fields > .flex-fields');
} else {
$fields = $block.find('> .fields');
}

var $matrixmateFields = $('<div class="matrixmate-fields"/>');
$fields.append($matrixmateFields);
$fields.addClass('matrixmate-fields');

// Create tabs
var usedFields = [];
Expand All @@ -448,6 +452,7 @@
var $pane = $('<div id="' + matrixmateNamespace + '-pane-' + i + '" />');

var tabFieldHandles = tabs[i]['fields'] || [];

$fields.find('> .field').each($.proxy(function (index, field) {
var $field = $(field);
var handle = this._getBlockFieldHandle($field);
Expand All @@ -473,7 +478,7 @@
paneClasses = ' hidden';
}

$pane.addClass(paneClasses).appendTo($matrixmateFields);
$pane.addClass(paneClasses).appendTo($fields);

if (tabs[i]['render'] !== false) {
var $tabLi = $('<li/>').appendTo($tabs);
Expand Down

0 comments on commit 385f564

Please sign in to comment.