Releases: sebastiangreger/kirby3-commentions
1.0.7 — Kirby 3.7.1 compatibility update
Yet another mini-update to keep Commentions 1.x running with Kirby 3.7.1; still working with pre-3.6 Kirby as well.
Thank you to @hariom147 and @mynameisfreedom for the reports, and @fabianmichael for contribs.
(Second attempt, now with correct version numbers included…)
1.0.6 — Kirby 3.7 compatibility update
Just a tiny update to keep Commentions 1.x running with Kirby 3.7; this updated version still works with Kirby core pre-3.6 as well.
2.0 beta 4
As the plugin code, these release notes are beta -- any feedback on missing or unclear instructions are most welcome via Issues!
Changes from v2.0-beta.3
- Small improvements on the French language translations (#126, thx @luce-carevic)
- Compatibility update with Kirby core version 3.6
Commentions 2.0 — What's new?
Version 2.0 primarily brings significant UX improvements for the comments form and adds additional configuration options to accommodate varying preferences. In addition, a new "custom form fields" feature lays the foundation for advanced custom integrations and future developments. And this major release of course fixes some bugs and responds to small feature requests.
The Readme file on this branch is mostly up-to-date already, while a few breaking changes from v1.x are described at the end of this message.
Comment form UX improvements
- Better error feedback in the frontend by utilizing Kirby's built-in backend validation mechanisms; native frontend validation is now disabled by default, but can be activated for custom JS implementations (#106)
- The frontend now displays a meaningful error message when spam trap is triggered (no longer silently fails) (#95)
- URLs in the comment form's website field can be entered with/without
https://
(#83) - An optional
autocomplete
attribute can be configured for form fields (#83) - Configurable behaviour for anchor links after form submission (#99)
- Configuration option to keep comment form displayed after successful submission (#96)
- Configuration settings related to the frontend presentation have been moved from the
config.php
setup to a new (optional)$attrs
variable in thecommentions()
helper. This allows more fine-grained control in different templates. At the same time, the helpercommentions('grouped')
has been removed. *breaking change*
Custom form fields
- Setup and handling of additional fields (beyond name, email, website and comment)
- Advanced validation rules for standard and custom fields in combination with new backend validation
- Custom fields displayed and editable in the panel
- Enables almost limitless customization of comment implementations
- This comes with a required change to the configuration of form fields *breaking change*
Additional new features
- Optional possibility to store the ID of authenticated users with their comments (#93)
- Pagination in the panel views (#101)
Other updates
- Snippets moved to subfolder
commentions
for cleaner integration (#78) *breaking change* - Form field name/id of comment text changed from
message
totext
*breaking change* - Frontend form markup is now generated dynamically
- Temporary fix for an upstream issue with broken datetime field in edit modal; pending an upstream bugfix, comment timestamps can currently only be edited with 5-minute precision (#102)
- Stricter data-minimalist setup for webmentions storage (now only storing the URL by default, none of the parsed meta data; previous default can easily be restored, if desired) *breaking change*
- Renamed the
master
branch on GitHub tomain
-- this may have implications if you are working with a local fork (though the development of v2.0 takes place in develop during the beta phase) *git configuration needed for collaborators*
Breaking changes and migration instructions
As the major (semver) version number indicates, sites previously using version 1.x require a handful of setup changes, each relevant under the following conditions (click to see detailed instructions for each case):
If you configured form fields using the setting sgkirby.commentions.commentfields
The newly gained flexibility in form field setup requires changes to the sgkirby.commentions.commentfields
setting in config.php
, if you have configured your site to use other than the default field setup.
In version 1.x, it was possible to set sgkirby.commentions.commentfields
to an array that may contain a mix of simple and associative fields like
'sgkirby.commentions.commentfields' => [
'name' => true,
'email' => true,
'website',
'text',
],
Due to the improved configurability of the plugin it is now always necessary to provide an associative array, using an empty array value instead of the previous undefined values. At the same time a simple true
is no longer enough to express required fields, but the config array has to be set up as follows:
'sgkirby.commentions.commentfields' => [
'name' => [
'required' => true,
],
'email' => [
'required' => true,
],
'website' => [],
'text' => [],
],
For more details, see the documentation on comment field configuration.
If you are processing Webmentions
The default fields stored for incoming webmentions have been changed to the bare technical minimum: storing the URL of the source. This is to ensure data-minmalism by default and to ease compliance with certain privacy laws. Re-adding other fields is of course possible, but it is recommended to only add such fields that are also used.
In version 1.x, the plugin also stored name and homepage URL of the author (if it can be parsed by the microformats parser) and a copy of the HTML of the source page. To restore that behaviour, you need to add the values text
, name
and website
to the variable sgkirby.commentions.webmentionfields
in your config.php
:
'sgkirby.commentions.webmentionfields' => [
'text', // store source HTML
'name', // store author's realname
'website', // store author's homepage URL
],
If you are using any customized snippets (files site/snippets/commentions-*.php
)
The location for custom snippets has moved from site/snippets
to site/snippets/commentionsand the prefix
commentions-` has been removed from their name.
To migrate, move your customized snippets to the subfolder commentions
and rename them by removing the prefix. However, keep in mind the following update as well.
If you are using a customized form snippet (file site/snippets/commentions-form.php
)
This snippet has received significant updates that are closely tied to some of the new functionalities of v2. The most critical changes are:
- name and id of field
message
are nowtext
- the rendering of each field has been outsourced into a separate
field.php
snippet as it builds the bridge between backend and frontend (if you modify the snippet, try to use thefield.php
snippet unaltered whenever possible to receive future updates - the markup is affected by the new $attrs variable (as frontend settings are configured from the snippet call, not the config file)
- the markup for the open/close mechanism has changed to a more universal and accessible
<details>/<summary>
structure - instead of Kirby's
t()
function for UI strings, the snippet now uses the plugin's ownFrontend::uistring()
function which allows more granular overrides of specific texts
If you used the setting sgkirby.commentions.hideforms
in your config.php
This global setting (adding some HTML code to enable collapsing the forms) has been replaced with an optional attribute in your template. Remove the sgkirby.commentions.hideforms
from your config.php
and instead add the collapse
attribute where you call the commention()
or commention('form')
helper:
// <?= commentions() ?> becomes:
<?= commentions('all', ['collapse' => true]) ?>
// <?= commentions('form') ?> becomes:
<?= commentions('form', ['collapse' => true]) ?>
Please also note that the HTML in the snippets/form.php
(formerly snippets/commentions-form.php
) has changed. The plugin now uses the <details>/<summary>
element in order to provide collapsible forms out of the box in an accessible way. Version 1 rendered a more complicated markup that required additional custom JS code to enable the accordion effect.
If you used the commentions('grouped')
helper and/or the config setting sgkirby.commentions.grouped
The helper commentions('grouped')
has been removed in favour of adding a configuration attribute to commentions('list')
.
The configuration array for grouped output is no longer being read from the config.php
but should be included as an attribute when calling commentions('grouped')
.
To apply the default grouping, a boolean true
is sufficient:
<?= commentions('list', ['grouped' => true]) ?>
Otherwise, custom grouping rules can be defined by using an array:
// snippet call in template
<?= commentions('grouped') ?>
// with config.php settings
'sgkirby.commentions.grouped', [
'read' => 'Read by',
'like' => 'Likes',
'repost' => 'Reposts',
'bookmark' => 'Bookmarks',
'rsvp:yes' => 'RSVP: yes',
'rsvp:maybe' => 'RSVP: maybe',
'rsvp:interested' => 'RSVP: interested',
'rsvp:no' => 'RSVP: no',
],
become
// configuration added as attribute array to the snippet call
<?= commentions('list'), [
'grouped' => [
'read' => 'Read by',
'like' => 'Likes',
'repost' => 'Rep...
1.0.5 — Kirby 3.6 compatibility update
While work on the upcoming version 2.0 is well under way (see Releases for the latest beta version), this mini update ensures that the current stable Commentions 1.0.x stays functional with the imminent release of Kirby 3.6. It also fixed one tiny bug and a few language issues in the French language file.
2.0 beta 3
Superseded by v2.0-beta.4
Changes from v2.0-beta.2:
- Adjusted the
commentfields
config option to be future-proof (#116; breaking change: see below) - Snippet UI texts can now also be configured via
$attrs
in helper call (inspired by #123) - Comment list can be configured via
$attrs
to use<ol>
instead of default<ul>
(#119) - Removed hardcoded
<strong>
tag from author name in comments list (#115) - Added missing strings in French translation (thx @yoanmalie via #120)
- Plugin tested and deemed functional with PHP8 (#91)
- Two small bug fixes (missing translation strings, wrong file name for user-customized snippets)
2.0 beta 2
Superseded by v2.0-beta.3
Changes from v2.0-beta.1: Minor, but important update, ironing out two functional bugs:
- language code and comment status got added as custom fields to data files
- default grouping for "grouped" list helper was lost
2.0 beta 1
Superseded by v2.0-beta.2
1.0.4 — Small fixes and French translation
- Bugfix: Remove PHP8 deprecation notice, #92
- Bugfix: Hide spam honeypot from keyboard users, #98 (thx @getflourish)
- Updated: Minuscule adjustments of default CSS, matching new Kirby 3.5 Starterkit
- Added: French translation (by @jbidoret, #97)
1.0.3 — Bugfix release
Fixing some detail issues:
- Disabling comments for a page also made the webmention form disappear
- Form HTML used same ID for headline of both comments and webmention form
- Two tiny typos in default UI copy
- An improvement to the form CSS, preventing horizontal resizing of the textarea
Thank you for contributions: @fabianmichael
1.0.2 — Bugfix release
Fixes two bugs:
- missing translation strings in form snippet ("Submit" buttons) and user feedback after submission (feedback texts)
- webmentions with valid h-card were falsely saved as "Anonymous"