Changelog History
Page 6
-
v3.0.0 Changes
June 16, 2021Breaks
- 🚚 Previously our
a3-boilerplate
project came with a webpack build that pushed code to theui/public
folder of anasset
module. Now the webpack build is not needed because Apostrophe takes care of compilingui/src
for us. This is good! However, if you are transitioning your project to this new strategy, you will need to remove themodules/asset/ui/public
folder from your project manually to ensure that webpack-generated code originally intended for webpack-dev-server does not fail with apublicPath
error in the console. - The
CORE_DEV=1
environment setting has been changed toAPOS_DEV=1
because it is appropriate for anyone who is actively developing custom Apostrophe admin UI usingui/apos
folders in their own modules. - 📚 Apostrophe now uses Dart Sass, aka the
sass
npm module. Thenode-sass
npm module has been deprecated by its authors for some time now. Most existing projects will be unaffected, but those writing their own Apostrophe UI components will need to change any/deep/
selectors to::v-deep
and consider making other Dart Sass updates as well. For more information see the Dart Sass documentation. Those embracing the newui/src
feature should also bear in mind that Dart Sass is being used.
🔄 Changes
- 🛠 Relationship ids are now stored as aposDocIds (without the locale and mode part). The appropriate locale and mode are known from the request. This allows easy comparison and copying of these properties across locales and fixes a bug with reverse relationships when publishing documents. A migration has been added to take care of this conversion on first startup.
- The
attachment
field type now correctly limits file uploads by file type when using thefileGroup
field option. - 0️⃣ Uploading SVG files is permitted in the Media Library by default.
➕ Adds
- 🔧 Apostrophe now enables you to ship frontend JavaScript and Sass (using the SCSS syntax) without your own webpack configuration.
- 💻 Any module may contain modern JavaScript in a
ui/src/index.js
file, which may useimport
to bring in other files in the standard way. Note thatui/src/index.js must export a function
. These functions are called for you in the order modules are initialized. - 💅 Any module may contain a Sass (SCSS) stylesheet in a
ui/src/index.scss
file, which may also import other Sass (SCSS) files. - 🐎 Any project that requires IE11 support for
ui/src
JavaScript code can enable it by setting thees5: true
option to the@apostrophecms/asset
module. Apostrophe produces separate builds for IE11 and modern browsers, so there is no loss of performance in modern browsers. Code is automatically compiled for IE11 usingbabel
and missing language features are polyfilled usingcore-js
so you can use promises,async/await
and other standard modern JavaScript features. ui/public
is still available for raw JavaScript and CSS files that should be pushed as-is to the browser. The best use of this feature is to deliver the output of your own custom webpack build, if you have one.- ➕ Adds browser-side
editMode
flag that tracks the state of the current view (edit or preview), located atwindow.apos.adminBar.editMode
. - 👌 Support for automatic inline style attribute sanitization for Rich Text widgets.
- ➕ Adds text align controls for Rich Text widgets. The following tools are now supported as part of a rich text widget's
toolbar
property: --alignLeft
--alignRight
--alignCenter
--alignJustify
- 👍
@apostrophecms/express
module now supports thetrustProxy: true
option, allowing your reverse proxy server (such as nginx) to pass on the original hostname, protocol and client IP address.
🛠 Fixes
- 🚑 Unit tests passing again. Temporarily disabled npm audit checks as a source of critical failures owing to upstream issues with third-party packages which are not actually a concern in our use case.
- 🛠 Fixed issues with the query builder code for relationships. These issues were introduced in beta 3 but did not break typical applications, except for displaying distinct choices for existing values of a relationship field.
- Checkbox field types can now be used as conditional fields.
- Tracks references to attachments correctly, and introduces a migration to address any attachments previously tracked as part of documents that merely have a relationship to the proper document, i.e. pages containing widgets that reference an image piece.
- Tracks the "previously published" version of a document as a legitimate reference to any attachments, so that they are not discarded and can be brought back as expected if "Undo Publish" is clicked.
- Reverse relationships work properly for published documents.
- Relationship subfields are now loaded properly when
reverseOf
is used. - "Discard Draft" is available when appropriate in "Manage Pages" and "Manage Pieces."
- ⚡️ "Discard Draft" disables the "Submit Updates" button when working as a contributor.
- 💻 Relationship subfields can now be edited when selecting in the full "manage view" browser, as well as in the compact relationship field view which worked previously.
- Relationship subfields now respect the
def
property. - ⏪ Relationship subfields are restored if you deselect a document and then reselect it within a single editing experience, i.e. accidentally deselect and immediately reselect, for instance.
- ⚠ A console warning when editing subfields for a new relationship was fixed.
- 🚚 Field type
color
'sformat
option moved out of the UI options and into the general options object. Supported formats are "rgb", "prgb", "hex6", "hex3", "hex8", "name", "hsl", "hsv". Pass theformat
string like:js myColorField: { type: 'color', label: 'My Color', options: { format: 'hsl' } }
- 🚀 Restored Vue dependency to using semantic versioning now that Vue 2.6.14 has been released with a fix for the bug that required us to pin 2.6.12.
- 🐧 Nunjucks template loader is fully compatible with Linux in a development environment.
- 👌 Improved template performance by reusing template loaders.
min
andmax
work properly for both string-like and number-like fields.- Negative numbers, leading minus and plus signs, and trailing periods are accepted in the right ways by appropriate field types.
- ✅ If a user is inadvertently inserted with no password, set a random password on the backend for safety. In tests it appears that login with a blank password was already forbidden, but this provides an additional level of certainty.
data.page
anddata.contextOptions
are now available inwidget.html
templates in most cases. Specifically, they are available when loading the page, (2) when a widget has just been inserted on the page, and (3) when a widget has just been edited and saved back to the page. However, bear in mind that these parameters are never available when a widget is being edited "out of context" via "Page Settings", via the "Edit Piece" dialog box, via a dialog box for a parent widget, etc. Your templates should be written to tolerate the absence of these parameters.- Double slashes in the slug cannot be used to trick Apostrophe into serving as an open redirect (fix ported to 3.x from 2.92.0).
- The global doc respects the
def
property of schema fields when first inserted at site creation time. - 🛠 Fixed fragment keyword arguments being available when not a part of the fragment signature.
- 🚚 Previously our
-
v3.0.0-beta.3 Changes
June 03, 2021🔒 Security Fixes
⚡️ The
nlbr
andnlp
Nunjucks filters marked their output as safe to preserve the tags that they added, without first escaping their input, creating a CSRF risk. These filters have been updated to escape their input unless it has already been marked safe. No code changes are required to templates whose input to the filter is intended as plaintext, however if you were intentionally leveraging this bug to output unescaped HTML markup you will need to make sure your input is free of CSRF risks and then use the| safe
filter before the| nlbr
or| nlp
filter.➕ Adds
- ➕ Added the
ignoreUnusedFolderWarning
option for modules that intentionally might not be activated or inherited from in a particular startup. - 👍 Better explanation of how to replace macros with fragments, in particular how to call the fragments with
{% render fragmentName(args) %}
.
🛠 Fixes
- 🚀 Temporarily pinned to Vue 2.6.12 to fix an issue where the "New" button in the piece manager modals disappeared. We think this is a bug in the newly released Vue 2.6.13 but we are continuing to research it.
- 🚑 Updated dependencies on
sanitize-html
andnodemailer
to new major versions, causing no bc breaks at the ApostropheCMS level. This resolved two critical vulnerabilities according tonpm audit
. - ✂ Removed many unused dependencies.
- The data retained for "Undo Publish" no longer causes slug conflicts in certain situations.
- Custom piece types using
localized: false
orautopublish: true,
as well as singleton types, now display the correct options on the "Save" dropdown. - The "Save and View," "Publish and View" and/or "Save Draft and Preview" options now appear only if an appropriate piece page actually exists for the piece type.
Duplicating a widget now properly assigns new IDs to all copied sub-widgets, sub-areas and array items as well.
➕ Added the
ignoreUnusedFolderWarning
option for modules that intentionally might not be activated or inherited from in a particular startup.If you refresh the page while previewing or editing, you will be returned to that same state.
🔔 Notices
- 💅 Numerous
npm audit
vulnerability warnings relating topostcss
7.x were examined, however it was determined that these are based on the idea of a malicious SASS coder attempting to cause a denial of service. Apostrophe developers would in any case be able to contribute JavaScript as well and so are already expected to be trusted parties. This issue must be resolved upstream in packages including bothstylelint
andvue-loader
which have considerable work to do before supportingpostcss
8.x, and in any case public access to write SASS is not part of the attack surface of Apostrophe.
🔄 Changes
👀 When logging out on a page that only exists in draft form, or a page with access controls, you are redirected to the home page rather than seeing a 404 message.
⬆️ Rich text editor upgraded to tiptap 2.x beta :tada:. On the surface not a lot has changed with the upgrade, but tiptap 2 has big improvements in terms of speed, composability, and extension support. See the technical differences of tiptap 1 and 2 here
- ➕ Added the
-
v3.0.0-beta.2 Changes
May 21, 2021Breaks
- ⚡️ The
updateModified: false
option, formerly supported only byapos.doc.update
, has been renamed tosetModified: false
and is now supported byapos.doc.insert
as well. If explicitly set to false, the insert and update methods will leave themodified
property alone, rather than trying to detect or infer whether a change has been made to the draft relative to the published version. - 🔧 The
permission
module no longer takes aninterestingTypes
option. Instead, doc type managers may set theirshowPermissions
option totrue
to always be broken out separately in the permissions explorer, or explicitly set it tofalse
to never be mentioned at all, even on a list of typical piece types that have the same permissions. This allows module creators to ship the right options with their modules rather than requiring the developer to hand-configureinterestingTypes
. - When editing users, the permissions explorer no longer lists "submitted draft" as a piece type.
- ✂ Removed
apos.adminBar.group
method, which is unlikely to be needed in 3.x. One can group admin bar items into dropdowns via thegroups
option. - 👍 Raw HTML is no longer permitted in an
apos.notify
message parameter. Instead,options.buttons
is available. If present, it must be an array of objects withtype
andlabel
properties. Iftype
is'event'
then that button object must havename
anddata
properties, and when clicked the button will trigger an apos bus event of the givenname
with the provideddata
object. Currently'event'
is the only supported value fortype
.
➕ Adds
- The name
@apostrophecms/any-page-type
is now accepted for relationships that should match any page. With this change, the doc type manager module name and the type name are now identical for all types in 3.x. However, for backwards compatibility@apostrophecms/page
is still accepted.apos.doc.getManager
will accept either name. - 🔧 Sets the project root-level
views
directory as the default fallback views directory. This is no longer a necessary configuration in projects unless they want to change it on the@apostrophecms/template
optionviewsFolderFallback
. - The new
afterAposScripts
nunjucks block allows for pushing markup after Apostrophe's asset bundle script tag, at the end of the body. This is a useful way to add a script tag for Webpack's hot reload capabilities in development while still ensuring that Apostrophe's utility methods are available first, like they are in production. - An
uploadfs
option may be passed to the@apostrophecms/asset
module, in order to pass options configuring a separate instance ofuploadfs
specifically for the static assets. The@apostrophecms/uploadfs
module now exports a method to instantiate an uploadfs instance. The default behavior, in which user-uploaded attachments and static assets share a single instance of uploadfs, is unchanged. Note that asset builds never use uploadfs unlessAPOS_UPLOADFS_ASSETS=1
is set in the environment. - 💻
AposButtonSplit
is a new UI component that combines a button with a context menu. Users can act on a primary action or change the button's function via menu button to the right of the button itself. - 👀 Developers can now pass options to the
color
schema field by passing apickerOptions
object through your field. This allows for modifying/removing the default color palette, changing the resulting color format, and disabling various UI. For full set of options see this example AposModal
now emits aready
event when it is fully painted and can be interacted with by users or code.- The video widget is now compatible with vimeo private videos when the domain is on the allowlist in vimeo.
🔄 Changes
- You can now override the parked page definition for the home page without copying the entirety of
minimumPark
from the source code. Specifically, you will not lose the root archive page if you park the home page without explicitly parking the archive page as well. This makes it easier to choose your own type for the home page, in lieu of@apostrophecms/home-page
.
🛠 Fixes
- Piece types like users that have a slug prefix no longer trigger a false positive as being "modified" when you first click the "New" button.
- 🚚 The
name
option to widget modules, which never worked in 3.x, has been officially removed. The name of the widget type is always the name of the module, with the-widget
suffix removed. - The home page and other parked pages should not immediately show as "pending changes."
- 💻 In-context editing works properly when the current browser URL has a hash (portion beginning with
#
), enabling the use of the hash for project-specific work. Thanks to [https://stepanjakl.com/](Štěpán Jákl) for reporting the issue. - When present, the
apos.http.addQueryToUrl
method preserves the hash of the URL intact. - The home page and other parked pages should not immediately show as "pending changes."
- 📜 The browser-side
apos.http.parseQuery
function now handles objects and arrays properly again. - 🔨 The in-context menu for documents has been refactored as a smart component that carries out actions on its own, eliminating a great deal of redundant code, props and events.
- ➕ Added additional retries when binding to the port in a dev environment.
- ⚡️ The "Submit" button in the admin bar updates properly to "Submitted" if the submission happens in the page settings modal.
- Skipping positional arguments in fragments now works as expected.
- 💅 The rich text editor now supports specifying a
styles
array with nop
tags properly. A newly added rich text widget initially contains an element with the first style, rather than always a paragraph. If no styles are configured, ap
tag is assumed. Thanks to Stepan Jakl for reporting the issue.
🔄 Changes
- ⚡️ Editor modal's Save button (publish / save draft / submit) now updated to use the
AposSplitButton
component. Editors can choose from several follow-up actions that occur after save, including creating another piece of content of the same type, being taken to the in-context version of the document, or being returned to the manager. Editor's selection is saved in localstorage, creating a remembered preference per content type.
- ⚡️ The
-
v3.0.0-beta.1 Changes
May 06, 2021Breaks
- ✂ Removes the
firstName
andlastName
fields in user pieces. - 🏗 The query parameters
apos-refresh
,apos-edit
,apos-mode
andapos-locale
are nowaposRefresh
,aposEdit
,aposMode
andaposLocale
. Going forward all query parameters will be camelCase for consistency with query builders.
🔄 Changes
- Archiving a page or piece deletes any outstanding draft in favor of archiving the last published version. Previously the behavior was effectively the opposite.
- ⚡️ "Publish Changes" button label has been changes to "Update".
- 0️⃣ Draft mode is no longer the default view for published documents.
- The page and piece manager views now display the title, etc. of the published version of a document, unless that document only exists in draft form. However a label is also provided indicating if a newer draft is in progress.
- 💅 Notifications have been updated with a new visual display and animation style.
➕ Adds
- 📚 Four permissions roles are supported and enforced: guest, contributor, editor and admin. See the documentation for details. Pre-existing alpha users are automatically migrated to the admin role.
- ⏪ Documents in managers now have context sensitive action menus that allow actions like edit, discard draft, archive, restore, etc.
- A fragment call may now have a body using
rendercall
, just like a macro call can have a body usingcall
. In addition, fragments can now have named arguments, just like macros. Many thanks to Miro Yovchev for contributing this implementation. - 🐎 Major performance improvement to the
nestedModuleSubdirs
option. - ⚡️ Updates URL fields and oEmbed URL requests to use the
httpsFix
option in launder'surl()
method. - ⚡️ Documents receive a state label based on their document state (draft, pending, pending updates)
- ⚡️ Contributors can submit drafts for review ("Submit" versus "Submit Updates").
- Editors and admins can manage submitted drafts.
- 👀 Editors and admins can easily see the number of proposed changes awaiting their attention.
- 👌 Support for virtual piece types, such as submitted drafts, which in actuality manage more than one type of doc.
- 👍 Confirm modals now support a schema which can be assessed after confirmation.
- When archiving and restoring pages, editors can chose whether the action affects only this document or this document + children
- 👍 Routes support the
before
syntax, allowing routes that are added to Express prior to the routes or middleware of another module. The syntaxbefore: 'middleware:moduleName'
must be used to add the route prior to the middleware ofmoduleName
. Ifmiddleware:
is not used, the route is added before the routes ofmoduleName
. Note that normally all middleware is added before all routes. - 0️⃣ A
url
property can now optionally be specified when adding middleware. By default all middleware is global. - 👍 The pieces REST GET API now supports returning only a count of all matching pieces, using the
?count=1
query parameter. - Admin bar menu items can now specify a custom Vue component to be used in place of
AposButton
. - 🚚 Sets
username
fields to follow the usertitle
field to remove an extra step in user creation. - ➕ Adds default data to the
outerLayoutBase.html
<title>
tag:data.piece.title or data.page.title
. - Moves the core UI build task into the start up process. The UI build runs automatically when
NODE_ENV
is not 'production' and when:- The build folder does not yet exist.
- The package.json file is newer than the existing UI build.
- You explicitly tell it to by setting the environment variable
CORE_DEV=1
- The new
._ids(_idOrArrayOfIds)
query builder replacesexplicitOrder
and accepts an array of document_id
s or a single one._id
can be used as a multivalued query parameter. Documents are returned in the order you specify, and just like with single-document REST GET requests, the locale of the_id
s is overridden by theaposMode
query parameter if present. - 🏗 The
.withPublished(true)
query builder adds a_publishedDoc
property to each returned draft document that has a published equivalent.withPublished=1
can be used as a query parameter. Note this is not the way to fetch only published documents. For that, use.locale('en:published')
or similar. - 📦 The server-side implementation of
apos.http.post
now supports passing aFormData
object created with the[form-data](https://www.npmjs.com/package/form-data)
npm module. This keeps the API parallel with the browser-side implementation and allows for unit testing the attachments feature, as well as uploading files to internal and external APIs from the server. - 🚚
manuallyPublished
computed property moved to theAposPublishMixin
for the use cases where that mixin is otherwise warranted. columns
specified for a piece type's manage view can have a name that uses "dot notation" to access a subproperty. Also, for types that are localized, the column name can begin withdraft:
orpublished:
to specifically display a property of the draft or published version of the document rather than the best available. When a prefix is not used, the property comes from the published version of the document if available, otherwise from the draft.- 🏗 For page queries, the
children
query builder is now supported in query strings, including thedepth
subproperty. For instance you could fetch/api/v1/@apostrophecms/page/id-of-page?children=1
or/api/v1/@apostrophecms/page/id-of-page?children[depth]=3
. - 🌲 Setting
APOS_LOG_ALL_QUERIES=1
now logs the projection, skip, limit and sort in addition to the criteria, which were previously logged.
🛠 Fixes
- Fragments can now call other fragments, both those declared in the same file and those imported, just like macros calling other macros. Thanks to Miro Yovchev for reporting the issue.
- 0️⃣ There was a bug that allowed parked properties, such as the slug of the home page, to be edited. Note that if you don't want a property of a parked page to be locked down forever you can use the
_defaults
feature of parked pages. - A required field error no longer appears immediately when you first start creating a user.
- ⚠ Vue warning in the pieces manager due to use of value rather than name of column as a Vue key. Thanks to Miro Yovchev for spotting the issue.
- "Save Draft" is not an appropriate operation to offer when editing users.
- 🚚 Pager links no longer break due to
aposRefresh=1
when in edit mode. Also removed superfluousappend
query parameter from these. - You may now intentionally clear the username and slug fields in preparation to type a new value. They do not instantly repopulate based on the title field when you clear them.
- ⚡️ Language of buttons, labels, filters, and other UI updated and normalized throughout.
- 👀 A contributor who enters the page tree dialog box, opens the editor, and selects "delete draft" from within the editor of an individual page now sees the page tree reflect that change right away.
- The page manager listens for content change events in general and its refresh mechanism is robust in possible situations where both an explicit refresh call and a content change event occur.
- Automatically retries once if unable to bind to the port in a dev environment. This helps with occasional
EADDRINUSE
errors during nodemon restarts. - ⚡️ Update the current page's context bar properly when appropriate after actions such as "Discard Draft."
- ⏪ The main archive page cannot be restored, etc. via the context menu in the page tree.
- The context menu and "Preview Draft" are both disabled while errors are present in the editor dialog box.
- ⚡️ "Duplicate" should lead to a "Publish" button, not an "Update" button, "Submit" rather than "Submit Update," etc.
- When you "Duplicate" the home page you should be able to set a slug for the new page (parked properties of parked pages should be editable when making a duplicate).
- When duplicating the home page, the suggested slug should not be
/
as only one page can have that slug at a time. - Attention is properly called to a slug conflict if it exists immediately when the document is opened (such as making a copy where the suggested slug has already been used for another copy).
- "Preview Draft" never appears for types that do not use drafts.
- The toggle state of admin bar utility items should only be mapped to an
is-active
class if, like palette, they opt in withtoggle: true
- 🛠 Fixed unique key errors in the migrate task by moving the parking of parked pages to a new
@apostrophecms/migrate:after
event handler, which runs only after migrations, whether that is at startup (in dev) or at the end of the migration task (in production). - 💻 UI does not offer "Archive" for the home page, or other archived pages.
- 💻 Notification checks and other polling requests now occur only when the tab is in the foreground, resolving a number of problems that masqueraded as other bugs when the browser hit its connection limit for multiple tabs on the same site.
- Parked pages are now parked immediately after database migrations are checked and/or run. In dev this still happens at each startup. In production this happens when the database is brand new and when the migration task is manually run.
- ✂ Removes the
-
v3.0.0-alpha.7 Changes
April 07, 2021Breaks
- The
trash
property has been renamedarchived
, and throughout the UI we refer to "archiving" and the "archive" rather than "move to trash" and the "trash can." A database migration is included to address this for existing databases. However, if you set the minimumPark option, or used a boilerplate in which it is set, you will need to **change the settings for theparkedId: 'trash'
page to match those currently found in theminimumPark
option setting in the@apostrophecms/page
source code.
➕ Adds
- 💻 General UX and UI improvements to the experience of moving documents to and from the archive, formerly known as the trash.
- 🔗 Links to each piece are available in the manage view when appropriate.
- Search is implemented in the media library.
- 🔧 You can now pass core widgets a
className
option when configuring them as part of an area. - 0️⃣
previewDraft
for pieces, adds a Preview Draft button on creation for quick in-context editing. Defaults to true.
🔄 Changes
- Do not immediately redirect to new pages and pieces.
- ⏪ Restored pieces now restore as unpublished drafts.
- 🔨 Refactored the admin bar component for maintainability.
- 💅 Notification style updates
🛠 Fixes
- ⚡️ Advisory lock no longer triggers an update to the modification timestamp of a document.
- Attempts to connect Apostrophe 3.x to an Apostrophe 2.x database are blocked to prevent content loss.
- "Save as Draft" is now available as soon as a new document is created.
- Areas nested in array schema fields can now be edited in context.
- When using
apos.image.first
, the alt attribute of the image piece is available on the returned attachment object as._alt
. In addition,_credit
and_creditUrl
are available. - 🛠 Fixes relating to the editing of widgets in nested areas, both on the page and in the modal.
- ✂ Removed published / draft switch for unpublished drafts.
- "Publish Changes" appears only at appropriate times.
- 🚚 Notifications moved from the bottom right of the viewport to the bottom center, fixing some cases of UI overlap.
- The
-
v3.0.0-alpha.6 Changes
March 24, 2021➕ Adds
- You can "copy" a page or a piece via the ⠇ menu.
- When moving the current page or piece to the trash, you are taken to the home page.
- 👍
permissions: false
is supported for piece and page insert operations. - ➕ Adds note to remove deprecated
allowedInChooser
option on piece type filters. - ⏪ UX improvement: "Move to Trash" and "Restore" buttons added for pieces, replacing the boolean field. You can open a piece that is in the trash in a read-only way in order to review it and click "Restore."
- 🔒 Advisory lock support has been completed for all content types, including on-page, in-context editing. This prevents accidental conflicts between editors.
- Image widgets now accept a
size
context option from the template, which can be used to avoid sending a full-width image for a very small placement. - ➕ Additional improvements.
🛠 Fixes
- 🛠 Fixes error from missing
select
method inAposPiecesManager
component. - No more migration messages at startup for brand-new sites.
max
is now properly implemented for relationships when using the manager dialog box as a chooser.- "Trash" filter now displays its state properly in the piece manager dialog box.
- Dragging an image to the media library works reliably.
- ⚠ Infinite loop warning when editing page titles has been fixed.
- 👉 Users can locate the tab that still contains errors when blocked from saving a piece due to schema field errors.
- Calling
insert
works properly in theinit
function of a module. - ➕ Additional fixes.
Breaks
- 🔧 Apostrophe's instance of
uploadfs
has moved fromapos.attachment.uploadfs
toapos.uploadfs
. Theuploadfs
configuration option has similarly moved from the@apostrophecms/attachment
module to the@apostrophecms/uploadfs
module.imageSizes
is still an option to@apostrophecms/attachment
.
-
v3.0.0-alpha.5 Changes
February 11, 2021- 👍 Conditional fields are now supported via the new
if
syntax. The old 2.xshowFields
feature has been replaced withif: { ... }
. - ➕ Adds the option to pass context options to an area for its widgets following the
with
keyword. Context options for widgets not in that area (or that don't exist) are ignored. Syntax:{% area data.page, 'areaName' with { '@apostrophecms/image: { size: 'full' } } %}
. - Advisory locking has been implemented for in-context editing, including nested contexts like the palette module. Advisory locking has also been implemented for the media manager, completing the advisory locking story.
- 🔧 Detects many common configuration errors at startup.
- 💻 Extends
getBrowserData
in@apostrophecms/doc-type
rather than overwriting the method. - 0️⃣ If a select element has no default, but is required, it should default to the first option. The select elements appeared as if this were the case, but on save you would be told to make a choice, forcing you to change and change back. This has been fixed.
- ✂ Removes 2.x piece module option code, including for
contextual
,manageViews
,publishMenu
, andcontextMenu
. - ✂ Removes admin bar module options related to 2.x slide-out UI:
openOnLoad
,openOnHomepageLoad
,closeDelay
. - 🛠 Fixed a bug that allowed users to appear to be in edit mode while looking at published content in certain edge cases.
- The PATCH API for pages can now infer the correct _id in cases where the locale is specified in the query string as an override, just like other methods.
- Check permissions for the delete and publish operations.
- 🛠 Many bug fixes.
Breaks
- 🔄 Changes the
piecesModuleName
option topieceModuleName
(no "s") in the@apostrophecms/piece-page-type
module. This feature is used only when you have two or more piece page types for the same piece type.
- 👍 Conditional fields are now supported via the new
-
v3.0.0-alpha.4 Changes
- 👍 "Fragments" have been added to the Apostrophe template API, as an alternative to Nunjucks' macros, to fully support areas and async components. See the A3 alpha documentation for instructions on how to use this feature.
- 💻 CSS files in the
ui/public
subdirectory of any module are now bundled and pushed to the browser. This allows you to efficiently deliver your CSS assets, just as you can deliver JS assets inui/public
. Note that these assets must be browser-ready JS and CSS, so it is customary to use your own webpack build to generate them. See the a3-boilerplate project for an example, especiallywebpack.config.js
. - 👍 More support for rendering HTML in REST API requests. See the
render-areas
query parameter in piece and page REST API documentation. - Context bar takeover capability, for situations where a secondary document should temporarily own the undo/redo/publish UI.
- Unpublished pages in the tree are easier to identify
- Range fields have been added.
- 👌 Support for npm bundles is back. It works just like in 2.x, but the property is
bundle
, notmoogBundle
. Thanks to Miro Yovchev.
💥 Breaking changes
- A3 now uses webpack 5. For now, due to a known issue with vue-loader, your own project must also be updated to use webpack 5. The a3-boilerplate project has been updated accordingly, so you may refer to the a3-boilerplate project for an example of the changes to be made, notably in
webpack.config.js
andpackage.json
. We are in communication with upstream developers to resolve the issue so that projects and apostrophe core can use different major versions of webpack.
-
v3.0.0-alpha.3 Changes
🚀 Third alpha release of 3.x. Introduced draft mode and the "Publish Changes" button.
-
v3.0.0-alpha.2 Changes
🚀 Second alpha release of 3.x. Introduced a distinct "edit" mode.