Apostrophe2 v3.18.0 Release Notes
Release Date: 2022-05-03 // about 2 years ago-
โ Adds
- Images may now be cropped to suit a particular placement after selecting them. SVG files may not be cropped as it is not possible in the general case.
- ๐
Editors may also select a "focal point" for the image after selecting it. This ensures that this particular point remains visible even if CSS would otherwise crop it, which is a common issue in responsive design. See the
@apostrophecms/image
widget for a sample implementation of the necessary styles. - โ Adds the
aspectRatio
option for image widgets. When set to[ w, h ]
(a ratio of width to height), images are automatically cropped to this aspect ratio when chosen for that particular widget. If the user does not crop manually, then cropping happens automatically. - โ Adds the
minSize
option for image widgets. This ensures that the images chosen are at least the given size[ width, height ]
, and also ensures the user cannot choose something smaller than that when cropping. - Implements OpenTelemetry instrumentation.
- 0๏ธโฃ Developers may now specify an alternate Vue component to be used for editing the subfields of relationships, either at the field level or as a default for all relationships with a particular piece type.
- ๐ป The widget type base module now always passes on the
components
option as browser data, so that individual widget type modules that support contextual editing can be implemented more conveniently. - ๐ป In-context widget editor components now receive a
focused
prop which is helpful in deciding when to display additional UI. - โ Adds new configuration option -
beforeExit
async handler. - ๐ Handlers listening for the
apostrophe:run
event are now able to send an exit code to the Apostrophe bootstrap routine. - ๐ Support for Node.js 17 and 18. MongoDB connections to
localhost
will now successfully find a typical dev MongoDB server bound only to127.0.0.1
, Apostrophe can generate valid ipv6 URLs pointing back to itself, andwebpack
andvue-loader
have been updated to address incompatibilities. - โ Adds support for custom context menus provided by any module (see
apos.doc.addContextOperation()
). - ๐ The
AposSchema
component now supports an optionalgeneration
prop which may be used to force a refresh when the value of the object changes externally. This is a compromise to avoid the performance hit of checking numerous subfields for possible changes every time thevalue
prop changes in response to aninput
event. - โ Adds new event
@apostrophecms/doc:afterAllModesDeleted
fired after all modes of a given document are purged.
๐ Fixes
- ๐ Documentation of obsolete options has been removed.
- ๐ Dead code relating to activating in-context widget editors have been removed. They are always active and have been for some time. In the future they might be swapped in on scroll, but there will never be a need to swap them in "on click."
- ๐ง The
self.email
method of modules now correctly accepts a defaultfrom
address configured for a specific module via thefrom
subproperty of theemail
option to that module. Thanks tochmdebeer
for pointing out the issue and the fix. - ๐ Fixes
_urls
not added on attachment fields when pieces API index is requested (#3643) - ๐ Fixes float field UI bug that transforms the value to integer when there is no field error and the first number after the decimal is
0
. - The
nestedModuleSubdirs
feature no longer throws an error and interrupts startup if a project contains both@apostrophecms/asset
andasset
, which should be considered separate module names.