1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-10-27 18:52:58 +03:00

2983 Commits

Author SHA1 Message Date
Dan Brown
97fe7cca9d View Blocks: Added base implementation class
Also removed unused imports from app/ classes.
2026-09-21 13:03:18 +01:00
Dan Brown
47313ddc8f Content Pointer: Change insert location based on selection dir
Updates the content pointer behaviour so it's inserted before/after the
target, instead of just before, depending on selection direction, so it
can stay out of the selection range.
Positioning is absolute relative to a parent content so visually should
be the same result as before.

For #6214
2026-09-16 17:53:48 +01:00
Dan Brown
82b9472554 A11y: Review of #6173, ensure checkboxes are labelled
This specifically alters the checkbox label implementation to use the
existing checkbox label instead of always adding an extra label to the
custom checkbox element itself, unless they diverge (like for permission
checkboxes).
2026-09-15 19:20:14 +01:00
Dan Brown
aa44f3508d Merge branch 'MHameed-improve-checkbox-accessibility' into development 2026-09-15 18:05:24 +01:00
Dan Brown
7782ea00df A11y: Improved alt tag usage for header logo
Set to blank if text is already part of the header, and the app name if
the name is not shown in the header.

For #6171
References:
https://webaim.org/techniques/alttext/
https://www.scottohara.me/blog/2018/05/05/hidden-vs-none.html
2026-09-15 12:07:00 +01:00
Dan Brown
1498c2fa35 JS: Fixed failing test after lexical changes 2026-09-09 10:18:14 +01:00
Dan Brown
17f5e9bfa7 Lexical: Fixed node resizer not reacting to content size changes 2026-09-09 10:10:48 +01:00
Dan Brown
b869c6a78e Lexical: Prevented link entity selector overwriting existing link text
It now retains existing input where set.
This also updates the modal click handling with an extra click source
check to handle cases where a mousedown event is not emitted, like on
select list dismissals.
2026-09-08 00:28:47 +01:00
Dan Brown
1902a291b3 Lexical: Fixed ability to cut/copy/drag+drop details nodes
Required updating the selection management to ensure they are selected
upon mousedown, for when a drag operation starts.
Also added draggable management, which we have to avoid having there
when open unless a drag is started, otherwise contents are not editable
in chromium browsers.
2026-09-07 19:37:26 +01:00
Dan Brown
88e7748621 Lexical: Set details node as a shadow root
Fixes issues with list creation inside details elements.
2026-09-07 17:11:03 +01:00
Dan Brown
ff9755a32d Lexical: Fixed modals closing on clicks starting from within modals
Specifically on chromium browsers. Firefox was fine before.
Changes tested across both.
2026-09-07 16:13:09 +01:00
Dan Brown
bb76d14f82 Lexical: Updated pop up form fields to be wider
Better matches the old editor, and makes long input data like URLs more
usable.
2026-09-07 15:56:20 +01:00
Dan Brown
e08f11d6ff Lexical: Added clipboard/drag handling for single nodes
Fixes behaviour when using cut/copy/drag for items like images or code
blocks.

Also updates history handling to not ignore additions where original
content remains unchanged.
2026-09-07 12:24:28 +01:00
Dan Brown
f8c2ada021 Lexical: Fixed difference in line break in-editor & on export
Aligned the linebreak exportdom behaviour to align with how the
reconciler displays line breaks in the editor, by adding an extra line
break to each series of line breaks, so they're now visually the same
across editor and export.
2026-09-06 19:19:44 +01:00
Dan Brown
df40d8c08a Lexical: Made callout formatting in lists more reliable
Updates the callout toggle action to consider callouts in lists (and
other callouts) when making changes.
2026-09-05 18:52:49 +01:00
Dan Brown
9b56295dfd Lexical: Fixed formatting on reverse selection ranges in lists
Block formatting on range selection could break when made from bottom to
top, due to using the first selected for insertion position instead of
the first in the doc structure.
2026-09-05 18:15:57 +01:00
Dan Brown
e573d2458b Lexical: Added enter/shift+enter handling for images in list items
Added testing to cover
2026-09-04 15:16:01 +01:00
Dan Brown
74e271c639 Lexical: Added missing code block direction handling
Adds some base text direction handling to decorator nodes which can be
used by nodes where it makes sense, like for the code block node.
2026-09-03 19:18:07 +01:00
Dan Brown
4d5e9fc8c4 Lexical: Fixed re-focus after modal in some cases
Updated code editor display so the editor area actually gains focus
again.
Updated modal handling to delegate focus handling to the editor if focus
was on the edit area before, to prevent cursor jumps to the start.
2026-09-03 18:53:08 +01:00
Dan Brown
7539933d48 User Account: Require existing password on password change
For #6181
Just in users' my account area for now.
To add to admin-level actions in the future once we can better trace
session life.
Updated/added tests to cover.
2026-08-28 11:43:07 +01:00
Dan Brown
4a871811e9 API: Added changelog support to page create/update API
Also changed the UI based forms to submit as changelog instead of
summary to align with more sensible name used on the API.
Added testing to cover.

