Skip to content

Commit

Permalink
v0.16.1 (#1418)
Browse files Browse the repository at this point in the history
* Added babelrc and stage-2 preset (#1329)

* Meteor 1.4.1.1 (#1331)

* [email protected]

- [email protected]
- updated Meteor packages, collections2

* version 0.15.2

* move plugin loader from startup to reaction-cli (#1332)

* preserve custom profile fields in Accounts.onCreateUser (#1335)

* copy deprecated cfs:gridfs to local and update npm deps (#1336)

* rounding of total to negate fractions of cents

* updated version

- release 0.15.3

* Josh acceptance test setup user permissions (#1315)

* First round setting up acceptance test capabilities

* webdriver working

* adding meteor ignore file structure

* create tests directory

* adding png to gitignore

* element maps

* More progress on functional test setup

* fixed assert

* using dot notation

* adding chai to dev packages

* Begin adding acceptance testing instructions to readme

* Simple login test complete

* Adding to readme about failed tests screenshots

* adding stuff

* Core permissions acceptance test

* more fixes

* went off the deep end. added some low hanging fruit tests

* enabling all passing tests for now

* fixed userAddress call

* removing docs from main readme

* linting for config fixed

* more cleanup

* additional cleanup

* using chrome instead of firefox now since ff is borked

* adding refund test

* a couple more refund tests w/ a couple fixes

Will add more assertions later for these tests.

* adding new tests to runner

* argh

* remove screenshot

* remove ignore of all .png

* updated package.json

* updated reaction.json.example

* finishing up PR

* lint cleanup

* temp workaround for missing product in store

* A couple locator changes - commented out broken stripe tests

* persistent profile language (#1338)

* allow multiple languages in Translations

- allow array to pass multiple languages in addition to shopLanguage.

* updated i18next and Translation load order

* remove session handling from i18n

- remove “language” session
- rely on Meteor.user updates (stored lang in profile)
- update i18nchooser helpers to insert user profile lang into selected
element class

* retain language on anonymous user registration

* check admin before setting lang

— don’t set lang on initial admin

* updated accounts.js

- cleanup checks

* Josh test speed increase #1347 (#1355)

* turning verbosity off when running tests by default

* Removing sleeps/pauses when I can

* flaky test fix

* #1347 cut runtime down by nearly 50%

This is still just running synchronously. As tests grows we will need
to look into running tests in parallel, however this might require some
infrastructure in place, i.e. a hosted QA environment. An environment
that can handle the load of 5-10 tests hitting it at a time.

* only build Docker image on master/development (#1359)

* only build Docker image on master/development

* chmod +x

* fix CI script typos

* load default user from env (#1369)

resolves #1368

* remove duplicate translation

* remove duplicate translations

* Shipping 1320 (#1357)

* disabled ranges

- TODO ranges are not functional yet.

* update shipping form methods

* remove settings from registry

* update swal version

- updated sweetAlert2 version

* export Import, Fixture

- export Fixture independently of Import
- refactor Import.shipping to use a modified key
- refactor load-data to use Fixture

* updated Shipping schema

* updated shipping method names

- breaking change: shipping method names updated to follow convention
of Reaction
`updateShippingMethods` becomes `shipping/methods/update`.
- adds `shipping/provider/remove` method

* add missing import

* convert info logging to debug

* updated form methods

- update form methods
- add SWAL2 confirmations

* add handling to cart rates

- if `handling` has data add `handling` to `rate`.

* updated cartTransforms

- updated to use own methods and parse float to ensure consistent
results.

* move shipping from included to core

like taxes, the core will include flat rates and the ui handling for
additional  shipping methods, which will be added to included - in the
form of `shipping-shippo` etc.

* remove card cursor:pointer (#1384)

Resolves #1309

* Product Search (#1350)

* Mock Search Files

* Mock Search Files

* Remove addProduct method

* Remove Fixtures to remove mystery Shop

* Super limited, even for a fake search

* Don't overwrite the descriptions on first run

* Larger data set for testing

* Don't log unless we are actually adding Search Products

* A simple weighted product search

* Split out plug ins into "search" and "searchEngine" plugs.

* Improve product title search, add search settings panel

* Add in variant search

* Add more options for weighting. Make the settings panel better.

* Add tags to results and search on description

* Rename plugin to be consistent with others

* Add example config file

* New test data with "show store" model with tags

* Simple product subscription that returns products and facets (tags) for a searchterm

* Only return ids and names of tags (we will eventually only return ids, but names for readability for now)

* Filter by tags

* We only need one plugin since our decoupling is provided by the use of a publication

* Rename plugin

* Using Mongo full-text search rather than regex search

* Using Mongo full-text search rather than regex search

* alphabetize base-style imports

* Add in hooks to keep PS collection updated

* Move build/rebuild functions into module

* New settings for fields and weights

* New settings for fields and weights

* add in hooks

* New settings for fields and weights

* Build PS collection dynamically based on configuration

* Add in vendor to list of possible fields

* initial push of search UI

* Move collections to lib so that clients can subscribe

* Add shopId to required fields

* Move collections to global collections

* Use ProductSearch collection on the client side

* Filter tags by hashtags in ProductSearch results

* Populate template with search results

* Product search results sorted by score in Ascending order

* Move (re)building search collections to job queue

* Handle form with a method so that we can rebuild collection or index when settings change

* Queue job to rebuild indexes when weights have changed

* Don't run search hooks when ProductSearch collection has not been defined

* Add Order search

* Namespace product settings

* Don't run hooks when under test

* Add missing "shopId" field

* More fixes to make OrderSearch collection configurable.

* Ensure index when inserting product records

* testing larger datasets

* Make function names less ridiculously long

* Pass results without relying on the product already existing in the subscription

* Don't add a bunch of products for testing by default

* style cleanup

* style cleanup

* style cleanup

* Add handle to product search collection

* Clarify log statement

* Ensure but don't drop collections when creating an OrderSearch record

* No longer build productResults on the client

* Cleanup and add `maxResults`

* Cleanup settings form

* Don't queue search collection jobs when under test

* Search result tests

* Add price to results. Make results different based upon logged-in status

* Add tests for non-published products not showing up for anonymous users

* Add tests for non-published products not showing up for anonymous users

* Add account search, jobs, etc.

* Change account search to not use text search

* ui initial push

* conflict temporary fix

* move style into less

* i18n for search

* added delay on fadeout to feign smoother transition

* sped up tag color transitions

* componentize search results content

* componentize search results grid

* style updates for search modal

* get media to show in searchGrid

* updated id date for searchGridIcons

* Use hashtags not hastags

* Change order search to use a regular query plus tests

* removed console.log

* fixed typo

* switched content order

* commit of admin buttons (currently not functional)

* Add support for text indexes in other supported languages

* Make order search results case-insensitive

* close button classes

* removed outline from nav

* removed additional media from search

We only need to show one picture in search, for now at least

* updated text

* added search clear

* style updates

* Delete all existing records when rebuilding account search

* Remove startup test files

* Also remove test data files

* Make logging less chatty

* Allow for transformations outside of the ProductSearch method

* convert tags to flexbox

* style updates

* adding scroll tag container

* clean-up of development comments

* LESS cleanup

* style cleanup

* style updates

* 96% width input & tags

formerly 80%

* move some styling from search.less to navbar.less

* cleanup & i18n

* remove errant button

* changed tag active color to ban-active

* Add documentation around "supported language" as suggested by CR

* added i18n to search

* changed search tags to use btn classes

* disable currently unused admin controls

* rtl support

* rtl style adjustments

* Exclude anonymous users from accounts publication (#1390)

* Exclude anonymous users from accounts publication when logged in as admin

* NPM imports first

* update deprecated _.pluck

- Patch _.pluck = _.map in lodash 4.x
- resolves issue introduced in #1390

* metafields -> details for client visibility (#1397)

* metafields -> details for client visibility

* metafields -> details

* Search UI updates (#1410)

* add margin-bottom to hovered product for better visibility on last product

* removed font-size from .btn.flat

* created react flatButton

created a new react button component so we aren’t just if/elseing our
way through a different type of button to get what we need.

* adjustment for #1402 - added overflow toggle on body

* removed font size from btn-round

* allow ESC to exit modal even when not focused on input

* Release 0.16.0 (#1413)

* updated README.md

* update to v0.16.0

* conflict fixes

* updated versions

* Better email (#1367)

* convert email sending to use Nodemailer

* add getShopSettings and getPackageSettings helpers

* replace all Meteor accounts-password email methods

* remove old email api

* rewrite mail config methods to use nodemailer-wellknown

* create emails collection for longer term log storage

* add mail service to shop mail settings schema

* refactor email sending job to use new API

* add Meteor methods for email API

* add email publication for logs page

* build new email dashboard UI plugin for using new API

* remove old Blaze email settings

* fix alerts arg checks when callback is missing

* add new FieldGroup and Loading React components

* default theme cleanup

* fix variables import order in default theme

* dependencies updates

* clean up job queue workers

* update eslint config for more React details

* fix custom email config

* fix type handling for email config port

* remove email dashboard nav tabs component until needed

* add saving state and better error handling to email settings

* change email status route name

* remove deprecated mail config hook

* add unblock to email config verify method

* add host/port to conditions for custom email config check

* move email methods to base of methods dir

* package updates

* fix comment typo

* update dockerignore to reflect new location

* default vals for mail host/port not needed in registry entry

* fix optional email save when settings are invalid

* fix email settings save button state after errors

* don’t run email settings verify method if settings are missing

* add log when new email settings are saved

* npm updates

* fix text overflow in email config panel

* fix type checking on email port setting

* fix syntax

* i18n-ify all new email components

* fix sweetalert promise

* fix 118n prop

* remove password from logs

* force immediate retry of email job

* add new column in email log table for action buttons

* remove unnecessary braces

* fix missing email port in UI

* package updates

* restore searching for email templates from the database

* clean up imports method

* Check if billing address exists (#1386)

Prevents exception if there is no billing address

* Hide user menu (#1387)

Hide user menu after clicking on any link, including "add product"

* Make close button work on tag nav bar in mobile mode (#1393)

* Prevent no image being found if no image has priority 0. `"metadata.priority": 0` filter will fail to find an image if none has priority 0, so sort is used instead. (#1392)

* Try to prevent inline alert pile (#1391)

* updated pull approve to version 2

See: http://docs.pullapprove.com/
and
https://blog.pullapprove.com/pullapprove-github-code-review-43761a64ea9a
#.enx67rp3f

* updated .pullapprove.yml

* updated negative reject value

* updated reset_on_push

* updated pullapprove.yml

* update pullapprove.yml

-ARRGHHH!

* package.json update for nodemailer

* Install binary non-npm version of phantomjs. reactioncommerce/reaction#1325 (#1419)

* add timeout to taxes tests (#1421)
  • Loading branch information
kieckhafer authored and Aaron Judd committed Sep 23, 2016
1 parent 8c0b726 commit 7691cfc
Show file tree
Hide file tree
Showing 75 changed files with 1,849 additions and 402 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.git
.build.log
Dockerfile
docker/reaction.*
.reaction/docker/reaction.*
docs
node_modules
packages/*/.npm
Expand Down
10 changes: 5 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,19 @@
"react/no-deprecated": 1,
"react/display-name": 1,
"react/forbid-prop-types": 1,
"react/jsx-boolean-value": [1, "always"],
"react/jsx-closing-bracket-location": 1,
"react/jsx-boolean-value": 0,
"react/jsx-closing-bracket-location": [1, "after-props"],
"react/jsx-curly-spacing": 1,
"react/jsx-indent-props": [1, 2],
"react/jsx-max-props-per-line": [1, {
"maximum": 4
}],
"react/jsx-no-bind": 1,
"react/jsx-no-bind": 0,
"react/jsx-no-duplicate-props": 1,
"react/jsx-no-literals": 1,
"react/jsx-no-literals": 0,
"react/jsx-no-undef": 1,
"react/sort-prop-types": 1,
"react/jsx-sort-props": 1,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-danger": 1,
Expand Down
1 change: 0 additions & 1 deletion .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
amplify
mdg:validated-method
Expand Down
30 changes: 16 additions & 14 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].8
[email protected].4
[email protected].9
[email protected].9
[email protected].9
[email protected].5
[email protected].10
[email protected].10
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].6
[email protected].7
[email protected]
cfs:[email protected]
cfs:[email protected]
Expand Down Expand Up @@ -73,8 +73,8 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].10
[email protected].10
[email protected].11
[email protected].11
[email protected]
[email protected]
jeremy:[email protected]
Expand Down Expand Up @@ -111,7 +111,7 @@ [email protected]
[email protected]
[email protected]
[email protected]
momentjs:moment@2.14.4
momentjs:moment@2.15.1
[email protected]
[email protected]
[email protected]
Expand All @@ -128,7 +128,7 @@ [email protected]
practicalmeteor:[email protected]_1
practicalmeteor:[email protected]
practicalmeteor:[email protected]_2
[email protected].4
[email protected].7
raix:[email protected]
raix:[email protected]
[email protected]
Expand All @@ -144,17 +144,19 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].12
[email protected].12
[email protected].13
[email protected].13
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
tmeasday:[email protected]
tmeasday:[email protected]
[email protected]
[email protected]
[email protected].11
[email protected].12
[email protected]
[email protected]
vsivsi:[email protected]
Expand Down
70 changes: 55 additions & 15 deletions .pullapprove.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,55 @@
approve_by_comment: true
approve_regex: '^(Approved|:\+1:)' # this only matches at the start of a line, just my suggestion -- read the docs for why
reject_regex: '^(Rejected|:-1:)'
reset_on_push: false
reviewers:
members:
- aaronjudd
- jshimko
- mikemurray
- zenweasel
- kieckhafer
- Capt-Slow
- rymorgan
name: pullapprove
required: 2
version: 2
always_pending:
explanation: "Work in progress!"
title_regex: WIP
group_defaults:
approve_by_comment:
enabled: true
approve_regex: '^(Approved|:shipit:|:\+1:|LGTM)'
reject_regex: '^(Rejected|:-1:)'
reset_on_push:
enabled: false
groups:
development-reviewers:
approve_by_comment:
enabled: true
author_approval:
ignored: true
conditions:
branches:
- development
files:
exclude:
- "*.md"
reject_value: -2
required: 2
reset_on_reopened:
enabled: true
users: all
master-reviewers:
author_approval:
required: true
conditions:
branches:
- master
reject_value: -1
required: 2
reset_on_reopened:
enabled: true
users:
- aaronjudd
- jshimko
- mikemurray
- zenweasel
- kieckhafer
security:
author_approval:
ignored: true
reject_value: -100
required: -1
reset_on_push:
enabled: true
reset_on_reopened:
enabled: true
users:
- Capt-Slow
15 changes: 13 additions & 2 deletions .reaction/docker/scripts/install-phantom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,19 @@ if [ "${INSTALL_PHANTOMJS}" = "true" ]; then

printf "\n[-] Installing Phantom.js...\n\n"

npm install --silent -g phantomjs-prebuilt
PHANTOM_VERSION="2.1.1"
PHANTOM_JS="phantomjs-$PHANTOM_VERSION-linux-x86_64"

npm cache clear
apt-get update
apt-get install build-essential wget chrpath libssl-dev libxft-dev -y

cd ~
wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOM_VERSION/$PHANTOM_JS.tar.bz2
tar xvjf $PHANTOM_JS.tar.bz2
mv $PHANTOM_JS /usr/local/share
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/share/phantomjs
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin/phantomjs
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/bin/phantomjs

phantomjs -v
fi
2 changes: 1 addition & 1 deletion client/modules/accounts/templates/dropdown/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ Template.loginDropdown.events({
});
} else if (this.route || this.name) {
event.preventDefault();
template.$(".dropdown-toggle").dropdown("toggle");
const route = this.name || this.route;
Reaction.Router.go(route);
}
template.$(".dropdown-toggle").dropdown("toggle");
}
});
5 changes: 3 additions & 2 deletions client/modules/accounts/templates/forgot/forgot.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Meteor } from "meteor/meteor";
import { Template } from "meteor/templating";
import { i18next } from "/client/api";
import { LoginFormSharedHelpers } from "/client/modules/accounts/helpers";
import { Template } from "meteor/templating";

Template.loginFormResetPasswordView.events({

Expand Down Expand Up @@ -32,7 +33,7 @@ Template.loginFormResetPasswordView.events({
// return;
}

Accounts.forgotPassword({ email: emailAddress}, (error) => {
Meteor.call("accounts/sendResetPasswordEmail", { email: emailAddress }, (error) => {
// Show some message confirming result
if (error) {
templateInstance.formMessages.set({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { Accounts } from "meteor/accounts-base";
import { Template } from "meteor/templating";
import { i18next } from "/client/api";
import { LoginFormSharedHelpers } from "/client/modules/accounts/helpers";
import { Template } from "meteor/templating";

ModalHelper = {
closeModal: function (template) {
Blaze.remove(template.view);
}
};

/**
* Accounts Event: onResetPasswordLink When a user uses a password reset link
Expand Down
23 changes: 15 additions & 8 deletions client/modules/core/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,24 @@ export default {
return this.shopName;
},

allowGuestCheckout() {
let allowGuest = false;
const packageRegistry = Packages.findOne({
getShopSettings() {
const settings = Packages.findOne({
name: "core",
shopId: this.shopId
});
}) || {};
return settings.settings || {};
},

getPackageSettings(name) {
return Packages.findOne({ name, shopId: this.getShopId() });
},

allowGuestCheckout() {
let allowGuest = false;
const settings = this.getShopSettings();
// we can disable in admin, let's check.
if (typeof packageRegistry === "object" &&
typeof packageRegistry.settings === "object" &&
packageRegistry.settings.public.allowGuestCheckout) {
allowGuest = packageRegistry.settings.public.allowGuestCheckout;
if (settings.public && settings.public.allowGuestCheckout) {
allowGuest = settings.public.allowGuestCheckout;
}
return allowGuest;
},
Expand Down
2 changes: 1 addition & 1 deletion client/modules/core/startup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meteor } from "meteor/meteor";
import { Tracker } from "meteor/tracker";
import Logger from "/client/modules/logger";
import Reaction from "./main";
import { Meteor } from "meteor/meteor";

// @see https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
let hidden;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,32 +82,6 @@
</div>
</div>

<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-title">
<a
href="#mail"
aria-controls="mail"
role="button"
data-toggle="collapse"
data-parent="#shopSettingsAccordian"
data-i18n="shopSettings.mail">Mail</a>
</div>
</div>
<div id="mail" class="panel-collapse collapse" role="tabpanel" aria-labelledby="mail">
<div class="panel-body">
{{#autoForm collection=Collections.Packages schema=Schemas.CorePackageConfig
doc=packageData id="shopEditEmailForm" type="update"}}
{{> afQuickField name='settings.mail.user'}}
{{> afQuickField name='settings.mail.password'}}
{{> afQuickField name='settings.mail.host'}}
{{> afQuickField name='settings.mail.port'}}
{{> shopSettingsSubmitButton}}
{{/autoForm}}
</div>
</div>
</div>

<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-title">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,19 +185,6 @@ AutoForm.hooks({
}
});

AutoForm.hooks({
shopEditEmailForm: {
onSuccess: function () {
return Alerts.toast(i18next.t("shopSettings.shopMailSettingsSaved"),
"success");
},
onError: function (operation, error) {
return Alerts.toast(`${i18next.t("shopSettings.shopMailSettingsFailed")
} ${error}`, "error");
}
}
});

AutoForm.hooks({
shopEditExternalServicesForm: {
onSuccess: function () {
Expand Down
2 changes: 2 additions & 0 deletions imports/plugins/core/email/client/actions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as logs } from "./logs";
export { default as settings } from "./settings";
35 changes: 35 additions & 0 deletions imports/plugins/core/email/client/actions/logs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Router, i18next } from "/client/api";

export default {

/**
* Update the limit query param in the URL
* @param {Object} event - sythetic React event
* @return {String} returns the updated limit
*/
updateLimit(event) {
return _.debounce(() => {
const limit = event.target.value;
if (!limit) {
Router.setQueryParams({ limit: null });
} else {
Router.setQueryParams({ limit });
}
}, 300, { maxWait: 1000 })();
},


/**
* Restart a failed or cancelled email job
* @param {Object} email - the email job object
* @return {null} triggers an alert
*/
resend(email) {
Meteor.call("emails/retryFailed", email._id, (err) => {
if (err) {
return Alerts.toast(i18next.t("app.error", { error: err.reason }), "error");
}
return Alerts.toast(i18next.t("mail.alerts.resendSuccess", { email: email.data.to }), "success");
});
}
};
Loading

0 comments on commit 7691cfc

Please sign in to comment.