01516: Planned Version 2.4.0

Summary: Planned Version 2.4.0
Created: 2024-11-18 13:44
Status: Open
Category:
From: Petko
Assigned:
Priority: 5
Version: Nigthly
OS:

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)

Planned Version 2.4.0 (2025-01-15)

Major changes planned, please test the pre-release and report any problems at PITS:01516.

Add directory pub/lib with core styles and functions. Move in it the core files pmwiki-utils.js, pmwiki-syntax.css, pmwiki-syntax.js, pmwiki-darktoggle.js.

Add pub/lib/pmwiki-core.css with all core styles that were previously added to $HTMLStylesFmt. This is a step towards allowing stricter Content-Security-Policy, and normally will make your wiki load faster and use less data. The styles include CSS variables that work with both light and dark color themes, desktop and mobile layouts, and can be easily redefined by skins and local customization.

Add pub/lib/pmwiki-lib.js, a new core JavaScript library used by the core and that can be reused by addons. It has a number of helper functions for simpler DOM manipulation, reporting, storing preferences, asynchronous fetching and posting.

Add $HTMLHeader1Fmt to be inserted after the <head> tag. This allows for some scripts and styles to be loaded very early, improving the setting of the dark color scheme, and making easier the override of core styles by both skins and local customization.

Refactor InsertWikiPageCSS(), add $WikiPageInlineCSS (default enabled). Normally this will behave exactly as before. As another step towards stricter Content-Security-Policy, set $WikiPageInlineCSS to 0 and instead of inline, the local styles will be output as a separate browser request $PageUrl?action=pagecss.

If $EnableEditAutoText is set to 2, any textarea with a class name "autotext" will enable Cookbook:EditHelp. Add new shortcuts Alt+ArrowUp and Alt+ArrowDown to swap lines.

If $EnablePmSyntax is enabled, any textarea with the class name "pmsyntax" will now enable Cookbook:PmSyntax. To enable both PmSyntax and EditHelp, use something like this: (:input textarea rows=10 cols=80 class="inputbox pmsyntax autotext":) Fixed wrong highlighting when a directive starts with "(:if" but is not a conditional.

Since now there may be more than one highlighted textarea on a page, the former highlighting elements #htext and #hwrap are now identified as class names .htext and .hwrap.

The "F8" key on a keyboard will now toggle the syntax highlighting on a textarea.

Add $EnableUploadTargets and $UploadTargets to keep track of files attached to a page.

Add variable $RehashedPassword that will contain a new hash for the user who is signing in with an older and less secure password hash. It can be used by addons to update the stored password hash.

Add variable $PagePathResolveFmt similar to $PagePathFmt. If defined, it will be used when the current page name is resolved instead of $PagePathFmt which is used when linking to pages. On wikis where both pages Main.Name and (Name.HomePage or Name.Name) exist, and the requested URL is just "example.com/Name", it will now be possible to open the Name group instead of the page Main.Name. To enable, add to config.php:

$PagePathResolveFmt = array('$1.{$DefaultName}','$1.$1');

Table of Contents changes:

  • A <details>+<summary> element is now used to toggle the table of contents. If you have custom styles for div.PmTOCdiv, change these to details.PmTOCdiv or just .PmTOCdiv.
  • The links are in a <nav> element. If you have custom styles for div.PmTOCtable, change these to nav.PmTOCtable or just .PmTOCtable.
  • The back arrow is now defined in CSS.

$EnableCopyCode only works on websites with HTTPS. It will now be disabled on HTTP without console errors.

Cookbook:LocalTimes the "plus" button is now an input button element rather than a link. After clicking on it and downloading the recent page edits, rather than disappearing, it will show "minus". Clicking on "minus" will remove the recent page edits.

Forms added element (:input range:). Elements color and range can have their value displayed after them, if they have an attribute data-labelvalue="1":

* (:input color c1 #ff4500 data-labelvalue=1:)
* (:input range r1 10 min=0 max=30 data-labelvalue=1:)

Add helper function XLHSC(), update PosArgs().

$EnableMergeLastMinorEdit improve detection of when to show "(merge with previous edit)".

?action=diag will now include defined constants and functions which may help with the diagnostic.

To do: