alchemy_cms 5.1.0.rc1 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de384cea86fc5b57fd32980a289b81cc172a08bd6d9bea7f2fce58764247d5af
4
- data.tar.gz: d82439febbc4a16884d31dcf84bf206ee7d886c2793ffa35d634611a522966ea
3
+ metadata.gz: 7244fdbb3c06cd1c7375f6006d94e5b5b16a860d62fb9268fedc79a42d52e7fd
4
+ data.tar.gz: 1b46460a9e387144126d5d4d17a905697e6a80dc8d480743dcbd5a0c8c99d3ca
5
5
  SHA512:
6
- metadata.gz: cf29a07639284f89bac148065a3d2fdac90f8b24fba245d1af97e7dbb045bf7ee59f88b56a16c7f2211d99c9160605bd9be24ba7a333771b08a96d9c53450d60
7
- data.tar.gz: 59d1b77141ab07bd6faa3733e730fb03e47bafa60ea855b339ca202239c99052c968b9419a6fd6bd7378250335d378fb883d2b1de638c7f14bc68204c32cac9c
6
+ metadata.gz: e4c138b229e5653765b5ae2ade3a34acdc644a489891ae4664e878e6c7c8ecb32080d76403a167a0d2b05d5349be0903628a6c747cfeae1bec927571d1094928
7
+ data.tar.gz: '08fde58900a7e4359888c5409d59f8492f94025b14f131d69526acef5b0cd4378c39af534624e35edc47b2fa2d55a738db366ae9c349056db3a22ae00277ed6a'
@@ -0,0 +1,126 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ RSpec:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ rails:
12
+ - '5.2'
13
+ - '6.0'
14
+ ruby:
15
+ - '2.5.x'
16
+ - '2.6.x'
17
+ database:
18
+ - mysql
19
+ - postgresql
20
+ env:
21
+ DB: ${{ matrix.database }}
22
+ DB_USER: alchemy_user
23
+ DB_PASSWORD: password
24
+ DB_HOST: '127.0.0.1'
25
+ RAILS_ENV: test
26
+ RAILS_VERSION: ${{ matrix.rails }}
27
+ services:
28
+ postgres:
29
+ image: postgres:11
30
+ env:
31
+ POSTGRES_USER: alchemy_user
32
+ POSTGRES_PASSWORD: password
33
+ POSTGRES_DB: alchemy_cms_dummy_test
34
+ ports: ['5432:5432']
35
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
36
+ mysql:
37
+ image: mysql:latest
38
+ ports: ['3306:3306']
39
+ env:
40
+ MYSQL_USER: alchemy_user
41
+ MYSQL_PASSWORD: password
42
+ MYSQL_DATABASE: alchemy_cms_dummy_test
43
+ MYSQL_ROOT_PASSWORD: password
44
+ options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
45
+ steps:
46
+ - uses: actions/checkout@v2.3.4
47
+ - name: Set up Ruby
48
+ uses: actions/setup-ruby@v1.1.2
49
+ with:
50
+ ruby-version: ${{ matrix.ruby }}
51
+ - name: Restore apt cache
52
+ id: apt-cache
53
+ uses: actions/cache@v2.1.3
54
+ with:
55
+ path: /home/runner/apt/cache
56
+ key: ${{ runner.os }}-apt-${{ matrix.database }}
57
+ restore-keys: |
58
+ ${{ runner.os }}-apt-
59
+ - name: Install Postgres headers
60
+ if: matrix.database == 'postgresql'
61
+ run: |
62
+ mkdir -p /home/runner/apt/cache
63
+ sudo apt update -qq
64
+ sudo apt install -qq --fix-missing libpq-dev -o dir::cache::archives="/home/runner/apt/cache"
65
+ sudo chown -R runner /home/runner/apt/cache
66
+ - name: Install MySQL headers
67
+ if: matrix.database == 'mysql'
68
+ run: |
69
+ mkdir -p /home/runner/apt/cache
70
+ sudo apt update -qq
71
+ sudo apt install -qq --fix-missing libmysqlclient-dev -o dir::cache::archives="/home/runner/apt/cache"
72
+ sudo chown -R runner /home/runner/apt/cache
73
+ - name: Install bundler
74
+ run: |
75
+ gem install bundler
76
+ - name: Restore Ruby Gems cache
77
+ id: cache
78
+ uses: actions/cache@v2.1.3
79
+ with:
80
+ path: vendor/bundle
81
+ key: ${{ runner.os }}-bundle-${{ matrix.ruby }}-${{ matrix.rails }}-${{ matrix.database }}-${{ hashFiles('**/Gemfile') }}
82
+ restore-keys: |
83
+ ${{ runner.os }}-bundle-
84
+ - name: Install bundle
85
+ timeout-minutes: 10
86
+ run: |
87
+ bundle install --jobs 4 --retry 3 --path vendor/bundle
88
+ - name: Restore node modules cache
89
+ id: yarn-cache
90
+ uses: actions/cache@v2.1.3
91
+ with:
92
+ path: spec/dummy/node_modules
93
+ key: ${{ runner.os }}-yarn-dummy-${{ hashFiles('./package.json') }}
94
+ restore-keys: |
95
+ ${{ runner.os }}-yarn-dummy-
96
+ - name: Prepare database
97
+ run: |
98
+ bundle exec rake alchemy:spec:prepare
99
+ - name: Run tests & publish code coverage
100
+ uses: paambaati/codeclimate-action@v2.7.5
101
+ env:
102
+ CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22
103
+ with:
104
+ coverageCommand: bundle exec rspec
105
+ - uses: actions/upload-artifact@main
106
+ if: failure()
107
+ with:
108
+ name: Screenshots
109
+ path: spec/dummy/tmp/screenshots
110
+ Jest:
111
+ runs-on: ubuntu-latest
112
+ env:
113
+ NODE_ENV: test
114
+ steps:
115
+ - uses: actions/checkout@v2.3.4
116
+ - name: Restore node modules cache
117
+ uses: actions/cache@v2.1.3
118
+ with:
119
+ path: node_modules
120
+ key: ${{ runner.os }}-yarn-${{ hashFiles('./package.json') }}
121
+ restore-keys: |
122
+ ${{ runner.os }}-yarn-
123
+ - name: Install yarn
124
+ run: yarn install
125
+ - name: Run jest
126
+ run: yarn jest
@@ -1,7 +1,10 @@
1
- ## 5.1.0 (unreleased)
1
+ ## 5.1.0 (2020-12-18)
2
2
 
