Dan Brown [Thu, 23 Feb 2023 22:14:47 +0000 (22:14 +0000)]
Changed the way settings are loaded
This new method batch-loads them from the database, and removes the
cache-layer with the intention that a couple of batch fetches from the
DB is more efficient than hitting the cache each time.
Dan Brown [Thu, 23 Feb 2023 12:30:27 +0000 (12:30 +0000)]
Changed autosave handling for better editor performance
This changes how the editors interact with the parent page-editor
compontent, which handles auto-saving.
Instead of blasting the full editor content upon any change to that
parent compontent, the editors just alert of a change, without the
content. The parent compontent then requests the editor content from the
editor component when it needs that data for an autosave.
Dan Brown [Wed, 22 Feb 2023 14:32:40 +0000 (14:32 +0000)]
Made page-save HTML formatting much more efficient
Replaced the existing xpath-heavy system with a more manual traversal
approach. Fixes following slow areas of old system:
- Old system would repeat ID-setting action for elements (Headers could
be processed up to three times).
- Old system had a few very open xpath queries for headers.
- Old system would update links on every ID change, which triggers it's
own xpath query for links, leading to exponential scaling issues.
New system only does one xpath query for links when changes are needed.
Added test to cover.
Dan Brown [Mon, 20 Feb 2023 13:05:23 +0000 (13:05 +0000)]
Increased attachment link limit from 192 to 2k
Added test to cover.
Did attempt a 64k limit, but values over 2k significantly increase
chance of other issues since this URL may be used in redirect headers.
Would rather catch issues in-app.
Dan Brown [Mon, 20 Feb 2023 12:05:52 +0000 (12:05 +0000)]
Updated language files to remove literal "1" values
This is to encourge the ":count" values to be used instead of 1s in the
translated variants so that non-pluralised languages are hardcoded with
"1"s in their content, even when not used in a singular context.
Dan Brown [Sat, 18 Feb 2023 18:36:34 +0000 (18:36 +0000)]
Aded roles API controller methods
Altered & updated permissions repo, and existing connected
RoleController to suit.
Also extracts in-app success notifications to auto activity system.
Tweaked tests where required.
Dan Brown [Tue, 7 Feb 2023 11:50:59 +0000 (11:50 +0000)]
Removed parallel testing, updated predis
Parallel testing paratest library caused issues due to a single version
not being compatibile across our php range. Removed for now as not
really worth the faff to get compatible.
Dan Brown [Sat, 28 Jan 2023 12:50:51 +0000 (12:50 +0000)]
Updated generic tab styles and js to force accessible usage
Added use of more accessible tags to create tabbed-interfaces then
updated css and JS to require use of those attributes rather than custom
techniques.
Updated relevant parts of app.
Some custom parts using their own tabs though, something to improve in
future.
Dan Brown [Fri, 27 Jan 2023 17:06:39 +0000 (17:06 +0000)]
Made book-sort changes based on screen reader testing
- Removed having sort items in tabbing order since they have no action.
- Updated "show other books" list to add upon single selection since it
was not clear how these were added (double press) without then seeing
the add button, and even then the add button would be after the scroll
list.
Dan Brown [Fri, 27 Jan 2023 11:16:17 +0000 (11:16 +0000)]
Improves sortable ux
- Fixes multi-select functionality.
- Updated other books to be sticky.
- Added some general intro/desc text.
- Updated sort boxes to be collapsible.
- Cleaned up other books styling.
Dan Brown [Thu, 26 Jan 2023 16:10:47 +0000 (16:10 +0000)]
Tweak tag list to add new row on input instead of change
Prevented interferance with the user's action if they interacted with
something below the tags, since a new row would be added on blur and
hence shift down positions.
Dan Brown [Thu, 26 Jan 2023 12:16:23 +0000 (12:16 +0000)]
Added better drawing load failure handling
Failure of loading drawings will now close the drawing view and show an
error message, hinting at file or permission issues, instead of leaving
the user facing a continuosly loading interface.
Adds test to cover.
This also updates errors from our HTTP service to be wrapped in a custom
error type for better identification and so the error is an actual
javascript error. Should be object compatible.
Dan Brown [Tue, 24 Jan 2023 20:42:20 +0000 (20:42 +0000)]
Addressed fallback override cases found during testing
Had misalignment between query and usercan, The nuance between fallback
and entity-role permissions was not taken into account by the query
system. Now added with new test cases to cover.
Dan Brown [Tue, 24 Jan 2023 14:55:34 +0000 (14:55 +0000)]
Implemented alternate approach to current joint_permissions
Is a tweak upon the existing approach, mainly to store and query role
permission access in a way that allows muli-level states that may
override eachother. These states are represented in the new PermissionStatus
class.
This also simplifies how own permissions are stored and queried, to be
part of a single column.
Dan Brown [Sat, 21 Jan 2023 13:03:47 +0000 (13:03 +0000)]
Made adjustments to fit copied work into dev branch
Ported non-compatible elements, Now all tests passing apart from some
specific permission scenario tests which are probably correctly failing.
Updates some tests to better avoid messing environment state.
Dan Brown [Mon, 16 Jan 2023 16:54:53 +0000 (16:54 +0000)]
Fixed incorrect pluralisation for de_informal
Updated language system to only use initial part of locale for
translation pluralisation to better match the hard-coded logic of the
built-in MessageSelector. Extends and overrides Laravel's default for
this system.
Dan Brown [Fri, 16 Dec 2022 17:44:13 +0000 (17:44 +0000)]
Fixed not being able to remove all user roles
User roles would only be actioned if they existed in the form request,
hence removal of all roles would have no data to action upon.
This adds a placeholder 0-id role to ensure there is always role data to
send, even when no roles are selected. This field value is latter
filtered out.
Dan Brown [Mon, 28 Nov 2022 12:38:30 +0000 (12:38 +0000)]
Cleaned up dark mode styles inc. setting browser color scheme
Forces browser colorscheme based on BookStack color scheme, via
'color-scheme' css property.
Sets proper dark mode colors for some previously missed areas like
templates and attachment control buttons.
Also fixed search bar icon position for some search inputs.