Changelog History
Page 19
-
v2.61.0 Changes
August 01, 2018β Unit tests passing.
β Regression tests passing.
- π New "secrets" feature in
apostrophe-users
makes it easy to hash other "secrets" similar in spirit to passwords. - This feature is now used for password reset tokens, making them more secure.
- β Additional joins can now be added to the schema of a widget that extends
apostrophe-pieces-widgets
. - Brute force password attacks against an Apostrophe server are now more difficult. Thanks to Lars Houmark.
- Tolerant sanitization of array items while they are still in the editor. This avoids confusion caused by
required
fields in the array editor. - Error messages now behave sensibly when multiple label elements appear in a field. Thanks to Lars Houmark.
- π Fix background color on notification on uploads when file extension is not accepted. Thanks to Lars Houmark.
- π If you can't move a widget out of an area, you can no longer move widgets into that area either (movable: false is fully enforced). Thanks to Fredrik Ekelund.
- π New browser-side events are emitted during the attachment upload process, and the built-in facility that delays the saving of a form until attachment uploads are complete has been fixed. Thanks to Lars Houmark.
- π Fixes to the active state display of array items. Thanks to Lars Houmark.
- Contributor Guide expanded with lots of new information about practical ways to contribute to Apostrophe.
- Contributor Covenant Code of Conduct added to the project. The Apostrophe community is a welcoming place, and now is a great time to lock that in for the future.
- π New "secrets" feature in
-
v2.60.4 Changes
July 13, 2018β Unit tests passing.
β Regression tests passing.
- π― Shallowly clone the required definition in defineRelatedType to prevent yet more crosstalk between instances of apos when
apostrophe-multisite
is used. No other changes.
- π― Shallowly clone the required definition in defineRelatedType to prevent yet more crosstalk between instances of apos when
-
v2.60.3 Changes
July 13, 2018β Unit tests passing.
β Regression tests passing.
- π Improved support for nested areas and widgets. Apostrophe now pushes the correct doc id and dot path all the way to the page in various situations where this could previously have led to errors at save time.
- π The new
apos.locks.withLock(lockName, fn)
method can be used to execute a function while the process has the named lock. This ensures that other processes cannot run that function simultaneously. You may optionally pass a callback, otherwise a promise is returned. Similarlyfn
may take a callback, or no arguments at all, in which case it is expected to return a promise. - Cleanup: don't call
server.close
unless we've succeeded in listening for connections.
-
v2.60.2 Changes
July 12, 2018β Unit tests passing.
β Regression tests passing.
- π Version 2.60.1 broke validation of schema fields which were
required
, but blank because they were hidden byshowFields
. This is of course permitted,required
applies only if the field is active according toshowFields
or not addressed by any βshowFields
possibilities at all. Comprehensive unit testing was β added for this issue to prevent a recurrence. - π Version 2.60.1 also introduced a more subtle issue: if constraints
like
required
ormin
, or general improvements to validation such as NaN detection for integers and floats, were added to a widget schema later after content already existed then it became impossible to open a widget editor and correct the issues. Validation tolerance was added for this situation. - When a user edits an area "in context" on the page, the server now reports errors using a path that can be used to identify the widget responsible and open its editing dialog box. A more relevant notification is also displayed. This remains a secondary mechanism. Server-side π» validation is mostly about preventing intentional abuse. Browser-side validation is still the best way to provide feedback during data entry.
- π Version 2.60.1 broke validation of schema fields which were
-
v2.60.1 Changes
July 11, 2018β Unit tests passing.
β Regression tests passing.
- Fields of type
checkboxes
now play nicely with thelive/draft
toggle ofapostrophe-workflow
. - π Improved validation of integers and floats. Thanks to Lars Houmark.
- The "Global" dialog box now follows the same pattern as that for other piece types, which means that the workflow dropdown menu is available if workflow is present.
- Options may be passed to the
express.static
middleware that serves thepublic
folder, via thestatic
option of theapostrophe-express
module. Thanks to Leonhard Melzer. apostrophe
now depends onbluebird
properly and there are no lingering references to the wrong version folodash
. Formerly we got away with this because some of our dependencies did depend on these, and npm flattens dependencies. Thanks to Leonhard Melzer.- π The new
eslint-config-punkave
ruleset is in place, and includes a check for "unofficial dependencies" inrequire
calls that could go away suddenly. fieldClasses
andfieldAttributes
may be set on form fields themselves, similar to the existingclasses
andattributes
properties that are applied to thefieldset
. Thanks to Lars Houmark.- π» The "Pages" admin UI now includes a "New Page" button, in addition to the usual "reorganize" functionality. Thanks to Lars Houmark.
- π Fixed a crash when an
apostrophe-pieces-widget
is configured to always show all pieces viaby: 'all'
. Thanks to AurΓ©lien Wolz. - π» General UI styling improvements and fixes.
- Fields of type
-
v2.60.0 Changes
July 06, 2018β Unit tests passing.
β Regression tests passing.
- π New feature: you can now display counts for each tag, joined item, etc. when using the
piecesFilters
option ofapostrophe-pieces-pages
. Just addcounts: true
to the configuration for that filter. The count is then available in a.count
property for each value in the array. See creating filter UI with apostrophe-pieces-pages for more information. - π New feature: command line tasks such as
apostrophe-blog:generate
may now be run programmatically, for example:apos.tasks.invoke('apostrophe-blog:generate', { total: 50 })
. A promise is returned if a callback is not passed. Note that not all tasks are written to behave politely and invoke their callback normally, however most do. This feature is most useful when writing tasks that logically should incorporate other tasks. - π» Many UX and UI improvements that make the experience more pleasant in subtle and not-so-subtle ways. Thanks to Carsten, Marco Arnone and the prolific Lars Houmark for their contributions. This was an excellent week for Apostrophe PRs.
- The full set of controls for joined items are again available in the chooser, as well as in the browse modal.
- π§ The automatic opening of the admin bar menu on page load can now be configured with the
openOnLoad
,openOnHomepageLoad
, andcloseDelay
options. - π»
autocomplete="off"
for date fields prevents chrome autocomplete suggestions from wrecking calendar UI. - π Always remove .apos-global-busy on unlock, even if the transition event never fires. Yes, that is sadly a thing. Prevents the UI from becoming unusable in rare situations (less rare inside functional tests).
- π Use
one
to reduce the overhead of .apos-global-busy's transition event handler. We could do more here to reduce overhead, i.e. unhooking it entirely. - π» Much-improved validation of
min
,max
andrequired
for strings, integers and floats on both the server and the browser side. Thanks to Lars Houmark.
- π New feature: you can now display counts for each tag, joined item, etc. when using the
-
v2.59.1 Changes
July 02, 2018β Unit tests passing.
β Regression tests passing.
- π Widget schemas now support the
def
property for fields. This always worked for pieces and pages. - π Accommodations for functional testing in nightwatch. The currently active Apostrophe modal, and all of its proxies such as its controls that are in a separate div for presentation reasons, now has the attribute
data-apos-modal-current
which is set to the class name of the modal. This powers the new apostrophe-nightwatch-tools module, which provides reusable commands and steps that can be used to create test projects similar to our apostrophe-enterprise-testbed. Testing with the enterprise testbed project is a standard part of our release process. - Previously if workflow was in use slugs could not be reused by new pages when the original page was in the trash. This has been addressed; the slug is now deduplicated in the same way that email addresses and usernames of users are when in the trash.
- π The infinite scroll feature of
apostrophe-pieces-pages
now works as documented with the styles provided. The code is also more efficient and scroll events are throttled for performance. Thanks to Lars Houmark. - π Various UX fixes, thanks to Lars Houmark and various members of the Apostrophe team.
- π Widget schemas now support the
-
v2.59.0 Changes
June 15, 2018β Unit tests passing.
β Regression tests passing.
- π Fixed nested widget editing for existing widgets whose modal dialog boxes have been accessed (#1428).
- A clear warning message with instructions has been added for those who are seeing "unblessed" messages due to widget schemas and in-template
apos.area
calls that do not match (#1429). The easiest way to avoid this is to just mark the areacontextual: true
in your widget schema so it is edited only on the page. But if you really want to do both, the widget options must match. - The mechanism that automatically makes slugs, paths and other keys unique now gives up eventually and reports the original duplicate key error. This makes it easier to debug your code if you are violating your own custom indexes that feature unique keys. It is possible to make the deduplicator aware of your own own properties that need to be made more unique on inserts if you wish, by implementing a
docFixUniqueError
method. Please note: this change is not a regression. Code that formerly never completed its task in this situation will simply report an error promptly rather than retrying inserts forever while degrading your database performance. - 0οΈβ£ A new profiling API has been added: the
apos.utils.profile
method. This method can be called to report how long code takes to run for later analysis. It does nothing in the default implementation; modules like our forthcoming profiler override it to give feedback on the speed of your code.
-
v2.58.0 Changes
June 13, 2018β Unit tests passing.
β Regression tests passing.
- Polymorphic joins have arrived! You may now create joins like this:
{ name: '_items', type: 'joinByArray', withType: [ 'apostrophe-blog', 'product', 'apostrophe-page' ] }
When you join with more than one type, Apostrophe presents a chooser that allows you to pick between tabs for each type. Note that
apostrophe-page
can be included, so you can pick a mix of pages and pieces for the same join.This feature is useful for creating navigation that may point to a variety of document types, without the need for an array of items with several different joins and a
select
element to choose between them.Polymorphic joins work for both
joinByOne
andjoinByArray
. Currently they are not available forjoinByOneReverse
,joinByArrayReverse
, or pieces filters. Their primary use case is creating navigation widgets.- π±
apos.images.srcset
helper function added. You can use this function to generate asrcset
attribute for responsive display of an image. Just pass an attachment to the helper:
<img srcset="{{ apos.images.srcset(apos.images.first(data.piece.thumbnail)) }}" />
A
src
attribute for backwards compatibility is always advisable too.Thanks to Fredrik Ekelund for this contribution.
Fast forms for big schemas are back! The issue with tags has been resolved.
A single MongoDB connection may be reused by several
apos
objects for separate sites, a feature which is exploited by the apostrophe-multisite module. Note that this only reuses the connection, it does not share a single MongoDB database. It does allow you to keep potentially hundreds of sites on a single MongoDB server or replica set, as the overhead of multiple logical "databases" is small in MongoDB's modern WiredTiger storage engine. To reuse a connection, pass it to theapostrophe-db
module as thedb
option.Fixed a MongoDB 3.6 incompatibility in the "Apply to Subpages" feature for permissions. Also made this feature available again when removing someone's permissions. We plan further UX work here to make this feature easier to understand and use.
UX fix to the "manage tags" dialog box: don't attempt to add an empty tag. Thanks to Anthony Tarlao.
Warn developers if they use bad area names.
π For those deploying asset bundles to S3: the command line task that builds an asset bundle no longer requires access to your production database, although it still needs to start up normally with access to a database in the pre-production environment where you are building the bundle.
π Refactoring of the trash field deduplication features, in preparation to extend them to pages as well in an upcoming release.
-
v2.57.2 Changes
June 07, 2018β Unit tests passing.
β Relevant regression tests passing.
- π New
extraHtml
block inouterLayoutBase.html
allows yourouterLayout.html
to add attributes to the outerhtml
element without the need to completely override the layout. It is a best practice to avoid completely overriding the layout because this maximizes your compatibility with future updates to our admin markup, etc.
- π New