Skip to content

Commit

Permalink
2.0 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikkel committed Mar 27, 2024
1 parent 1f58146 commit 4caa731
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 58 deletions.
1 change: 0 additions & 1 deletion .craftplugin

This file was deleted.

15 changes: 0 additions & 15 deletions CHANGELOG-WIP.md

This file was deleted.

13 changes: 3 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@ 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/).

## 2.0.0-beta.3 - 2024-03-25
### Improved
- Adds support for entry type icons and colors in Child Me! entry type disclosure menus

## 2.0.0-beta.2 - 2024-03-25
### Fixed
- Fixes an issue where clicking Child Me! disclosure menu buttons would select the element row

## 2.0.0-beta.1 - 2024-03-24
## 2.0.0 - 2024-03-27
### Added
- Added Craft 5 compatibility
- Added support for entry type icons and colors in Child Me! entry type disclosure menus
- Added the `entry` attribute to the `mmikkel\childme\events\DefineEntryTypesEvent` event class
### Improved
- Child Me! has been rewritten from scratch for Craft 5 🔥
- Child Me! has been rewritten from scratch for Craft 5 🔥
- Accessibility, performance and CX (child-creating experience) have all been improved 🎉
### Fixed
- Fixed an issue where Child Me! entry type menus could become visually cut off ([#14](https://github.com/mmikkel/ChildMe-Craft/issues/14))
41 changes: 12 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,25 @@
# Child Me! plugin for Craft CMS

Child Me! adds a "New child" element index attribute to structure indexes (entries and categories are supported). Adding this attribute to an index, renders a button that works as a "shortcut" to create new child
elements nested under a particular parent – making it much easier to add a child element to a particular parent.
Child Me! improves Craft's CX (child-creating experience) by making a nifty "New child" element index attribute available to element indexes.

For structure sections with multiple entry types, the Child Me! button displays a menu, giving authors quick access to create a child entry using a particular entry type, as well.
Adding the "New child" attribute to a structure section or category index renders a button, which works as a "shortcut" for creating new child
elements nested under a particular parent – much faster than manually selecting the parent in the "Parent" field on element edit pages!

![Screenshot](resources/img/demo.gif)
For structure sections with multiple entry types available, the Child Me! button opens a disclosure menu with shortcuts for creating child entries using these types.

![Screenshot](resources/img/screenshot.png)

## Requirements

This plugin requires Craft CMS 5.0+

## Installation

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

cd /path/to/project

2. Then tell Composer to load the plugin:

composer require mmikkel/child-me

3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Child Me!.

## Using Child Me!

To actually use Child Me!, you'll need to add the "New child" element index attribute manually, using the CEI (
Customizable Element Index) feature available in entry and category element indexes:
Child Me! works by adding the "New child" element index attribute to a structure section or category index.

Simply click the little cogwheel below your element sources in the left-side panel, check the "New child" attribute,
drag it to the position you want and hit "Save" (see screenshot for reference).
To add the attribute, click the "Customize sources" disclosure menu toggle below your element sources in the left-side panel, then select the appropriate section and finally check the "New child" attribute.

![Customize sources button](customize-sources.png)

### Events

Expand Down Expand Up @@ -59,13 +47,8 @@ entry types via the "New child" button, for sections with multiple entry types.

## Disclaimer

This plugin is provided free of charge and you can do whatever you want with it. Child Me is _very_ unlikely to mess up
your stuff, but just to be clear: the author is not responsible for data loss or any other problems resulting from the
use of this plugin.

Please report any bugs, feature requests or other issues [here](https://github.com/mmikkel/ChildMe-Craft/issues). Note
that this is a hobby project and no promises are made regarding response time, feature implementations or bug fixes.
Please report any bugs or other issues [here](https://github.com/mmikkel/ChildMe-Craft/issues).

Plugin icon: Baby by Chintuza from [the Noun Project](https://thenounproject.com/icon/baby-3214276/)
Plugin icon: Baby by Chintuza from [the Noun Project](https://thenounproject.com/icon/baby-3214276/)


4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mmikkel/child-me",
"description": "Easily create child elements",
"type": "craft-plugin",
"version": "2.0.0-beta.3",
"version": "2.0.0",
"keywords": [
"craft",
"cms",
Expand All @@ -22,7 +22,7 @@
}
],
"require": {
"craftcms/cms": "^5.0.0-beta.11",
"craftcms/cms": "^5.0.0",
"php": "^8.2"
},
"minimum-stability": "dev",
Expand Down
Binary file added resources/img/customize-sources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed resources/img/demo.gif
Binary file not shown.
Binary file added resources/img/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/ChildMe.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function init(): void
parent::init();

$request = Craft::$app->getRequest();
if (!$request->getIsCpRequest() || $request->getIsConsoleRequest() || $request->getIsLoginRequest()) {
if (!$request->getIsCpRequest() || $request->getIsLoginRequest()) {
return;
}

Expand Down

0 comments on commit 4caa731

Please sign in to comment.