disco_app 0.9.5 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/disco_app/components/ui-kit/cards/card-footer.es6.jsx +11 -0
  3. data/app/assets/javascripts/disco_app/components/ui-kit/cards/card-header.es6.jsx +11 -0
  4. data/app/assets/javascripts/disco_app/components/ui-kit/cards/card.es6.jsx +10 -3
  5. data/app/assets/javascripts/disco_app/components/ui-kit/cards/cart-section-title.es6.jsx +4 -2
  6. data/app/assets/javascripts/disco_app/components/ui-kit/tables/table.es6.jsx +22 -0
  7. data/app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-layout-item.es6.jsx +11 -0
  8. data/app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-layout-section.es6.jsx +19 -0
  9. data/app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-layout-sections.es6.jsx +11 -0
  10. data/app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-layout.es6.jsx +11 -0
  11. data/app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-page-actions.es6.jsx +11 -2
  12. data/app/assets/stylesheets/disco_app/frame/_buttons.scss +4 -4
  13. data/app/assets/stylesheets/disco_app/frame/_forms.scss +1 -1
  14. data/app/assets/stylesheets/disco_app/ui-kit/_ui-kit.scss +35 -35
  15. data/app/assets/stylesheets/disco_app/ui-kit/_ui-layout.scss +5 -0
  16. data/app/assets/stylesheets/disco_app/ui-kit/_ui-tabs.scss +1 -1
  17. data/app/models/disco_app/concerns/renders_assets.rb +23 -7
  18. data/app/views/layouts/embedded_app.html.erb +2 -1
  19. data/lib/disco_app/version.rb +1 -1
  20. data/test/dummy/config/environments/production.rb +1 -1
  21. data/test/fixtures/assets/test.min.js +1 -0
  22. data/test/models/disco_app/renders_assets_test.rb +5 -1
  23. metadata +38 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1b17eb89a3f6a2f3caaa40ec50fb2a17bc8cccbd21722590efb17fce2bcb305
4
- data.tar.gz: 204dbf1c5ecde8bec93d4383d7a13289a5155fd9162a2e9f1a43947d6a71b8ed
3
+ metadata.gz: d035f8b1439fcfce3409281206fb5c7491d184732b6ae470dd39e9a687bc1cf2
4
+ data.tar.gz: 5a59b8325edc3fc9f497689752e6a43d26073191b6bdc65721f46b4b650d0e1e
5
5
  SHA512:
6
- metadata.gz: deef290c436235c522ad85d5ecfb337e1d7f156f2b4410cadd73d8e873c06822e46556a1a2a95951ca516d65ee72528fe5301c3866e5c68d112f88795b2d3a7d
7
- data.tar.gz: f3d12b4672edc1517d712a3ff8071fdb0c48fb43bfbb2d1dd1e4fd164c78d626a4fbb64ae33e14f8ef4f7cee10ec76d6576e6590ddaef4cb45de3664b2254124
6
+ metadata.gz: bbf3ba9e91a16e369e194029da37bb3999189b042be2a2cd39d2e3826dda975ddfc60655863165a742e0992a214953b1996da0e7ec7e8d41d8e6e123b9f35e38
7
+ data.tar.gz: 1e7c6492bde9f652dc376423e4787b83267e8b3ab05609c5501d1bf334aedf28cbe156b817ea86da9ea750f7bb820d72d6977d06ff38b35ff21c8ac995b9ec6e
@@ -0,0 +1,11 @@
1
+ const CardFooter = ({ children }) => {
2
+ return (
3
+ <div className="next-card__footer">
4
+ {children}
5
+ </div>
6
+ );
7
+ };
8
+
9
+ CardFooter.propTypes = {
10
+ children: React.PropTypes.node.isRequired
11
+ };
@@ -0,0 +1,11 @@
1
+ const CardHeader = ({ title }) => {
2
+ return (
3
+ <div className="next-card__header">
4
+ <CardSectionTitle title={title} />
5
+ </div>
6
+ );
7
+ };
8
+
9
+ CardHeader.propTypes = {
10
+ title: React.PropTypes.string.isRequired
11
+ };
@@ -1,9 +1,16 @@
1
- const Card = ({ children }) => {
1
+ const Card = ({ children, aside }) => {
2
+
3
+ const className = classNames({
4
+ 'next-card': true,
5
+ 'next-card--aside': aside
6
+ });
7
+
2
8
  return (
3
- <div className="next-card">{children}</div>
9
+ <div className={className}>{children}</div>
4
10
  );
5
11
  };
6
12
 
7
13
  Card.PropTypes = {
8
- children: React.PropTypes.node
14
+ children: React.PropTypes.node,
15
+ aside: React.PropTypes.bool
9
16
  };
@@ -1,7 +1,9 @@
1
1
  const CardSectionTitle = ({ title }) => {
2
- return <h3 className="next-heading">{title}</h3>;
2
+ return (
3
+ <h3 className="next-heading">{title}</h3>
4
+ );
3
5
  };
4
6
 
5
7
  CardSectionTitle.propTypes = {
6
- title: React.PropTypes.string
8
+ title: React.PropTypes.string.isRequired
7
9
  };
@@ -0,0 +1,22 @@
1
+ const Table = ({ children, scrollable, sticky }) => {
2
+
3
+ const className = classNames({
4
+ 'table-wrapper': true,
5
+ 'table-wrapper--scrollable': scrollable,
6
+ 'table-wrapper--sticky': sticky
7
+ });
8
+
9
+ return (
10
+ <div className={className}>
11
+ <table className="expanded">
12
+ {children}
13
+ </table>
14
+ </div>
15
+ );
16
+ };
17
+
18
+ Card.PropTypes = {
19
+ children: React.PropTypes.node.isRequired,
20
+ scrollable: React.PropTypes.bool,
21
+ sticky: React.PropTypes.bool
22
+ };
@@ -0,0 +1,11 @@
1
+ const UILayoutItem = ({ children }) => {
2
+ return (
3
+ <div className="ui-layout__item">
4
+ {children}
5
+ </div>
6
+ );
7
+ };
8
+
9
+ UILayoutItem.propTypes = {
10
+ children: React.PropTypes.node
11
+ };
@@ -0,0 +1,19 @@
1
+ const UILayoutSection = ({ children, secondary }) => {
2
+
3
+ const className = classNames({
4
+ 'ui-layout__section': true,
5
+ 'ui-layout__section--primary': !secondary,
6
+ 'ui-layout__section--secondary': secondary
7
+ });
8
+
9
+ return (
10
+ <div className={className}>
11
+ {children}
12
+ </div>
13
+ );
14
+ };
15
+
16
+ UILayoutSection.propTypes = {
17
+ children: React.PropTypes.node,
18
+ secondary: React.PropTypes.bool
19
+ };
@@ -0,0 +1,11 @@
1
+ const UILayoutSections = ({ children }) => {
2
+ return (
3
+ <div className="ui-layout__sections">
4
+ {children}
5
+ </div>
6
+ );
7
+ };
8
+
9
+ UILayoutSections.propTypes = {
10
+ children: React.PropTypes.node
11
+ };
@@ -0,0 +1,11 @@
1
+ const UILayout = ({ children }) => {
2
+ return (
3
+ <div className="ui-layout">
4
+ {children}
5
+ </div>
6
+ );
7
+ };
8
+
9
+ UILayout.propTypes = {
10
+ children: React.PropTypes.node
11
+ };
@@ -1,4 +1,4 @@
1
- const UIPageActions = ({ label, disabled, secondaryHref, secondaryLabel }) => {
1
+ const UIPageActions = ({ label, disabled, secondaryButtons, secondaryHref, secondaryLabel }) => {
2
2
 
3
3
  const buttonClassName = classNames({
4
4
  'btn': true,
@@ -7,7 +7,15 @@ const UIPageActions = ({ label, disabled, secondaryHref, secondaryLabel }) => {
7
7
  });
8
8
 
9
9
  let secondaryElement = null;
10
- if(secondaryHref) {
10
+ if(secondaryButtons) {
11
+ secondaryElement = (
12
+ <div className="ui-page-actions__secondary">
13
+ <div className="button-group">
14
+ {secondaryButtons}
15
+ </div>
16
+ </div>
17
+ );
18
+ } else if(secondaryHref) {
11
19
  secondaryElement = (
12
20
  <div className="ui-page-actions__secondary">
13
21
  <div className="button-group">
@@ -34,6 +42,7 @@ const UIPageActions = ({ label, disabled, secondaryHref, secondaryLabel }) => {
34
42
  UIPageActions.propTypes = {
35
43
  label: React.PropTypes.string.isRequired,
36
44
  disabled: React.PropTypes.bool,
45
+ secondaryButtons: React.PropTypes.node,
37
46
  secondaryHref: React.PropTypes.string,
38
47
  secondaryLabel: React.PropTypes.string
39
48
  };
@@ -31,19 +31,19 @@
31
31
  .btn, .btn-default {
32
32
  background-color: #fcfcfc;
33
33
  border: 1px solid #e3e3e3;
34
- color: #479ccf;
34
+ color: #0078bd;
35
35
 
36
36
  &:hover, &:focus, &.focus {
37
37
  background-color: #efefef;
38
38
  border-color: #d6d6d6;
39
- color: #479ccf;
39
+ color: #0078bd;
40
40
  }
41
41
  }
42
42
 
43
43
  // Primary button
44
44
  .btn-primary {
45
- background-color: #479ccf;
46
- border: 1px solid #2f82b4;
45
+ background-color: #0078bd;
46
+ border: 1px solid #0078bd;
47
47
  color: #fff;
48
48
 
49
49
  &:hover, &:focus, &.focus {
@@ -20,7 +20,7 @@ input[type="url"], {
20
20
  border-radius: 4px;
21
21
 
22
22
  &:focus, &.focus {
23
- border: 1px solid #479ccf;
23
+ border: 1px solid #0078bd;
24
24
  outline: 0;
25
25
  }
26
26
  }
@@ -424,12 +424,12 @@ strong {
424
424
 
425
425
  a {
426
426
  text-decoration: none;
427
- color: #479ccf;
427
+ color: #0078bd;
428
428
  cursor: pointer;
429
429
  }
430
430
 
431
431
  a:hover {
432
- color: #4293c2;
432
+ color: #0069a6;
433
433
  text-decoration: underline;
434
434
  }
435
435
 
@@ -617,7 +617,7 @@ a.type--blog-category:active {
617
617
  }
618
618
 
619
619
  .type--info {
620
- color: #479ccf;
620
+ color: #0078bd;
621
621
  }
622
622
 
623
623
  .type--white {
@@ -1357,14 +1357,14 @@ a.type--subdued:hover {
1357
1357
 
1358
1358
  .btn-default, .btn {
1359
1359
  background-color: #ffffff;
1360
- color: #479ccf;
1360
+ color: #0078bd;
1361
1361
  border: 1px solid #d3dbe2;
1362
1362
  }
1363
1363
 
1364
1364
  .btn-default:hover, .btn:hover, .btn-default:focus, .btn:focus, .btn-default.focus, .focus.btn, .btn-default:active, .btn:active, .btn-default.active, .active.btn {
1365
1365
  border: 1px solid #d3dbe2;
1366
1366
  background-color: #f5f6f7;
1367
- color: #479ccf;
1367
+ color: #0078bd;
1368
1368
  text-decoration: none;
1369
1369
  }
1370
1370
 
@@ -1374,33 +1374,33 @@ a.type--subdued:hover {
1374
1374
  }
1375
1375
 
1376
1376
  .btn-primary {
1377
- background-color: #479ccf;
1377
+ background-color: #0078bd;
1378
1378
  color: #ffffff;
1379
- border: 1px solid #479ccf;
1379
+ border: 1px solid #0078bd;
1380
1380
  }
1381
1381
 
1382
1382
  .btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active {
1383
- border: 1px solid #4293c2;
1384
- background-color: #4293c2;
1383
+ border: 1px solid #0069a6;
1384
+ background-color: #0069a6;
1385
1385
  color: #ffffff;
1386
1386
  text-decoration: none;
1387
1387
  }
1388
1388
 
1389
1389
  .btn-primary:active, .btn-primary.active, .btn-primary.rte-command-active {
1390
1390
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) inset;
1391
- background: #4293c2;
1391
+ background: #0069a6;
1392
1392
  }
1393
1393
 
1394
1394
  .btn-destroy {
1395
1395
  background-color: #ffffff;
1396
- color: #479ccf;
1396
+ color: #0078bd;
1397
1397
  border: 1px solid #d3dbe2;
1398
1398
  }
1399
1399
 
1400
1400
  .btn-destroy:hover, .btn-destroy:focus, .btn-destroy.focus, .btn-destroy:active, .btn-destroy.active {
1401
1401
  border: 1px solid #d3dbe2;
1402
1402
  background-color: #ff5d5d;
1403
- color: #479ccf;
1403
+ color: #0078bd;
1404
1404
  text-decoration: none;
1405
1405
  }
1406
1406
 
@@ -1670,7 +1670,7 @@ input[type="submit"].btn-disabled.btn--outline,
1670
1670
  background-color: transparent !important;
1671
1671
  border: none;
1672
1672
  cursor: pointer;
1673
- color: #479ccf;
1673
+ color: #0078bd;
1674
1674
  text-decoration: none;
1675
1675
  vertical-align: initial;
1676
1676
  }
@@ -1686,7 +1686,7 @@ input[type="submit"].btn-disabled.btn--outline,
1686
1686
 
1687
1687
  .btn--plain:hover,
1688
1688
  .btn--link:hover {
1689
- color: #4293c2;
1689
+ color: #0069a6;
1690
1690
  text-decoration: underline;
1691
1691
  }
1692
1692
 
@@ -1736,7 +1736,7 @@ input[type="submit"].btn-disabled.btn--outline,
1736
1736
  }
1737
1737
 
1738
1738
  .segmented > li .btn.btn-primary {
1739
- border: 1px solid #479ccf;
1739
+ border: 1px solid #0078bd;
1740
1740
  border-right-color: #3e89b5;
1741
1741
  }
1742
1742
 
@@ -1756,7 +1756,7 @@ input[type="submit"].btn-disabled.btn--outline,
1756
1756
  }
1757
1757
 
1758
1758
  .segmented > li:last-child .btn.btn-primary {
1759
- border-right-color: #479ccf;
1759
+ border-right-color: #0078bd;
1760
1760
  }
1761
1761
 
1762
1762
  .segmented > li.middle-child > .btn {
@@ -2297,7 +2297,7 @@ input[type="submit"].btn-disabled.btn--outline,
2297
2297
  }
2298
2298
 
2299
2299
  .next-card__section--accentuated {
2300
- background-color: #479ccf;
2300
+ background-color: #0078bd;
2301
2301
  }
2302
2302
 
2303
2303
  .next-card__section--accentuated .next-heading {
@@ -2560,7 +2560,7 @@ input, textarea {
2560
2560
  }
2561
2561
 
2562
2562
  input:focus, input.focus, textarea:focus, textarea.focus {
2563
- border: 1px solid #479ccf;
2563
+ border: 1px solid #0078bd;
2564
2564
  outline: none;
2565
2565
  }
2566
2566
 
@@ -2680,7 +2680,7 @@ input[type=checkbox], input[type=radio] {
2680
2680
  }
2681
2681
 
2682
2682
  input[type=checkbox]:focus, input[type=radio]:focus {
2683
- outline: 2px auto #479ccf;
2683
+ outline: 2px auto #0078bd;
2684
2684
  }
2685
2685
 
2686
2686
  input[type=file] {
@@ -2763,7 +2763,7 @@ select.error {
2763
2763
 
2764
2764
  select:focus, select.focus {
2765
2765
  outline: none;
2766
- border: 1px solid #479ccf;
2766
+ border: 1px solid #0078bd;
2767
2767
  }
2768
2768
 
2769
2769
  select.full-width {
@@ -2955,7 +2955,7 @@ span.arrow {
2955
2955
  }
2956
2956
 
2957
2957
  .styled-file-input .btn > span, .styled-file-input .btn--plain > span {
2958
- color: #479ccf;
2958
+ color: #0078bd;
2959
2959
  }
2960
2960
 
2961
2961
  .styled-file-input .btn > label, .styled-file-input .btn--plain > label {
@@ -3070,8 +3070,8 @@ span.arrow {
3070
3070
  }
3071
3071
 
3072
3072
  .radio-filter-input:checked + .radio-filter-all:before {
3073
- background: #479ccf;
3074
- border-color: #479ccf;
3073
+ background: #0078bd;
3074
+ border-color: #0078bd;
3075
3075
  }
3076
3076
 
3077
3077
  .radio-filter-input:checked + .radio-filter-store:before {
@@ -3098,7 +3098,7 @@ span.arrow {
3098
3098
  }
3099
3099
 
3100
3100
  input[type="checkbox"].dom-switch ~ .dom-switch-button {
3101
- color: #479ccf;
3101
+ color: #0078bd;
3102
3102
  font-weight: normal;
3103
3103
  cursor: pointer;
3104
3104
  }
@@ -3243,7 +3243,7 @@ input[type=button].next-input--button {
3243
3243
  }
3244
3244
 
3245
3245
  .next-input:focus, .next-input--stylized:focus, .next-textarea:focus {
3246
- border: 1px solid #479ccf;
3246
+ border: 1px solid #0078bd;
3247
3247
  }
3248
3248
 
3249
3249
  .next-form.next-form--full-width {
@@ -3322,7 +3322,7 @@ input[type=submit].next-input--submit {
3322
3322
  padding: 10px 15px;
3323
3323
  border: none;
3324
3324
  border-radius: 3px;
3325
- background-color: #479ccf;
3325
+ background-color: #0078bd;
3326
3326
  color: #ffffff;
3327
3327
  font-size: 13px;
3328
3328
  }
@@ -3576,11 +3576,11 @@ input[type=checkbox].next-checkbox {
3576
3576
  }
3577
3577
 
3578
3578
  .next-radio:active ~ .next-radio--styled, .next-radio:focus .next-radio--styled {
3579
- border-color: #479ccf;
3579
+ border-color: #0078bd;
3580
3580
  }
3581
3581
 
3582
3582
  .next-radio:checked ~ .next-radio--styled::after {
3583
- background-color: #479ccf;
3583
+ background-color: #0078bd;
3584
3584
  -webkit-transform: translate(-50%, -50%) scale(1);
3585
3585
  -ms-transform: translate(-50%, -50%) scale(1);
3586
3586
  transform: translate(-50%, -50%) scale(1);
@@ -3611,11 +3611,11 @@ input[type=checkbox].next-checkbox {
3611
3611
  }
3612
3612
 
3613
3613
  .next-checkbox:active ~ .next-checkbox--styled, .next-checkbox:focus ~ .next-checkbox--styled {
3614
- border-color: #479ccf;
3614
+ border-color: #0078bd;
3615
3615
  }
3616
3616
 
3617
3617
  .next-input--is-focused {
3618
- border: 1px solid #479ccf;
3618
+ border: 1px solid #0078bd;
3619
3619
  }
3620
3620
 
3621
3621
  .next-input--has-error {
@@ -3634,7 +3634,7 @@ input[type=checkbox].next-checkbox {
3634
3634
  }
3635
3635
 
3636
3636
  .next-select__wrapper.next-input--is-focused {
3637
- border-color: #479ccf;
3637
+ border-color: #0078bd;
3638
3638
  }
3639
3639
 
3640
3640
  .next-select__wrapper .next-icon {
@@ -3747,7 +3747,7 @@ input[type=checkbox].next-checkbox {
3747
3747
  }
3748
3748
 
3749
3749
  .next-field--connected:focus:not(.btn) + .next-field--connected, .next-field--connected.next-input--is-focused + .next-field--connected {
3750
- border-left: solid 1px #479ccf;
3750
+ border-left: solid 1px #0078bd;
3751
3751
  }
3752
3752
 
3753
3753
  .next-field--connected.btn:focus + .next-field--connected {
@@ -4041,11 +4041,11 @@ input[type=checkbox].next-checkbox {
4041
4041
  }
4042
4042
 
4043
4043
  .next-icon--color-blue {
4044
- fill: #479ccf;
4044
+ fill: #0078bd;
4045
4045
  }
4046
4046
 
4047
4047
  .next-icon--blue {
4048
- fill: #479ccf;
4048
+ fill: #0078bd;
4049
4049
  }
4050
4050
 
4051
4051
  .next-icon--color-blue-lighter {
@@ -4474,7 +4474,7 @@ th.is-sortable {
4474
4474
 
4475
4475
  th.is-sortable:hover {
4476
4476
  background: #eff9fd;
4477
- color: #479ccf;
4477
+ color: #0078bd;
4478
4478
  }
4479
4479
 
4480
4480
  th.sorted-desc > span, th.sorted-asc > span {
@@ -8,3 +8,8 @@ body {
8
8
  margin: 0;
9
9
  padding: 0;
10
10
  }
11
+
12
+ ul, ol, dl {
13
+ margin: 0;
14
+ padding: 0;
15
+ }
@@ -60,7 +60,7 @@
60
60
  &:hover {
61
61
  outline: none;
62
62
  background-color: #fafbfc;
63
- color: #479ccf;
63
+ color: #0078bd;
64
64
  text-decoration: none;
65
65
  }
66
66
 
@@ -1,4 +1,5 @@
1
1
  require 'render_anywhere'
2
+ require 'uglifier'
2
3
 
3
4
  module DiscoApp::Concerns::RendersAssets
4
5
  extend ActiveSupport::Concern
@@ -34,9 +35,12 @@ module DiscoApp::Concerns::RendersAssets
34
35
  # tags created or updated after being rendered to the
35
36
  # storefront.
36
37
  #
37
- # compress: Optional. Whether Javascript and SCSS assets should be
38
- # compressed after being rendered. Defaults to true in
39
- # production environments, false otherwise.
38
+ # minify: Optional. Whether Javascript assets should be minified
39
+ # after being rendered. Defaults to true in production
40
+ # environments, false otherwise. Note that stylesheet
41
+ # assets, when uploaded as .scss files, are
42
+ # automatically minified by Shopify, so we don't need to
43
+ # do it on our end.
40
44
  #
41
45
  def renders_assets(*asset_groups)
42
46
  options = asset_groups.last.is_a?(Hash) ? asset_groups.pop : {}
@@ -62,7 +66,8 @@ module DiscoApp::Concerns::RendersAssets
62
66
  {
63
67
  assets: nil,
64
68
  triggered_by: nil,
65
- compress: Rails.env.production?
69
+ script_tags: nil,
70
+ minify: Rails.env.production?
66
71
  }
67
72
  end
68
73
 
@@ -95,7 +100,7 @@ module DiscoApp::Concerns::RendersAssets
95
100
  shopify_asset = shop.temp {
96
101
  ShopifyAPI::Asset.create(
97
102
  key: asset,
98
- value: render_asset_group_asset(asset, public_urls)
103
+ value: render_asset_group_asset(asset, public_urls, options)
99
104
  )
100
105
  }
101
106
 
@@ -117,8 +122,8 @@ module DiscoApp::Concerns::RendersAssets
117
122
  private
118
123
 
119
124
  # Render an individual asset within an asset group.
120
- def render_asset_group_asset(asset, public_urls)
121
- render_asset_renderer.render_to_string(
125
+ def render_asset_group_asset(asset, public_urls, options)
126
+ rendered_asset = render_asset_renderer.render_to_string(
122
127
  template: asset,
123
128
  layout: nil,
124
129
  locals: {
@@ -126,6 +131,17 @@ module DiscoApp::Concerns::RendersAssets
126
131
  :@public_urls => public_urls
127
132
  }
128
133
  )
134
+
135
+ if should_be_minified?(asset, options)
136
+ ::Uglifier.compile(rendered_asset)
137
+ else
138
+ rendered_asset
139
+ end
140
+ end
141
+
142
+ # Return true if the given asset should be minified with Uglifier.
143
+ def should_be_minified?(asset, options)
144
+ asset.to_s.end_with?('.js') and options[:minify]
129
145
  end
130
146
 
131
147
  def render_asset_renderer
@@ -24,7 +24,8 @@
24
24
  ShopifyApp.Bar.initialize({
25
25
  title: "<%= yield(:title) %>",
26
26
  icon: "<%= image_url("disco_app/icon.svg") %>",
27
- buttons: <%= content_for?(:buttons) ? content_for(:buttons) : '{}' %>
27
+ buttons: <%= content_for?(:buttons) ? content_for(:buttons) : '{}' %>,
28
+ breadcrumb: <%= content_for?(:breadcrumb) ? content_for(:breadcrumb) : 'undefined' %>
28
29
  });
29
30
  </script>
30
31
 
@@ -1,3 +1,3 @@
1
1
  module DiscoApp
2
- VERSION = '0.9.5'
2
+ VERSION = '0.9.6'
3
3
  end
@@ -32,7 +32,7 @@ Rails.application.configure do
32
32
 
33
33
  # Compress JavaScripts and CSS.
34
34
  config.assets.js_compressor = :uglifier
35
- # config.assets.css_compressor = :sass
35
+ config.assets.css_compressor = :sass
36
36
 
37
37
  # Do not fallback to assets pipeline if a precompiled asset is missed.
38
38
  config.assets.compile = false
@@ -0,0 +1 @@
1
+ var locale="sv";
@@ -61,7 +61,11 @@ class DiscoApp::RendersAssetsTest < ActiveSupport::TestCase
61
61
  ##
62
62
 
63
63
  test 'individual js asset renders correctly' do
64
- assert_equal asset_fixture('test.js'), @js_configuration.send('render_asset_group_asset', 'assets/test.js', {})
64
+ assert_equal asset_fixture('test.js'), @js_configuration.send('render_asset_group_asset', 'assets/test.js', {}, {})
65
+ end
66
+
67
+ test 'individual js asset renders correctly with minification' do
68
+ assert_equal asset_fixture('test.min.js').strip, @js_configuration.send('render_asset_group_asset', 'assets/test.js', {}, minify: true)
65
69
  end
66
70
 
67
71
  test 'js asset group renders and uploads to shopify' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: disco_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Ballard
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 4.0.2
69
- - !ruby/object:Gem::Dependency
70
- name: bootstrap-sass
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 3.3.5.1
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 3.3.5.1
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: jquery-rails
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -234,6 +220,34 @@ dependencies:
234
220
  - - "~>"
235
221
  - !ruby/object:Gem::Version
236
222
  version: 0.0.12
223
+ - !ruby/object:Gem::Dependency
224
+ name: sass
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - "~>"
228
+ - !ruby/object:Gem::Version
229
+ version: 3.4.22
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - "~>"
235
+ - !ruby/object:Gem::Version
236
+ version: 3.4.22
237
+ - !ruby/object:Gem::Dependency
238
+ name: uglifier
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: 1.3.0
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: 1.3.0
237
251
  - !ruby/object:Gem::Dependency
238
252
  name: sqlite3
239
253
  requirement: !ruby/object:Gem::Requirement
@@ -338,6 +352,8 @@ files:
338
352
  - app/assets/javascripts/disco_app/components/custom/shop_list.js.jsx
339
353
  - app/assets/javascripts/disco_app/components/custom/shop_row.js.jsx
340
354
  - app/assets/javascripts/disco_app/components/custom/shopify_admin_link.js.jsx
355
+ - app/assets/javascripts/disco_app/components/ui-kit/cards/card-footer.es6.jsx
356
+ - app/assets/javascripts/disco_app/components/ui-kit/cards/card-header.es6.jsx
341
357
  - app/assets/javascripts/disco_app/components/ui-kit/cards/card-section.es6.jsx
342
358
  - app/assets/javascripts/disco_app/components/ui-kit/cards/card.es6.jsx
343
359
  - app/assets/javascripts/disco_app/components/ui-kit/cards/cart-section-title.es6.jsx
@@ -351,9 +367,14 @@ files:
351
367
  - app/assets/javascripts/disco_app/components/ui-kit/icons/icon-chevron.es6.jsx
352
368
  - app/assets/javascripts/disco_app/components/ui-kit/icons/next-icon.es6.jsx
353
369
  - app/assets/javascripts/disco_app/components/ui-kit/input_select.es6.jsx
370
+ - app/assets/javascripts/disco_app/components/ui-kit/tables/table.es6.jsx
354
371
  - app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-annotated-section.es6.jsx
355
372
  - app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-empty-state.es6.jsx
356
373
  - app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-footer-help.es6.jsx
374
+ - app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-layout-item.es6.jsx
375
+ - app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-layout-section.es6.jsx
376
+ - app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-layout-sections.es6.jsx
377
+ - app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-layout.es6.jsx
357
378
  - app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-page-actions.es6.jsx
358
379
  - app/assets/javascripts/disco_app/disco_app.js
359
380
  - app/assets/javascripts/disco_app/frame.js
@@ -621,6 +642,7 @@ files:
621
642
  - test/fixtures/api/widget_store/shop.json
622
643
  - test/fixtures/api/widget_store/webhooks.json
623
644
  - test/fixtures/assets/test.js
645
+ - test/fixtures/assets/test.min.js
624
646
  - test/fixtures/disco_app/application_charges.yml
625
647
  - test/fixtures/disco_app/plan_codes.yml
626
648
  - test/fixtures/disco_app/plans.yml
@@ -768,6 +790,7 @@ test_files:
768
790
  - test/fixtures/api/widget_store/charges/activate_application_charge_request.json
769
791
  - test/fixtures/api/widget_store/shop.json
770
792
  - test/fixtures/assets/test.js
793
+ - test/fixtures/assets/test.min.js
771
794
  - test/fixtures/widget_configurations.yml
772
795
  - test/fixtures/js_configurations.yml
773
796
  - test/fixtures/disco_app/plan_codes.yml