For #6162
2026-08-28 10:48:04 +01:00
Dan Brown
35b6f57912 API Docs: Added new endpoints to download docs as html/json
Had to rename underlying controller method to prevent name clashing.
2026-08-26 15:20:36 +01:00
Dan Brown
ff21f6b97c Merge pull request 'Configurable block layouts' (#6179) from sidebar_management into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6179
2026-08-25 14:11:14 +02:00
Dan Brown
a5261f100d Merge pull request 'Added page scroll based progress indicator' (#6176) from progress_indicator into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6176
2026-08-25 14:09:10 +02:00
Dan Brown
fbe83a1895 Drawings: Validated drawing upload content as image data
Specifically check the mime type of Base64 drawing data to ensure
that it reads as image data rather than anything else which could be
potentially dangerous.

Thanks to Emanuele Cervelli (https://github.com/M4nu02) for reporting.
2026-08-19 16:53:47 +01:00
Dan Brown
2c300d8f15 Layouts: Checked text, mobile view and dark mode use 2026-08-17 11:52:22 +01:00
Dan Brown
e16a4b2aaf Layouts: Moved editor controls into dropdown
Also added user advice on two-column layouts about how they stack on
mobile.
Changed how fixed dropdowns work, so they instead remain in place to
their events and dom handling does not need special handling.
Updated keyboard navigation so ignore elements which are hidden via CSS.
2026-08-16 18:36:38 +01:00
Dan Brown
404e048588 Layouts: Added reset to default action, made views dynamic
Shows only one homepage option depending on app homepage setting.
Only shows center column in editor for supported locations.
2026-08-16 14:12:30 +01:00
Dan Brown
01b29515c8 Layouts: Updated view block ids/labels to be static
So that their metadata can be read without having to create instances
and fullfill dependancy injection just to list.

Also added title to interface prefs page.
2026-08-16 10:41:43 +01:00
Dan Brown
b1c1cd134c Layouts: Added user preference load logic 2026-08-15 23:05:32 +01:00
Dan Brown
9dfa885745 Layout Editor: Added front-end logic 2026-08-15 16:50:12 +01:00
Dan Brown
10cf128598 Layouts: Started edit form ui, added block IDs 2026-08-12 15:43:00 +01:00
Dan Brown
78610a2a14 Layouts: Started building views/actions for layout configuration 2026-08-11 16:43:56 +01:00
Dan Brown
c79997e552 User Prefs: Added handling for lang and display mode
Included test to cover.
2026-08-11 14:32:18 +01:00
Dan Brown
3205e73bb9 User Prefs: Added new interface preferences section 2026-08-10 19:18:05 +01:00
Dan Brown
600497b110 Views: Extracted home view sections into blocks
Also removed unused request from block interface.
2026-08-09 15:12:07 +01:00
Dan Brown
e3ebcb2250 Views: Extracted homepage sections into their own views 2026-08-09 11:54:42 +01:00
Dan Brown
d4d90cc39c Views: Renamed SidebarSections to ViewBlocks 2026-08-07 16:00:04 +01:00
Dan Brown
b462c67e2f Views: Extracted sidebar blocks for main entity pages 2026-08-07 12:54:38 +01:00
Dan Brown
dead0bfb5f Views: Extracted books index/show sidebar sections 2026-08-07 08:32:27 +01:00
Dan Brown
26a3cb8b7e Views: Started implementation of new sidebar back-end 2026-08-06 15:32:17 +01:00
Dan Brown
36fe7c375f JS: Converted back-to-top component to TS 2026-08-02 16:20:11 +01:00
Dan Brown
fa27485b22 Front End: Added page scroll progress indicator to back-to-top element 2026-08-02 16:06:51 +01:00
Mesar Hameed
9a242ca449 Views: Added translatable aria-labels for role permission checkboxes
Role permission checkboxes (shelves, books, chapters, pages, revisions,
images, attachments) used short labels like 'Own' and 'All' for their
aria-labels. Screen readers would announce these without any context
about what resource or action the permission applies to.

Added 'role_permission_aria' translation key with the pattern
':action :resource: :value' and updated all permission row templates
to use trans() with parameters. This gives translators full control
over word order and separators while providing screen readers with
descriptive labels like 'Create books: All'.
2026-07-16 07:01:31 +00:00
Mesar Hameed
16e60b3939 Views: Added aria-labels to custom checkbox components for screen readers
The custom checkbox components (custom-checkbox.blade.php and
toggle-switch.blade.php) use a <span role="checkbox"> as the
visual/interactive element while hiding the native <input type="checkbox">
with display:none. The span had no accessible name, so screen readers
would announce "checkbox" without any label context.

Added aria-label to the role="checkbox" span in both templates.
Also added optional  parameter to custom-checkbox that
falls back to  when not provided, allowing callers to supply
a more descriptive accessible name.
2026-07-16 07:01:06 +00:00
Dan Brown
0de1196b62 Page Editor: Minor fixes
- Removed unused import
- Added some trailing newlines to code files
- Prevented <hr>s confusing logic in MD editor
- Aligned logic to select end of header across editors
2026-05-26 13:28:40 +01:00
Dan Brown
99e405f80f Page Editor: Added contents click handling for TinyMCE editor 2026-05-26 12:58:48 +01:00
Dan Brown
c58eb91893 Page Editor: Added contents view click logic
Added jump-to-header logic for lexical WYSIWYG, and both codemirror &
plaintext markdown editor windows.
2026-05-20 12:12:38 +01:00
Dan Brown
49aa025012 Page Editor: Started contents view in toolbox
Added visual system, not yet added on-click logic.
Related to #4218
2026-05-19 17:56:48 +01:00
Dan Brown
39a14cff8f User MFA: Reviewed addition of reset, added tests
Review of #6056
Added test coverage.
2026-05-17 13:05:50 +01:00