Skip to content

Commit 44cd31e

Browse files
committed
Merge branch 'develop' into dockerized_core_dev
2 parents fa1f6db + 92a7a30 commit 44cd31e

File tree

88 files changed

+18670
-16999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+18670
-16999
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ gem "cells-haml"
2020
group :development, :test do
2121
gem 'rspec-rails', '~> 3.8'
2222
gem 'capybara'
23-
gem 'webpacker', '~> 3.5'
23+
gem 'webpacker', '~> 4.0'
2424
gem 'sqlite3', '~> 1.3.13'
2525
gem 'selenium-webdriver'
2626
gem 'puma'
2727
gem 'simplecov', require: false, group: :test
2828
gem 'byebug'
29-
# gem 'pry-byebug'
29+
gem 'pry-byebug'
3030
gem 'webmock'
3131
# gem 'webdrivers', '~> 4.1'
3232
end

Gemfile.lock

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ GEM
8080
cells (>= 4.1.6, < 5.0.0)
8181
childprocess (0.9.0)
8282
ffi (~> 1.0, >= 1.0.11)
83+
coderay (1.1.2)
8384
concurrent-ruby (1.1.5)
8485
crack (0.4.3)
8586
safe_yaml (~> 1.0.0)
@@ -125,6 +126,12 @@ GEM
125126
nokogiri (1.10.5)
126127
mini_portile2 (~> 2.4.0)
127128
pipetree (0.1.1)
129+
pry (0.12.2)
130+
coderay (~> 1.1.0)
131+
method_source (~> 0.9.0)
132+
pry-byebug (3.8.0)
133+
byebug (~> 11.0)
134+
pry (~> 0.10)
128135
public_suffix (3.0.3)
129136
puma (4.3.1)
130137
nio4r (~> 2.0)
@@ -229,7 +236,7 @@ GEM
229236
addressable (>= 2.3.6)
230237
crack (>= 0.3.2)
231238
hashdiff
232-
webpacker (3.5.5)
239+
webpacker (4.2.2)
233240
activesupport (>= 4.2)
234241
rack-proxy (>= 0.6.1)
235242
railties (>= 4.2)
@@ -249,6 +256,7 @@ DEPENDENCIES
249256
cells-rails
250257
generator_spec
251258
matestack-ui-core!
259+
pry-byebug
252260
puma
253261
rspec-rails (~> 3.8)
254262
selenium-webdriver
@@ -258,7 +266,7 @@ DEPENDENCIES
258266
trailblazer-cells
259267
trailblazer-rails
260268
webmock
261-
webpacker (~> 3.5)
269+
webpacker (~> 4.0)
262270

263271
BUNDLED WITH
264272
2.1.4

Rakefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,35 @@ require 'rake/testtask'
3232
# end
3333
#
3434
# task default: :test
35+
36+
task :webpack => 'webpack:build'
37+
38+
namespace :webpack do
39+
task :build => ['build:development', 'build:production']
40+
41+
namespace :build do
42+
task :development => 'yarn:install' do
43+
Bundler.with_clean_env do
44+
sh "cd builder && bin/webpack"
45+
end
46+
end
47+
task :production => 'yarn:install' do
48+
Bundler.with_clean_env do
49+
sh "cd builder && bin/rake webpacker:compile"
50+
end
51+
end
52+
end
53+
54+
task :watch => 'yarn:install' do
55+
Bundler.with_clean_env do
56+
sh "cd builder && bin/webpack --watch"
57+
end
58+
end
59+
60+
namespace :yarn do
61+
task :install do
62+
sh "yarn install && cd builder && yarn install"
63+
end
64+
end
65+
end
66+

app/concepts/matestack/ui/core/action/action.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import Vue from 'vue/dist/vue.esm'
22
import Vuex from 'vuex'
33
import axios from 'axios'
44

5-
import matestackEventHub from 'js/event-hub'
6-
7-
import componentMixin from 'component/component'
5+
import matestackEventHub from '../js/event-hub'
6+
import componentMixin from '../component/component'
87

98
const componentDef = {
109
mixins: [componentMixin],

app/concepts/matestack/ui/core/app/app.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Vue from 'vue/dist/vue.esm'
2-
import axios from 'axios'
32
import VRuntimeTemplate from "v-runtime-template"
43
import Vuex from 'vuex'
4+
import isNavigatingToAnotherPage from "./location"
55

66
const componentDef = {
77
props: ['appConfig', 'params'],
@@ -12,9 +12,10 @@ const componentDef = {
1212
asyncTemplate: state => state.pageTemplate,
1313
}),
1414
mounted: function(){
15-
const self = this;
16-
window.onpopstate = function(event) {
17-
self.$store.dispatch("navigateTo", {url: document.location.pathname, backwards: true} );
15+
window.onpopstate = (event) => {
16+
if (isNavigatingToAnotherPage(document.location, event)) {
17+
this.$store.dispatch("navigateTo", {url: document.location.pathname, backwards: true} );
18+
};
1819
}
1920
},
2021
components: {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const isNavigatingToAnotherPage = function(currentLocation, popstateEvent) {
2+
const targetLocation = popstateEvent.target.location;
3+
4+
// omits hash by design
5+
return currentLocation.pathname !== targetLocation.pathname ||
6+
currentLocation.origin !== targetLocation.origin ||
7+
currentLocation.search !== targetLocation.search
8+
}
9+
10+
export default isNavigatingToAnotherPage

app/concepts/matestack/ui/core/app/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Vue from 'vue/dist/vue.esm'
22
import Vuex from 'vuex'
33
import axios from 'axios'
4-
import matestackEventHub from 'js/event-hub'
4+
import matestackEventHub from '../js/event-hub'
55

66
Vue.use(Vuex)
77

app/concepts/matestack/ui/core/async/async.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Vue from 'vue/dist/vue.esm'
2-
import matestackEventHub from 'js/event-hub'
3-
import componentMixin from 'component/component'
2+
import matestackEventHub from '../js/event-hub'
3+
import componentMixin from '../component/component'
44

55
const componentDef = {
66
mixins: [componentMixin],

app/concepts/matestack/ui/core/collection/content/content.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import Vue from 'vue/dist/vue.esm'
2-
import matestackEventHub from 'js/event-hub'
3-
import queryParamsHelper from 'js/helpers/query-params-helper'
4-
import componentMixin from 'component/component'
5-
import asyncMixin from 'async/async'
2+
import matestackEventHub from '../../js/event-hub'
3+
import queryParamsHelper from '../../js/helpers/query-params-helper'
4+
import componentMixin from '../../component/component'
5+
import asyncMixin from '../../async/async'
66

77
const componentDef = {
88
mixins: [componentMixin, asyncMixin],

app/concepts/matestack/ui/core/collection/filter/filter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Vue from 'vue/dist/vue.esm'
2-
import matestackEventHub from 'js/event-hub'
3-
import queryParamsHelper from 'js/helpers/query-params-helper'
4-
import componentMixin from 'component/component'
2+
import matestackEventHub from '../../js/event-hub'
3+
import queryParamsHelper from '../../js/helpers/query-params-helper'
4+
import componentMixin from '../../component/component'
55

66
const componentDef = {
77
mixins: [componentMixin],

0 commit comments

Comments
 (0)