01516: Planned Version 2.4.0
Description: Bugtrack for planned version 2.4.0.
Here we can report bugs with the 2.4.0 pre-release and track fixing them. --Petko
Release notes entry (click to toggle)
Version 2.4.0 (2025-01-19)
I'm happy to announce PmWiki version 2.4.0, a milestone that also marks 16 years of my journey as the core developer (Petko). Fun fact: that's 20 years in octal and 10000 years in binary. ;-)
To mark the occasion, some extra work was appropriate. I hope you will find the new production interesting and useful.
Structure, JavaScript and CSS changes:
- Added a new
pub/lib
directory, moving core files such aspmwiki-utils.js
,pmwiki-syntax.css
,pmwiki-syntax.js
, andpmwiki-darktoggle.js
to it. - Added
pmwiki-core.css
which includes core styles previously injected into$HTMLStylesFmt
. This change is aimed at improving performance and supporting stricter Content-Security-Policy. The styles include support for both light and dark themes and responsive layouts, with easier customization options. - Added
pmwiki-lib.js
, a new core JavaScript library for DOM manipulation, asynchronous operations, preference storage, and reporting. These functions can also be used by recipes. - Added
$HTMLHeader1Fmt
for insertion right after the<head>
tag to facilitate early loading of scripts and styles, improving features like dark mode and easing core style overrides by skins. - Refactored the
InsertWikiPageCSS()
function. Added$WikiPageInlineCSS
(default enabled); if set to 0, local styles will be served as a separate browser request ($PageUrl?action=pagecss
), aligning with the stricter Content-Security-Policy.
Form and Textarea Enhancements:
- The form "Preview" button now does not require validation.
- Improved
$EnableMergeLastMinorEdit
behavior. - If
$EnableEditAutoText
is set to 2, any textarea with theautotext
class will enable Cookbook:EditHelp. New shortcuts for line swapping (Alt+ArrowUp
andAlt+ArrowDown
) have been added. - Introduced
$EditAutoBrackets
to automatically insert closing characters in autotext textareas. If text is selected, typing an opening character will wrap the selection with matching characters. - If
$EnablePmSyntax
is set to 2, any textarea with the classpmsyntax
will enable Cookbook:PmSyntax. The F8 key can now toggle syntax highlighting. - Added the
(:input range:)
element to forms. - Added support for
data-labelvalue="1"
attribute in form elements like color and range inputs to display their values.
* (:input color c1 #ff4500 data-labelvalue=1:) * (:input range r1 10 min=0 max=30 data-labelvalue=1:) |
New variables and enhancements:
- Added $EnableUploadTargets and $UploadTargets to track files attached to a page.
- Introduced
$RehashedPassword
, which contains a new hash when a user logs in with an outdated password hash, allowing add-ons to update the password hash. - Added
$PagePathResolveFmt
, if enabled, will resolve the current page name instead of$PagePathFmt
. This is useful for wikis where both Main.Name and Name.HomePage (or Name.Name) exist, allowing the Name group to open instead of Main.Name.
Table of contents updates:
- The Table of Contents now uses a
<details><summary>
element for toggling. Custom styles fordiv.PmTOCdiv
should be updated to.PmTOCdiv
, anddiv.PmTOCtable
should be updated to.PmTOCtable
. The back arrow is now defined in CSS.
Other notable changes:
- Added helper function
XLHSC()
and updatedPosArgs()
. - The RecentChanges "plus" button in Cookbook:LocalTimes is now an input button element. After downloading recent page edits, it will display "minus" instead of disappearing, and clicking "minus" will hide the edits and toggle back to "plus".
- The
?action=diag
page now includes defined constants and functions, aiding diagnostics. - A couple of bugs have been fixed.
Documentation:
- Simplified the
docs/sample-config.php
. $EnableCopyCode
works only on HTTPS websites. It will be disabled on HTTP without any console errors.- Updated documentation to reflect changes and new features.
These changes aim to improve performance, flexibility, and usability across the core system, while also supporting better customization and tighter security.
If you have any questions or encounter any issues during the upgrade, feel free to reach out -- I'd be happy to assist you.
To do (some day):
- Migrate PmWiki:WikiStyles color declarations to classes.
- New skin PmWiki-One?.
- Document Cookbook:PmLib?