Dan Brown [Sat, 13 Apr 2024 14:48:39 +0000 (15:48 +0100)]
Content styles: Made links underlined for visibility
Inline with A11y recommendations where color may not be reliable on its
own.
Tested various content link scenarios across chrome, safari & FF.
For #4939
Dan Brown [Mon, 8 Apr 2024 13:41:51 +0000 (14:41 +0100)]
JS Build: Split markdown to own file, updated packages
Markdown-related code was growing, representing half of app.js main
bundle code while only being needed in one view/scenario.
This extracts markdown related code to its own built file.
Related to #4858
Dan Brown [Mon, 1 Apr 2024 16:08:53 +0000 (17:08 +0100)]
References: Fixed references count/list recycle bin interaction
Count and reference list would get references then attempt to load
entities, which could fail to load if in the recycle bin.
This updates the queries to effectively ignore references for items we
can't see (in recycle bin).
Added test to cover.
Dan Brown [Mon, 18 Mar 2024 14:24:14 +0000 (14:24 +0000)]
Meta: Updated workflows, licence and readme
- Updated license year
- Updated some readme wording, removed lapsed sponsor, Removed twitter
link, added link to alt github source
- Update cache action for GH workflows since GH was complaining
Dan Brown [Tue, 20 Feb 2024 18:21:59 +0000 (18:21 +0000)]
Deps: Updated npm & composer deps
Avoided updating markdown-it package to 14 for now since it would cause
bundle size to inflate. Don't think ESBuild is properly tree shaking
"entities" sub package which inflates size.
(Copied this message from december deps update).
Dan Brown [Tue, 20 Feb 2024 14:15:22 +0000 (14:15 +0000)]
WYSIWYG: Improved a range of text direction/alignment scenarios
- Removes 'span' from being a valid part of alignment formats so it's
not used to align contents, since it's going to mostly be an inline
format, wheras you'd really want alignment on the parent block.
- Adds direction cleaning to all direction change events, to remove
direction styles and child direction controls which may complicate
matters and cause direction changes not to show.
- Makes text direction controls work with table cell range selections,
which TinyMCE does not consider by default, via manual handling.
Dan Brown [Sun, 11 Feb 2024 15:42:37 +0000 (15:42 +0000)]
Queries: Update API to align data with previous versions
Ensures fields returned match API docs and previous versions of
BookStack where we were accidentally returning more fields than
expected.
Updates tests to cover many of these.
Also updated clockwork to ignore image requests for less noisy
debugging.
Also updated chapter page query to not be loading all page data, via new
query in PageQueries.
Dan Brown [Thu, 8 Feb 2024 16:39:59 +0000 (16:39 +0000)]
Queries: Updated old use-specific entity query classes
- Updated name to align, and differentate from new 'XQueries' clases.
- Removed old sketchy base class with app resolving workarounds, to a
proper injection-based approach.
- Also fixed wrong translation text used in PageQueries.
Dan Brown [Mon, 5 Feb 2024 15:59:20 +0000 (15:59 +0000)]
Queries: Extracted chapter repo queries to class
Updated query classes to align to interface for common aligned
operations.
Extracted repeated string-identifier-based finding from page/chapter
repos to shared higher-level entity queries.
Mikhail Shashin [Mon, 5 Feb 2024 01:28:22 +0000 (04:28 +0300)]
Update PWA manifest orientation to any
Changed the orientation settings in PwaManifestBuilder.php from 'portrait' to 'any'. This allows the PWA to adjust to any screen orientation, enhancing user flexibility.
Dan Brown [Sun, 4 Feb 2024 17:35:16 +0000 (17:35 +0000)]
Queries: Migrated BookRepo queries to new query class
Also moved to a non-static approach, and added a high-level class to
allow easy access to all other entity queries, for use in mixed-entity
scenarios and easier/simpler injection.
Dan Brown [Sun, 4 Feb 2024 14:39:01 +0000 (14:39 +0000)]
DB: Started update of entity loading to avoid global selects
Removes page/chpater addSelect global query, to load book slug, and
instead extracts base queries to be managed in new static class, while
updating specific entitiy relation loading to use our more efficient
MixedEntityListLoader where appropriate.
- Updated existing book tests to be generic to all default templates,
and updated with chapter testing.
- Extracted repeated logic in the Book/Chapter repos to be shared in the
BaseRepo.
Dan Brown [Wed, 31 Jan 2024 16:20:22 +0000 (16:20 +0000)]
Comments: Added HTML filter on load, tinymce elem filtering
- Added filter on load to help prevent potentially dangerous comment
HTML in DB at load time (if it gets passed input filtering, or is
existing).
- Added TinyMCE valid_elements for input wysiwygs, to gracefully degrade
content at point of user-view, rather than surprising the user by
stripping content, which TinyMCE would show, post-save.
Dan Brown [Tue, 30 Jan 2024 11:38:47 +0000 (11:38 +0000)]
WYSIWYG: Altered how custom head added to editors
Updated to parse and add as DOM nodes instead of innerHTML to avoid
triggering an update of all head content, which would throw warnings in
chromium in regard to setting the base URI.