3
3
  ### Features
4
4
 
5
+ - Allow pound sign in legacy url [#1980](https://github.com/AlchemyCMS/alchemy_cms/pull/1980) ([robinboening](https://github.com/robinboening))
6
+ - Adjust element editor UI [#1979](https://github.com/AlchemyCMS/alchemy_cms/pull/1979) ([tvdeyen](https://github.com/tvdeyen))
7
+ - Always show the full page name in active page tab [#1972](https://github.com/AlchemyCMS/alchemy_cms/pull/1972) ([tvdeyen](https://github.com/tvdeyen))
5
8
  - Allow multiple preview sources [#1959](https://github.com/AlchemyCMS/alchemy_cms/pull/1959) ([tvdeyen](https://github.com/tvdeyen))
6
9
  - Add Publish Targets [#1957](https://github.com/AlchemyCMS/alchemy_cms/pull/1957) ([tvdeyen](https://github.com/tvdeyen))
7
10
  - Persist rendered picture variants [#1882](https://github.com/AlchemyCMS/alchemy_cms/pull/1882) ([tvdeyen](https://github.com/tvdeyen))
@@ -12,6 +15,8 @@
12
15
 
13
16
  ### Changes
14
17
 
18
+ - Fix height of search input field [#1973](https://github.com/AlchemyCMS/alchemy_cms/pull/1973) ([tvdeyen](https://github.com/tvdeyen))
19
+ - Load select2 from assets folder [#1961](https://github.com/AlchemyCMS/alchemy_cms/pull/1961) ([tvdeyen](https://github.com/tvdeyen))
15
20
  - Do not abort if user class cannot be found [#1950](https://github.com/AlchemyCMS/alchemy_cms/pull/1950) ([tvdeyen](https://github.com/tvdeyen))
16
21
  - Deprivatize useful picture view methods [#1936](https://github.com/AlchemyCMS/alchemy_cms/pull/1936) ([mickenorlen](https://github.com/mickenorlen))
17
22
  - Unset render_size on layout default selection [#1935](https://github.com/AlchemyCMS/alchemy_cms/pull/1935) ([mickenorlen](https://github.com/mickenorlen))
@@ -39,6 +44,8 @@
39
44
 
40
45
  ### Misc
41
46
 
47
+ - Move away from Travis CI [#1981](https://github.com/AlchemyCMS/alchemy_cms/pull/1981) ([tvdeyen](https://github.com/tvdeyen))
48
+ - Remove poltergeist and phantomjs leftovers [#1970](https://github.com/AlchemyCMS/alchemy_cms/pull/1970) ([tvdeyen](https://github.com/tvdeyen))
42
49
  - [ruby - main] Upgrade rubocop to version 1.1.0 [#1958](https://github.com/AlchemyCMS/alchemy_cms/pull/1958) ([depfu](https://github.com/apps/depfu))
43
50
  - Remove greetings action [#1956](https://github.com/AlchemyCMS/alchemy_cms/pull/1956) ([tvdeyen](https://github.com/tvdeyen))
44
51
  - [ruby] Upgrade rubocop to version 1.0.0 [#1952](https://github.com/AlchemyCMS/alchemy_cms/pull/1952) ([depfu](https://github.com/apps/depfu))
@@ -51,6 +58,10 @@
51
58
  - [ruby] Upgrade rubocop to version 0.88.0 [#1892](https://github.com/AlchemyCMS/alchemy_cms/pull/1892) ([depfu](https://github.com/apps/depfu))
52
59
  - [ruby] Upgrade rubocop to version 0.87.1 [#1889](https://github.com/AlchemyCMS/alchemy_cms/pull/1889) ([depfu](https://github.com/apps/depfu))
53
60
 
61
+ ## 5.0.2 (2020-12-18)
62
+
63
+ - Fix page sorting [#1984](https://github.com/AlchemyCMS/alchemy_cms/pull/1984) ([tvdeyen](https://github.com/tvdeyen))
64
+
54
65
  ## 5.0.1 (2020-09-29)
55
66
 
56
67
  - [a11y] Better image alt text support [#1940](https://github.com/AlchemyCMS/alchemy_cms/pull/1940) ([tvdeyen](https://github.com/tvdeyen))
data/Gemfile CHANGED
@@ -13,7 +13,7 @@ gem "mysql2", "~> 0.5.1" if ENV["DB"] == "mysql"
13
13
  gem "pg", "~> 1.0" if ENV["DB"] == "postgresql"
14
14
 
15
15
  group :development, :test do
16
- if ENV["TRAVIS"]
16
+ if ENV["GITHUB_ACTIONS"]
17
17
  gem "sassc", "~> 2.4.0" # https://github.com/sass/sassc-ruby/issues/146
18
18
  else
19
19
  gem "launchy"
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # AlchemyCMS
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/alchemy_cms.svg)](http://badge.fury.io/rb/alchemy_cms)
4
- [![Build Status](https://travis-ci.com/AlchemyCMS/alchemy_cms.svg?branch=main)](https://travis-ci.com/AlchemyCMS/alchemy_cms)
4
+ [![Build Status](https://github.com/AlchemyCMS/alchemy_cms/workflows/CI/badge.svg?branch=main)](https://github.com/AlchemyCMS/alchemy_cms/actions)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/196c56c56568ed24a697/maintainability)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/maintainability)
6
6
  [![Test Coverage](https://api.codeclimate.com/v1/badges/196c56c56568ed24a697/test_coverage)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/test_coverage)
7
7
  [![Depfu](https://badges.depfu.com/badges/ebe56d2dd7b7044a8ae700cc81212a8e/overview.svg)](https://depfu.com/github/AlchemyCMS/alchemy_cms?project_id=4600)
@@ -37,7 +37,6 @@ Gem::Specification.new do |gem|
37
37
  gem.add_runtime_dependency 'request_store', ['~> 1.2']
38
38
  gem.add_runtime_dependency 'responders', ['>= 2.0', '< 4.0']
39
39
  gem.add_runtime_dependency 'sassc-rails', ['~> 2.1']
40
- gem.add_runtime_dependency 'select2-rails', ['>= 3.5.9.1', '< 4.0']
41
40
  gem.add_runtime_dependency 'simple_form', ['>= 4.0', '< 6']
42
41
  gem.add_runtime_dependency 'sprockets', ['>= 3.0', '< 5']
43
42
  gem.add_runtime_dependency 'turbolinks', ['>= 2.5']
@@ -13,7 +13,6 @@
13
13
  //= require clipboard.min
14
14
  //= require keymaster
15
15
  //= require requestAnimationFrame
16
- //= require select2
17
16
  //= require handlebars
18
17
  //= require alchemy/templates
19
18
  //= require alchemy/alchemy.base
@@ -102,6 +102,9 @@ $error_border_color: #c49c9c !default;
102
102
  $error_text_color: #a23434 !default;
103
103
  $error_background_color: #efd3d3 !default;
104
104
 
105
+ $hint-background-color: $light_yellow !default;
106
+ $hint-text-color: $very-dark-gray !default;
107
+
105
108
  $form-left-width: 35% !default;
106
109
  $form-right-width: 65% !default;
107
110
 
@@ -140,6 +143,8 @@ $table-row-hover-color: rgba($light_yellow, 0.5) !default;
140
143
  $elements-window-width: 22.5vw !default;
141
144
  $elements-window-min-width: 400px !default;
142
145
  $element-header-bg-color: $medium-gray !default;
146
+ $element-header-active-bg-color: $dark-blue !default;
147
+ $element-header-active-color: $white !default;
143
148
  $top-menu-height: 75px !default;
144
149
 
145
150
  $tabs-height: 31px !default;
@@ -1,6 +1,5 @@
1
1
  /* Alchemy CMS Sprockets Manifest
2
2
  * -------------------------------
3
- *= require select2
4
3
  *= require_self
5
4
  */
6
5
 
@@ -60,6 +60,7 @@
60
60
  max-width: 85%;
61
61
  margin-left: $default-margin;
62
62
  text-overflow: ellipsis;
63
+ transition: color $transition-duration;
63
64
 
64
65
  .has-hint & {
65
66
  max-width: 80%;
@@ -73,7 +74,6 @@
73
74
 
74
75
  .preview_text_element_name {
75
76
  font-size: $small-font-size;
76
- text-shadow: #efefef 1px 1px 1px;
77
77
  font-weight: bold;
78
78
  line-height: 15px;
79
79
  }
@@ -106,6 +106,7 @@
106
106
  height: 16px;
107
107
  right: 8px;
108
108
  top: 10px;
109
+ transition: none;
109
110
 
110
111
  .error_icon {
111
112
  float: left;
@@ -126,6 +127,32 @@
126
127
  margin-bottom: 2*$default-margin;
127
128
  transition: box-shadow $transition-duration;
128
129
 
130
+ &.hidden {
131
+ display: block;
132
+ border-style: dashed;
133
+ opacity: 0.5;
134
+ transition: opacity $transition-duration;
135
+
136
+ > .element-header {
137
+ background-color: transparent;
138
+ background-image: linear-gradient(
139
+ 45deg,
140
+ $light-gray 25%,
141
+ $medium-gray 25%,
142
+ $medium-gray 50%,
143
+ $light-gray 50%,
144
+ $light-gray 75%,
145
+ $medium-gray 75%,
146
+ $medium-gray 100%
147
+ );
148
+ background-size: 28.28px 28.28px;
149
+ }
150
+
151
+ &:hover {
152
+ opacity: 1;
153
+ }
154
+ }
155
+
129
156
  &.is-fixed {
130
157
  border-width: 0;
131
158
  border-radius: 0;
@@ -143,9 +170,17 @@
143
170
  }
144
171
  }
145
172
 
146
- &.selected:not(.is-fixed) {
147
- border-color: #c3c3c3;
148
- box-shadow: 0 2px 8px rgba(#9b9b9b, 0.75);
173
+ &.selected:not(.is-fixed), &:hover {
174
+ &:not(.hidden) {
175
+ box-shadow: 0 2px 8px rgba(#9b9b9b, 0.75);
176
+ }
177
+ }
178
+
179
+ &.selected:not(.is-fixed):not(.folded):not(.dirty):not(.hidden) {
180
+ > .element-header {
181
+ background-color: $element-header-active-bg-color;
182
+ color: $element-header-active-color;
183
+ }
149
184
  }
150
185
 
151
186
  &.folded {
@@ -221,21 +256,10 @@
221
256
  }
222
257
  }
223
258
 
224
- .element_tools {
225
- display: flex;
226
- width: 100%;
227
- justify-content: space-between;
228
- margin-left: 0;
229
- }
230
-
231
259
  .element-content {
232
260
  margin: 4px 8px;
233
261
  }
234
262
 
235
- .button_with_label {
236
- margin: 0 4px;
237
- }
238
-
239
263
  .content_editor,
240
264
  .picture_thumbnail {
241
265
  width: 100%;
@@ -313,7 +337,18 @@
313
337
  background-color: $element-header-bg-color;
314
338
  @extend .disable-user-select;
315
339
  cursor: pointer;
316
- @include border-top-radius($default-border-radius);
340
+ border-radius: $default-border-radius;
341
+ transition: background-color $transition-duration;
342
+
343
+ .expanded & {
344
+ border-bottom-left-radius: 0;
345
+ border-bottom-right-radius: 0;
346
+ }
347
+
348
+ .icon {
349
+ color: inherit;
350
+ transition: color $transition-duration;
351
+ }
317
352
 
318
353
  >.hint-with-icon {
319
354
  position: absolute;
@@ -338,10 +373,14 @@
338
373
  padding: $default-padding 0;
339
374
  height: $element-toolbar-height;
340
375
  border-bottom: 1px solid $medium-gray;
376
+ }
341
377
 
342
- .element_tools {
343
- float: left;
344
- margin-left: -$default-margin;
378
+ .element_tools {
379
+ display: flex;
380
+ width: 100%;
381
+
382
+ .button_with_label {
383
+ margin: 0 2px;
345
384
  }
346
385
  }
347
386
 
@@ -74,7 +74,6 @@ div#overlay_text_box {
74
74
 
75
75
  .page_name {
76
76
  display: inline-block;
77
- max-width: 100px;
78
77
  margin-right: $default-margin;
79
78
  line-height: $header-height;
80
79
  white-space: nowrap;
@@ -27,7 +27,8 @@
27
27
 
28
28
  > .hint-bubble {
29
29
  visibility: hidden;
30
- background: $light_yellow;
30
+ background-color: $hint-background-color;
31
+ color: $hint-text-color;
31
32
  border-radius: $default-border-radius;
32
33
  box-shadow: 0px 4px 8px rgba(0, 0, 0, .3);
33
34
  position: absolute;
@@ -54,7 +54,7 @@
54
54
 
55
55
  .search_input_field {
56
56
  width: 0;
57
- height: inherit;
57
+ height: 100%;
58
58
  border: none;
59
59
  background-color: transparentize($form-field-background-color, 0.25);
60
60
  transition:
@@ -1,13 +1,16 @@
1
+ @import "alchemy_admin/select2";
2
+
1
3
  select {
2
4
  @include button-defaults(
3
5
  $background-color: $form-field-background-color,
4
6
  $hover-color: $form-field-background-color,
5
7
  $hover-border-color: darken($default-border-color, 10%),
6
- $padding: 0 2*$default-padding,
8
+ $padding: 0 2 * $default-padding,
7
9
  $border: 1px solid $default-border-color,
8
10
  $box-shadow: none,
9
11
  $color: $text-color,
10
- $margin: 0);
12
+ $margin: 0
13
+ );
11
14
  height: $form-field-height;
12
15
  padding: 0.4em 0.6em;
13
16
  max-width: 100%;
@@ -32,7 +35,8 @@ select {
32
35
  $border: 1px solid $default-border-color,
33
36
  $box-shadow: none,
34
37
  $color: $text-color,
35
- $margin: 0);
38
+ $margin: 0
39
+ );
36
40
  background-image: none;
37
41
  display: block;
38
42
  font-weight: normal;
@@ -79,14 +83,13 @@ select {
79
83
  }
80
84
 
81
85
  &.select2-container-active {
82
-
83
- .select2-choice, .select2-choices {
86
+ .select2-choice,
87
+ .select2-choices {
84
88
  @include default-focus-style($box-shadow: 0 0 0 1px $focus-color);
85
89
  }
86
90
  }
87
91
 
88
92
  &.select2-container-disabled {
89
-
90
93
  &:hover {
91
94
  + .with-hint > .hint-bubble {
92
95
  @include hint-hover-style;
@@ -98,7 +101,8 @@ select {
98
101
  top: 0;
99
102
  }
100
103
 
101
- .select2-choice, .select2-choice:hover {
104
+ .select2-choice,
105
+ .select2-choice:hover {
102
106
  background-image: none;
103
107
  background-color: $light-gray;
104
108
  box-shadow: none;
@@ -108,7 +112,9 @@ select {
108
112
  .select2-arrow {
109
113
  border-color: $border-inset-color;
110
114
 
111
- b { color: $border-inset-color; }
115
+ b {
116
+ color: $border-inset-color;
117
+ }
112
118
  }
113
119
  }
114
120
  }
@@ -142,7 +148,6 @@ select {
142
148
  margin-top: 0 !important;
143
149
 
144
150
  &.select2-container-active {
145
-
146
151
  .select2-choices {
147
152
  @include default-focus-style($box-shadow: 0 0 0 1px $focus-color);
148
153
  }
@@ -214,7 +219,8 @@ select {
214
219
  }
215
220
  }
216
221
 
217
- .select2-no-results, .select2-searching {
222
+ .select2-no-results,
223
+ .select2-searching {
218
224
  padding: 8px;
219
225
  margin: 0;
220
226
  }
@@ -235,41 +241,39 @@ select {
235
241
 
236
242
  .select2-more-results,
237
243
  .select2-ajax-error {
238
- padding: 2*$default-padding;
244
+ padding: 2 * $default-padding;
239
245
  margin-bottom: 0;
240
246
  }
241
247
  }
242
248
 
243
- .window_form, #filter_bar {
244
-
249
+ .window_form,
250
+ #filter_bar {
245
251
  .select2-container {
246
252
  width: 100%;
247
253
  }
248
254
  }
249
255
 
250
256
  .select_with_label {
251
- margin: 0 3*$default-margin;
257
+ margin: 0 3 * $default-margin;
252
258
  display: inline-block;
253
259
  vertical-align: middle;
254
260
 
255
261
  label {
256
262
  display: inline-block;
257
263
  vertical-align: middle;
258
- margin-right: 2*$default-margin;
264
+ margin-right: 2 * $default-margin;
259
265
  }
260
266
  }
261
267
 
262
268
  // overriding important of select2 default style for retina screens
263
269
  @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
264
- only screen and (min-resolution: 2dppx) {
265
-
270
+ only screen and (min-resolution: 2dppx) {
266
271
  #alchemy {
267
-
268
272
  .select2-search input,
269
273
  .select2-search-choice-close,
270
274
  .select2-container .select2-choice abbr,
271
275
  .select2-container .select2-choice .select2-arrow b {
272
- background-image: none !important;
276
+ background-image: none !important;
273
277
  }
274
278
  }
275
279
  }