]> BookStack Code Mirror - website/blob - content/blog/2023/bookstack-release-v23-01.md
Switched discord/mastodon links to site redirects
[website] / content / blog / 2023 / bookstack-release-v23-01.md
1 +++
2 categories = ["Releases"]
3 tags = ["Releases"]
4 title = "BookStack Release v23.01"
5 date = 2023-01-31T11:45:00Z
6 author = "Dan Brown"
7 image = "/images/blog-cover-images/unsplash/snow-doggo-tadeusz-lakota.jpg"
8 slug = "bookstack-release-v23-01"
9 draft = false
10 +++
11
12 To start off our releases for the year we have BookStack v23.01 which adds many user experience enhancements &
13 options while also making subtle further back-end changes to permissions.
14
15 * [Update instructions](https://www.bookstackapp.com/docs/admin/updates)
16 * [GitHub release page](https://github.com/BookStackApp/BookStack/releases/tag/v23.01)
17
18 **Upgrade Notices**
19
20 - **Permission Changes** - There have been changes to the permission system which can affect how permissions apply and therefore could lead to changes in provided abilities upon upgrade. This is only really relevant to complex permission scenarios that have only been possible since BookStack v22.10. Please see the [Permission System Changes](#permission-system-changes) section below for more details on this.
21 - **Database Upgrade Time** - Changes to the permission system have required permissions to be regenerated upon upgrade. Due to this, the `php artisan migrate` upgrade step may take extra time to run, especially where there are a lot of content and/or roles in the system.
22
23 {{<yt W7I2Hlcj1QA>}}
24
25 ### App Icon Control
26
27 We have a new customization setting!
28 This addition allows the upload and easy use of a custom application icon that will be utilized
29 by browsers as the tab icon, or often by mobile devices to use as an "App" icon when creating a
30 webpage shortcut.
31
32 ![Screenshot of an "Application Icon" setting with a preview image showing a cat](/images/2023/01/app_icon_setting.png)
33
34 This is a separate option to the application logo since they're used in different areas in different ways,
35 and the icon is expected to be a fixed-square size whereas the logo may vary in aspect ratio.
36 Upon upload BookStack resizes the provided image into a range of sizes for good general compatibility
37 across different browsers, devices and platforms. 
38
39 ![A row of mobile app icons, with a BookStack-labelled cat icon in the centre](/images/2023/01/mobile_app_icon.webp)
40
41 While you could already hack-in a custom icon via various means, this should make it much easier and accessible
42 to those that don't want to hack about with code or web-servers.
43
44 ### New Color Scheme Controls
45
46 Continuing the theme of customization settings, the provided color options have had a significant revamp.
47 The main addition is that different controls are now available for light and dark mode, meaning you can
48 set different colors to best suit the mode and theme.
49
50 ![View of a "Application Color Scheme" panel with color controls and separate dark & light mode sections](/images/2023/01/app_color_scheme.png)
51
52 To support choosing good colors, the interface will jump between light or dark mode as you select the relevant tabs.
53 It was always tricky to select colors that worked well cross-theme, while ensuring good contrast and legibility,
54 so hopefully this will be quite a welcome addition to address that concern.
55
56 A more subtle addition to the color controls is a new "Default Link Color" option.
57 Links and actions within the interface would previously use the primary color, but this could be problematic
58 since the primary color was also used for many non-text focused use-cases such as the header banner and other decorations
59 which made choosing a color, which worked well across all these areas, difficult to achieve.
60 Splitting these out now provides a little more control to get the right look with great usability.
61
62 ![Screenshot of a page view in BookStack, showing different colors between the actions sidebar and header banner](/images/2023/01/app_link_color_usage.png)
63
64 BookStack has set new defaults for the dark-mode colors, but those upgrading will find their color settings 
65 auto-copied across to ensure minimal change upon system update, although you can just then change these settings thereafter.
66
67
68 ### Book Sorting Experience Upgrades
69
70 The book sort interface has received a fair bit of attention to make the experience more pleasant than ever.
71 The changes here were primarily to ensure usability via screen-reader and keyboard-only-use, but such changes can
72 have a positive impact to all. Changes include:
73
74 - Sort items will now show up & down buttons to allow quick sorting without drag+drop.
75 - A new menu on sort-items provides a range contextual actions such as "Move to Next Book" or "Move to Previous Chapter".
76 - Multi-select and drag, once previously available but since broken, has now been fixed.
77 - The "Other books" sidebar is now sticky on desktop, meaning you don't need to scroll back up to find this box when sorting long books.
78 - The "book" sort boxes are now collapsible, which is useful when sorting multiple large books. 
79 - Sort items show drag-handles to make it clear you're able to drag & drop.
80 - Some intro text has been added to help guide users. 
81
82 ![Screenshot of the BookStack sort view for a book, featuring a collapsed book and a dropdown menu providing move actions for a page](/images/2023/01/book_sort.png)
83
84 ### Code Language Additions
85
86 Since the original v22.11 release a few new code languages have been added for code-highlighting and code-editor support:
87
88 - Scheme
89 - SQL variants: MySQL, MSSQL, PostgreSQL, SQLite
90 - Twig (PHP Templating Engine)
91 - Smarty (PHP Templating Engine)
92
93 ![Screenshot of the BookStack code editor, showing "Twig" templating code being correctly highlighted](/images/2023/01/twig_code.png)
94
95 ### OIDC Auth ID Configuration Option
96
97 When Open ID Connect (OIDC) is used BookStack will store the unique ID of a user for later BookStack-to-identity-provider
98 user matching. It would do this using the `sub` ID Token claim as per the OIDC standards.
99 OIDC is a pretty good, modern, and well-defined standard, so this works absolutely fine for the majority of use-cases.
100
101 Unfortunately, as I have learnt from our other auth systems, Active Directory never likes to make life simple.
102 By default AzureAD will use a `sub` claim value that's per-application-per-user unique, which makes it hard to predict
103 ahead-of-use by admins that may want to manually connect up existing users.
104 That said, AzureAD will also provide a `upn` claim that's just per-user unique, but this is a non-standard claim.
105
106 To support such  a scenario, we've added an option to set the claim name to be used as the ID:
107
108 ```bash
109 OIDC_EXTERNAL_ID_CLAIM=upn
110 ```
111
112 A [section has been added](/docs/admin/oidc-auth/#using-a-different-id-claim) to the docs to detail its use.
113
114
115 ### Permission System Changes
116
117 A large amount of time over the last two months was spent on revamping permissions in an effort to allow user-specific content permissions.
118 Unfortunately, this hit some performance & complexity blockers so is not something to be included at this time but it did lead me to discover
119 a range of complex permission scenarios for which the logic was inconsistent or could be based on assumption.
120 Such problematic scenarios were primarily [introduced as of BookStack v22.10](/blog/bookstack-release-v22-10/#redesigned-content-permission-control)
121 since this added the ability to combine role permissions with other permission controls.
122
123 Diving into this, I decided to spend time defining exactly how permissions should interplay to ensure consistency.
124 This was developed alongside a range of [scenario definitions](https://github.com/BookStackApp/BookStack/blob/8367a94e90e5e1bf7d06defe30d570ade2f00599/dev/docs/permission-scenario-testing.md), 
125 each of which is backed by automated functional application tests of our permission systems.
126
127 Our "Roles and Permissions" documentation page has been updated with [a new section](/docs/user/roles-and-permissions/#advanced-permission-logic) 
128 to provide a functional overview of how permissions are applied in more complex cases.
129
130 These changes do mean that, upon upgrade, permissions resolution for content may differ to that of previous versions of BookStack
131 although this should only be in very complex cases that have only been possible since BookStack v22.10.
132 I very much don't like to introduce changes to permissions & existing access control, since providing a stable upgrade path is very important to me,
133 but the changes here were required due to current inconsistent handling.
134
135 ### Translations
136
137 A humongous heap of thanks once again to all the below people that have helped translate BookStack 
138 text since the original v22.11 release:
139
140 - RandomUser0815 - *German Informal*
141 - Matthias Mai (schnapsidee) - *German; German Informal*
142 - 10935336 - *Chinese Simplified*
143 - Naoto Ishikawa (na3shkw) - *Japanese*
144 - Maciej Lebiest (Szwendacz) - *Polish*
145 - m0uch0 - *Spanish*
146 - Pafzedog - *French*
147 - Angelos Chouvardas (achouvardas) - *Greek*
148 - Xabi (xabikip) - *Basque*
149 - David Furman (thefourCraft) - *Hebrew*
150 - Indrek Haav (IndrekHaav) - *Estonian*
151 - Jan Mitrof (jan.kachlik) - *Czech*
152 - Martin Sebek (sebekmartin) - *Czech*
153 - Adrian Ocneanu (aocneanu) - *Romanian*
154 - sdhadi - *Persian*
155 - scureza - *Italian*
156 - SmokingCrop - *Dutch*
157 - rndrss - *Portuguese, Brazilian*
158 - Eduardo Castanho (EduardoCastanho) - *Portuguese*
159 - VIET NAM VPS (vietnamvps) - *Vietnamese*
160 - rirac294 - *Russian*
161 - m4tthi4s - *French*
162
163 ### Next Steps
164
165 The next release will be relatively boring. I'm dedicating the slightly shorter month to updating our framework 
166 and some libraries used so we're not falling too far behind. 
167 As part of this, the minimum version of PHP will be increased to PHP 8.0, so some work will be going into supporting
168 our main installation routes & scripts with upgrade path guidance.
169
170 As touched upon in the v22.11 release post, I've started building a "Hacks" area of the site to centrally store and share 
171 various customizations that I've provided using the theme systems and other methods. 
172 I'll likely soon write another blogpost to specific detail this once ready.
173
174 ### BookStack on Mastodon
175
176 On a somewhat unrelated note, I recently set-up an official Mastodon account for BookStack
177 which can be found at [@[email protected]](https://www.bookstackapp.com/links/mastodon).
178
179 I was originally quite stubborn on setting this up, after users requested we move from Twitter, since I was instead hoping that Twitter would at least meet its downfall first
180 so it wouldn't add yet another social channel to manage.
181 After begrudgingly setting up the account, i've quickly become quite fond of Mastodon due to the user control provided
182 and lack of algorithm so have since also [personally moved across](https://fosstodon.org/@danb).
183 The BookStack Twitter account will remain active and used, at least for now.
184
185 ### Full List of Changes
186
187 **Released in v23.01**
188
189 * Added ability to control app icon (favicon) via settings. ([#3994](https://github.com/BookStackApp/BookStack/pull/3994), [#3929](https://github.com/BookStackApp/BookStack/issues/3929), [#301](https://github.com/BookStackApp/BookStack/issues/301))
190 * Added ability to set separate colors for dark mode. ([#2314](https://github.com/BookStackApp/BookStack/issues/2314), [#4002](https://github.com/BookStackApp/BookStack/pull/4002))
191 * Added ability to set separate colors for primary color and links. ([#3910](https://github.com/BookStackApp/BookStack/issues/3910), [#4002](https://github.com/BookStackApp/BookStack/pull/4002))
192 * Added accessible controls to book sorting & improved user experience. ([#3999](https://github.com/BookStackApp/BookStack/pull/3999), [#3987](https://github.com/BookStackApp/BookStack/issues/3987))
193 * Added Scheme code highlight support. ([#3954](https://github.com/BookStackApp/BookStack/issues/3954))
194 * Added SQL variant code highlighting support. ([#3942](https://github.com/BookStackApp/BookStack/issues/3942))
195 * Added ability to configure an ID claim for OIDC. ([#3914](https://github.com/BookStackApp/BookStack/issues/3914))
196 * Updated permission handling to be better defined and predictable. ([#3986](https://github.com/BookStackApp/BookStack/pull/3986))
197 * Updated tag handling to show new row earlier. ([#3931](https://github.com/BookStackApp/BookStack/issues/3931))
198 * Updated translations with latest Crowdin changes. ([#3925](https://github.com/BookStackApp/BookStack/pull/3925))
199 * Updated codebase to address a range of PHP deprecations. ([#3969](https://github.com/BookStackApp/BookStack/issues/3969))
200 * Updated internal testing to run OIDC tests faster. ([#3985](https://github.com/BookStackApp/BookStack/issues/3985))
201 * Fixed header search results preview not being clickable in Safari. ([#3926](https://github.com/BookStackApp/BookStack/issues/3926))
202 * Fixed informal German not receiving correct pluralisation. ([#3976](https://github.com/BookStackApp/BookStack/issues/3976))
203 * Fixed lack of drawing access leading to infinite loading. ([#3955](https://github.com/BookStackApp/BookStack/issues/3955))
204 * Fixed user image id existing after user avatar removal. ([#3977](https://github.com/BookStackApp/BookStack/issues/3977))
205
206
207 **Released in v22.11.1**
208
209 * Added smarty and twig template code language support. Thanks to [@jhit](https://github.com/BookStackApp/BookStack/pull/3879). ([#3879](https://github.com/BookStackApp/BookStack/pull/3879))
210 * Updated translations with latest Crowdin changes. ([#3881](https://github.com/BookStackApp/BookStack/pull/3881))
211 * Fixed global search focus issue with arrow keys. ([#3920](https://github.com/BookStackApp/BookStack/issues/3920))
212 * Fixed lack of scroll in editor sidebar views. ([#2887](https://github.com/BookStackApp/BookStack/issues/2887))
213 * Fixed not being able to remove all user roles. ([#3922](https://github.com/BookStackApp/BookStack/issues/3922))
214
215 ----
216
217 <span style="font-size: 0.8em;opacity:0.9;">Header Image Credits: <span>Photo by <a href="https://unsplash.com/de/@tadekl?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Tadeusz Lakota</a> on <a href="https://unsplash.com/photos/Xh4yVFNT5iw?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
218   </a>
219   </span></span>