Dan Brown [Tue, 17 Dec 2024 22:40:28 +0000 (22:40 +0000)]
Lexical: Added about button/view
Re-used existing route and moved tinymce help to its own different
route. Added test to cover.
Added new external-content block to support in editor UI.
Dan Brown [Tue, 17 Dec 2024 16:50:03 +0000 (16:50 +0000)]
Lexical: Aligned new empty item behaviour for nested lists
- Makes enter on empty nested list item un-nest instead of just creating
new list items.
- Also updated existing lists tests to use newer helper setup.
Dan Brown [Mon, 16 Dec 2024 16:24:47 +0000 (16:24 +0000)]
Lexical: Added testing for some added shortcuts
Also:
- Added svg loading support (dummy stub) for jest.
- Updated headless test case due to node changes.
- Split out editor change detected to where appropriate.
- Added functions to help with testing, like mocking our context.
Dan Brown [Sun, 15 Dec 2024 17:11:02 +0000 (17:11 +0000)]
Lexical: Made summary part of details node
To provide more control of the summary as part of details.
To support, added a way to ignore elements during import DOM, allowing
up to read summaries when parsing details without duplicate nodes
involved.
Dan Brown [Sun, 15 Dec 2024 14:03:08 +0000 (14:03 +0000)]
Lexical: Added mobile toolbar support
Adds dynamic and fixed (out of DOM order) positioning with location
adjustment depending on space.
Also adds smarter hiding to prevent disappearing when mouse leaves but
within the same space as the toggle.
Dan Brown [Thu, 12 Dec 2024 21:45:52 +0000 (21:45 +0000)]
Notifications: Logged errors and prevented them blocking user
Failed notification sends could block the user action, whereas it's
probably more important that the user action takes places uninteruupted
than showing an error screen for the user to debug.
Logs notification errors so issues can still be debugged by admins.
Dan Brown [Wed, 11 Dec 2024 14:22:48 +0000 (14:22 +0000)]
Auth: Added specific guards against guest account login
Hardened things to enforce the intent that the guest account should not
be used for logins.
Currently this would not be allowed due to empty set password, and no
password fields on user edit forms, but an error could occur if the
login was attempted.
This adds:
- Handling to show normal invalid user warning on login instead of a
hash check error.
- Prevention of guest user via main login route, in the event that
inventive workarounds would be used by admins to set a password for
this account.
- Test for guest user login.
Dan Brown [Tue, 3 Dec 2024 13:47:45 +0000 (13:47 +0000)]
Search API: Updated handling of parent detail, added testing
Review of #5280.
- Removed additional non-needed loads which could ignore permissions.
- Updated new formatter method name to be more specific on use.
- Added test case to cover changes.
- Updated API examples to align parent id/info in info to be
representative.
Dan Brown [Sun, 1 Dec 2024 16:02:21 +0000 (16:02 +0000)]
Dev Docker: Fixed missing gd jpeg handling, forced migrations
Migrations run without force could fail startup in certain environment
conditions (when testing production env).
Also updated paths permission handling to update more needed locations.
Dan Brown [Fri, 29 Nov 2024 13:19:55 +0000 (13:19 +0000)]
Attachments: Fixed full range request handling
We were not responsing with a range request, where the requested range
was for the full extent of content. This changes things to always
provide a range request, even for the full range.
Change made since our existing logic could cause problems in chromium
browsers.
Elseif statement removed as its was likley redundant based upon other
existing checks.
This also changes responses for requested ranges beyond content, but I
think that's technically correct looking at the spec (416 are for when
there are no overlapping request/response ranges at all).
Dan Brown [Thu, 28 Nov 2024 16:30:59 +0000 (16:30 +0000)]
Includes: Workaround for PHP 8.3.14 bug
Changed DOMText creation to be done via document so its document
reference is correct to avoid a bug in PHP 8.3.14.
Ref: https://github.com/php/php-src/issues/16967
Wes Biggs [Tue, 26 Nov 2024 17:21:20 +0000 (11:21 -0600)]
Updates the OIDC userinfo endpoint request to allow for a `Content-Type` response header with optional parameters, like `application/json; charset=utf-8`. This was causing an issue when integrating with [node-oidc-provider](https://github.com/panva/node-oidc-provider).
Dan Brown [Mon, 25 Nov 2024 15:54:15 +0000 (15:54 +0000)]
ZIP Import & Exports: Addressed issues during testing
- Handled links to within-zip page images found in chapter/book
descriptions; Added test to cover.
- Fixed session showing unrelated success on failed import.
Tested import file-create undo on failure as part of this testing.
Dan Brown [Fri, 22 Nov 2024 21:36:42 +0000 (21:36 +0000)]
ZIP Imports: Updated import form to show loading indicator
And disable button after submit.
Added here because the import could take some time, so it's best to show
an indicator to the user to show that something is happening, and help
prevent duplicate submission or re-submit attempts.
Dan Brown [Mon, 18 Nov 2024 17:42:49 +0000 (17:42 +0000)]
ZIP Imports: Added image type validation/handling
Images were missing their extension after import since it was
(potentially) not part of the import data.
This adds validation via mime sniffing (to match normal image upload
checks) and also uses the same logic to sniff out a correct extension.
Added tests to cover.
Also fixed some existing tests around zip functionality.
Dan Brown [Thu, 14 Nov 2024 15:59:15 +0000 (15:59 +0000)]
ZIP Import: Finished base import process & error handling
Added file creation reverting and DB rollback on error.
Added error display on failed import.
Extracted likely shown import form/error text to translation files.
Dan Brown [Fri, 8 Nov 2024 11:35:18 +0000 (11:35 +0000)]
Testing: Improved reliability
- Added extra column/value check for page revision test for accuracy.
- Changed search sort test to use more reliable values.
- Change due to database seeding somtimes generating values that
proceeded the test value, expected to be first, in sort results.