Currently, ``throwError`` is used for all manner of messages, including
errors, "success" messages, and "info" messages. This makes appropriate
styling of the error message difficult. In addition, the name
``throwError`` seems to create confusion, implying that an error will
actually be thrown (e.g. stopping execution when a user isn't logged in
[0][1]), when in fact it just displays a message.
Replace ``throwError`` with ``flashMessage``, and reliably include a
message "type" (e.g. "error", "success", "info") every time. rename
``lib/errors.js`` to ``lib/messages.js`` to more accurately reflect its
function.
This commit doesn't rename the message collection (``Errors``), nor the
template responsible for rendering the messages (``error_item.html``) --
that should probably still be done, but has higher likelihood of
trouble for existing alternate themes and installations.
[0] 6ccf7d7d47/client/views/users/user_edit.js (L43)
[1] 083a4c4dc4/client/views/users/user_email.js (L13)
Add the following hooks:
- ``addToUserSchema``: fields to add to the (currently unused) user
Schema
- ``postAuthor``: templates to use when rendering the post author in the
byline
- ``userProfileDisplay``: additional templates to add to the user
profile display.
- ``userProfileEdit``: additional templates to add to the user profile
editing form.
- ``userProfileFinishSignup``: additional templates to show in the view
for completing user signup (adding email, username, etc).
- ``userEditRenderedCallbacks``: Callbacks executed on "rendered" for
user_edit view.
- ``userEditClientCallbacks``: Callbacks used to further process user
properties before saving changes in user_edit view.
- ``userProfileCompleteChecks``: Functions called to determine whether
a user profile is "complete" (e.g. has email, username, and whatever
else).
These hooks facilitate package authors changing which profile fields are
displayed, which profile fields are required, and how to display
usernames next to posts.
- Refactored post click counting to match naming convention with viewsCount and commentsCount and removed security issue in client code
- Fixed bug that user commentsCount would not show correctly in list
- Added migrations "commentCountToCommentsCount" and "clicksToClicksCount"
- Refactored click counting to match view counting
- Renamed User "commentCount" to match Post "commentsCount"
- Removed security issue in client side click counting (now calling server method instead)