Thomas Kuschan [Fri, 30 Jun 2023 07:33:53 +0000 (09:33 +0200)]
API Docs: Add book_slug to Example Responses
Remove the book attribute in responses because it is never returned by the API. Currently, Chapters Create does not return book_slug! (The example response is consistent with the inconsistent API behavior)
Dan Brown [Wed, 28 Jun 2023 22:28:31 +0000 (23:28 +0100)]
WYSIWYG: Fixed growing rows on Firefox
Occured when the cell contained any block content with a differnt line
height to the table cell itself.
In firefox, cells with a height would end up with an actual greater
real cell height, which messed up TinyMCE resize calculations, causing
tables to grow.
Adding default vertical-align: top, changes this behaviour to get proper
cell heights.
Related to Firefox issue: https://bugzilla.mozilla.org/show_bug.cgi?id=569645
Have tested that editor cell text align options can still be used with
this.
Dan Brown [Sun, 25 Jun 2023 22:22:49 +0000 (23:22 +0100)]
Shelf permissions: Removed unused 'create' permission from view
Was causing confusion.
Added test to cover.
Also added migration to remove existing create entries to pre-emptively
avoid issues in future if 'create' is used again.
Dan Brown [Sat, 24 Jun 2023 10:27:18 +0000 (11:27 +0100)]
Mail Config: Updated how TLS is configured
After full review of current MAIL_ENCRYPTION usage in laravel and
smyfony mailer, this updates the options in BookStack to be simplified
and specific in usage:
- Removed mail.mailers.smtp.encryption option since it did not actually
affect anything in the current state of dependancies.
- Updated MAIL_ENCRYPTION so values of tls OR ssl will force-enable tls
via 'scheme' option with laravel passes to the SMTP transfport, which
Smyfony uses as an indicator to force TLS.
When MAIL_ENCRYPTION is not used, STARTTLS will still be attempted by
symfony mailer.
Updated .env files to refer to BookStack docs (which was updated for
this) and to reflect correct default port.
Related to #4342
Fixes issue where providing owner_id alongside certain
fallback_permissions would cause the owner change not to take affect,
due to bad variable shadowing.
Thomas Kuschan [Wed, 14 Jun 2023 12:09:52 +0000 (14:09 +0200)]
Modify HttpFetchException handle to log exception
Within the flow of HttpFetchException, the actual exception from curl is preserved and logged. Make HttpFetchException a pretty exception for when it is shown to users.
Dan Brown [Tue, 13 Jun 2023 14:52:33 +0000 (15:52 +0100)]
CSS: Updated status colors to be CSS variables, Added dark variants
Needed some level of harcoding though due to callouts using colors,
which can't be css colors as DOMPDF won't understand these.
Use css variables elsewhere and added new dark variants to fit a bit
better.
Dan Brown [Mon, 12 Jun 2023 15:45:30 +0000 (16:45 +0100)]
Added activity text for each activity type
Ensures some sensible text is always in webhook text data.
Also aligned some notification reporting to use centralised activity
system instead of custom success events.
Dan Brown [Sat, 10 Jun 2023 14:08:07 +0000 (15:08 +0100)]
Search: Updated popular items query, load parent book for chapters/pages
Primarily intended to show parent book for chapters when moving/copying
pages, since the default parent selector interfaces, which used the
entity-selector search endpoint, would run this popular query when no
term was present as a default backup.
Dan Brown [Sat, 10 Jun 2023 10:37:01 +0000 (11:37 +0100)]
Permissions: Updated guest user handling so additional roles apply
Previously additional roles would only partially apply (system or "all"
permissions). This aligns the query-handling of permissions so that
additional roles will be used for permission queries.
Adds migration to detach existing roles as a safety precaution since
this is likely to widen permissions in scenarios that the public user
has other roles assigned already.
- Updated pointer to move within content DOM so that you can back-focus
into the pointer if desired.
- Added new "Section select mode" which toggles focusabiltiy for main
content sections, with ability to show pointer via enter press on
these.
- Updated pointer with proper input/button labelling.
Tested via orca screen reader on Firefox/Fedora/Gnome.
For #3975
Dan Brown [Tue, 30 May 2023 12:10:05 +0000 (13:10 +0100)]
Altered ldap_connect usage, cleaned up LDAP classes
Primarily updated ldap_connect to avoid usage of deprecated syntax.
Updated tests and service to handle as expected.
Cleaned up syntax and types in classes while there.
Dan Brown [Mon, 29 May 2023 14:50:36 +0000 (15:50 +0100)]
Image manager: cleaned up style changes, dark mode support
- Updated tab handling to be smarter on initial tab selection, to first
target non-hidden tab panels where they may be handled server-side.
- Extracted contained search box handling styles to _forms.scss, after
merging with image-manager-specific styles since this is only usage of
contained variant.
- Aligned focus handling on image manager UI elements.
Dan Brown [Sun, 28 May 2023 16:32:22 +0000 (17:32 +0100)]
Added the ability to replace existing image files
- Updated UI with image form dropdown containing delete and replace
image actions.
- Adds new endpoint and service/repo handling for replacing existing
image.
- Includes tests to cover.
Dan Brown [Sat, 27 May 2023 15:58:10 +0000 (16:58 +0100)]
Image manager: supported a tabbed interface on mobile
Makes interface relatively usable now on mobile sizes.
Required updating of tab handling to support tabs being active at only
mobile screen sizes, include change on resize, upon support for
potentially nested tab usage.
Tab component will now search within sensible depths for finding its own
tabs and panels to control.
Dan Brown [Mon, 22 May 2023 13:05:07 +0000 (14:05 +0100)]
Updated code view block line highlighting to only show on focus
The default 1st line highlighting confused users when existing on
read-only blocks as it was not clear this represented the active line.
This changes the highlight to only show when the block is focused upon.