workarea-product_quickview 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +20 -0
  3. data/.eslintrc +24 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  5. data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
  6. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  7. data/.gitignore +15 -0
  8. data/.scss-lint.yml +192 -0
  9. data/CHANGELOG.md +153 -0
  10. data/CODE_OF_CONDUCT.md +3 -0
  11. data/CONTRIBUTING.md +3 -0
  12. data/Gemfile +9 -0
  13. data/LICENSE +52 -0
  14. data/README.md +68 -0
  15. data/Rakefile +43 -0
  16. data/app/assets/javascripts/workarea/storefront/product_quickview/modules/quickview_button_placeholders.js +47 -0
  17. data/app/assets/javascripts/workarea/storefront/product_quickview/templates/quickview_button.jst.ejs +3 -0
  18. data/app/assets/stylesheets/workarea/storefront/product_quickview/components/_quickview_button.scss +20 -0
  19. data/app/controllers/workarea/storefront/products_controller.decorator +10 -0
  20. data/app/helpers/workarea/storefront/product_quickview_helper.rb +19 -0
  21. data/app/models/workarea/catalog/product.decorator +13 -0
  22. data/app/views/workarea/storefront/products/_quickview_button_placeholder.html.haml +2 -0
  23. data/app/views/workarea/storefront/products/quickview.html.haml +3 -0
  24. data/bin/rails +18 -0
  25. data/config/initializers/appends.rb +21 -0
  26. data/config/initializers/configuration.rb +10 -0
  27. data/config/locales/en.yml +6 -0
  28. data/config/routes.rb +2 -0
  29. data/lib/workarea/product_quickview.rb +11 -0
  30. data/lib/workarea/product_quickview/engine.rb +12 -0
  31. data/lib/workarea/product_quickview/version.rb +5 -0
  32. data/test/dummy/Rakefile +6 -0
  33. data/test/dummy/app/assets/config/manifest.js +4 -0
  34. data/test/dummy/app/assets/images/.keep +0 -0
  35. data/test/dummy/app/assets/javascripts/application.js +13 -0
  36. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  37. data/test/dummy/app/controllers/application_controller.rb +3 -0
  38. data/test/dummy/app/controllers/concerns/.keep +0 -0
  39. data/test/dummy/app/helpers/application_helper.rb +2 -0
  40. data/test/dummy/app/jobs/application_job.rb +2 -0
  41. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  42. data/test/dummy/app/models/concerns/.keep +0 -0
  43. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  44. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  45. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  46. data/test/dummy/bin/bundle +3 -0
  47. data/test/dummy/bin/rails +4 -0
  48. data/test/dummy/bin/rake +4 -0
  49. data/test/dummy/bin/setup +34 -0
  50. data/test/dummy/bin/update +29 -0
  51. data/test/dummy/config.ru +5 -0
  52. data/test/dummy/config/application.rb +18 -0
  53. data/test/dummy/config/boot.rb +5 -0
  54. data/test/dummy/config/cable.yml +9 -0
  55. data/test/dummy/config/environment.rb +5 -0
  56. data/test/dummy/config/environments/development.rb +54 -0
  57. data/test/dummy/config/environments/production.rb +83 -0
  58. data/test/dummy/config/environments/test.rb +43 -0
  59. data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
  60. data/test/dummy/config/initializers/assets.rb +11 -0
  61. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  62. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  63. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  64. data/test/dummy/config/initializers/inflections.rb +16 -0
  65. data/test/dummy/config/initializers/mime_types.rb +4 -0
  66. data/test/dummy/config/initializers/session_store.rb +3 -0
  67. data/test/dummy/config/initializers/workarea.rb +5 -0
  68. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  69. data/test/dummy/config/locales/en.yml +23 -0
  70. data/test/dummy/config/puma.rb +47 -0
  71. data/test/dummy/config/routes.rb +5 -0
  72. data/test/dummy/config/secrets.yml +22 -0
  73. data/test/dummy/lib/assets/.keep +0 -0
  74. data/test/dummy/log/.keep +0 -0
  75. data/test/helpers/workarea/storefront/product_quickview_helper_test.rb +33 -0
  76. data/test/models/workarea/product_quickview_test.rb +20 -0
  77. data/test/system/workarea/storefront/analytics_system_test.decorator +31 -0
  78. data/test/system/workarea/storefront/products_quickview_system_test.rb +65 -0
  79. data/test/test_helper.rb +10 -0
  80. data/workarea-product_quickview.gemspec +24 -0
  81. metadata +136 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 00f5ed49cf0126224ed49b40bc38c081a53e159ba8a63ef86ca7984c0a7a2ec4
4
+ data.tar.gz: f61a48e7c148dbfb3474610b4f7563a4e5fafeea7bc10a8770e5b608e7819337
5
+ SHA512:
6
+ metadata.gz: 04f1083955d68ae1a3c93e5ec288421f214b18dc22dd55830944357abb32045f9495c8b42f702dfea02414153057ab8d515f5055110244669a333fa6ea2fad04
7
+ data.tar.gz: a555ce9f3410c766623a3c6557f61b9918d10a3baa32d2e7adc51018be58d1716ce0ddf9c9f66f70efcb1bc33074964e00b133803d3eb460dcae7f5f620054ee
data/.editorconfig ADDED
@@ -0,0 +1,20 @@
1
+ # editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = space
7
+ end_of_line = lf
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [{*.rb,*.haml,*.decorator,*.yml,*.yaml,*.jbuilder}]
12
+ indent_size = 2
13
+ indent_style = space
14
+
15
+ [{*.js,*.jst,*.ejs,*.scss}]
16
+ indent_size = 4
17
+
18
+ [*.md]
19
+ indent_size = 4
20
+ trim_trailing_whitespace = false
data/.eslintrc ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "extends": "eslint:recommended",
3
+ "rules": {
4
+ "semi": [1, "always"]
5
+ },
6
+ "globals": {
7
+ "window": true,
8
+ "document": true,
9
+ "WORKAREA": true,
10
+ "$": true,
11
+ "jQuery": true,
12
+ "_": true,
13
+ "feature": true,
14
+ "JST": true,
15
+ "Turbolinks": true,
16
+ "I18n": true,
17
+ "Chart": true,
18
+ "Dropzone": true,
19
+ "strftime": true,
20
+ "Waypoint": true,
21
+ "wysihtml": true,
22
+ "LocalTime": true,
23
+ }
24
+ }
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve Workarea
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ⚠️**Before you create**⚠️
11
+ Please verify the issue you're experiencing is not part of your Workarea project customizations. The best way to do this is with a [vanilla Workarea installation](https://developer.workarea.com/articles/create-a-new-host-application.html). This will help us spend time on fixes/improvements for the whole community. Thank you!
12
+
13
+ **Describe the bug**
14
+ A clear and concise description of what the bug is.
15
+
16
+ **To Reproduce**
17
+ Steps to reproduce the behavior:
18
+ 1. Go to '...'
19
+ 2. Click on '....'
20
+ 3. Scroll down to '....'
21
+ 4. See error
22
+
23
+ **Expected behavior**
24
+ A clear and concise description of what you expected to happen.
25
+
26
+ **Workarea Setup (please complete the following information):**
27
+ - Workarea Version: [e.g. v3.4.6]
28
+ - Plugins [e.g. workarea-blog, workarea-sitemaps]
29
+
30
+ **Attachments**
31
+ If applicable, add any attachments to help explain your problem, things like:
32
+ - screenshots
33
+ - Gemfile.lock
34
+ - test cases
35
+
36
+ **Additional context**
37
+ Add any other context about the problem here.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Documentation request
3
+ about: Suggest documentation
4
+ title: ''
5
+ labels: documentation
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your documentation related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm confused by [...]
12
+
13
+ **Describe the article you'd like**
14
+ A clear and concise description of what would be in the documentation article.
15
+
16
+ **Additional context**
17
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for Workarea
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ test/dummy/db/*.sqlite3
5
+ test/dummy/db/*.sqlite3-journal
6
+ test/dummy/log/*.log
7
+ test/dummy/tmp/
8
+ test/dummy/public/
9
+ Gemfile.lock
10
+ test/dummy/public/system/
11
+ .DS_STORE
12
+ node_modules
13
+ test/reports
14
+ package.json
15
+ yarn.lock
data/.scss-lint.yml ADDED
@@ -0,0 +1,192 @@
1
+ # Extension of the default configuration:
2
+ # https://github.com/causes/scss-lint/blob/master/config/default.yml
3
+
4
+ exclude: 'docs/**'
5
+
6
+ linters:
7
+ Comment:
8
+ enabled: false
9
+
10
+ DeclarationOrder:
11
+ enabled: true
12
+
13
+ ElsePlacement:
14
+ enabled: true
15
+
16
+ EmptyRule:
17
+ enabled: false
18
+
19
+ HexLength:
20
+ enabled: true
21
+ style: long
22
+
23
+ Indentation:
24
+ enabled: true
25
+ allow_non_nested_indentation: true
26
+ character: space
27
+ width: 4
28
+
29
+ LeadingZero:
30
+ enabled: true
31
+ style: include_zero
32
+
33
+ MergeableSelector:
34
+ enabled: true
35
+ force_nesting: false
36
+
37
+ PropertySortOrder:
38
+ enabled: true
39
+ ignore_unspecified: false
40
+ separate_groups: false
41
+ order:
42
+ - display
43
+ -
44
+ - position
45
+ - top
46
+ - right
47
+ - bottom
48
+ - left
49
+ - z-index
50
+ -
51
+ - margin
52
+ - margin-top
53
+ - margin-right
54
+ - margin-bottom
55
+ - margin-left
56
+ -
57
+ - margin-collapse
58
+ - margin-top-collapse
59
+ - margin-right-collapse
60
+ - margin-bottom-collapse
61
+ - margin-left-collapse
62
+ -
63
+ - padding
64
+ - padding-top
65
+ - padding-right
66
+ - padding-bottom
67
+ - padding-left
68
+ -
69
+ - width
70
+ - height
71
+ - max-width
72
+ - max-height
73
+ - min-width
74
+ - min-height
75
+ -
76
+ - float
77
+ - clear
78
+ -
79
+ - color
80
+ -
81
+ - font
82
+ - font-size
83
+ - font-style
84
+ - font-family
85
+ - font-weight
86
+ - font-variant
87
+ - font-smoothing
88
+ -
89
+ - line-height
90
+ - letter-spacing
91
+ - word-spacing
92
+ -
93
+ - text-align
94
+ - text-indent
95
+ - text-shadow
96
+ - text-overflow
97
+ - text-rendering
98
+ - text-transform
99
+ - text-decoration
100
+ - text-size-adjust
101
+ -
102
+ - word-break
103
+ - word-wrap
104
+ -
105
+ - white-space
106
+ -
107
+ - background
108
+ - background-size
109
+ - background-color
110
+ - background-image
111
+ - background-repeat
112
+ - background-position
113
+ - background-attachment
114
+ -
115
+ - border
116
+ - border-top
117
+ - border-right
118
+ - border-bottom
119
+ - border-left
120
+ -
121
+ - border-image
122
+ - border-spacing
123
+ - border-collapse
124
+ -
125
+ - border-color
126
+ - border-top-color
127
+ - border-right-color
128
+ - border-bottom-color
129
+ - border-left-color
130
+ -
131
+ - border-style
132
+ - border-top-style
133
+ - border-right-style
134
+ - border-bottom-style
135
+ - border-left-style
136
+ -
137
+ - border-width
138
+ - border-top-width
139
+ - border-right-width
140
+ - border-bottom-width
141
+ - border-left-width
142
+ -
143
+ - border-radius
144
+ - border-top-right-radius
145
+ - border-bottom-right-radius
146
+ - border-bottom-left-radius
147
+ - border-top-left-radius
148
+ - border-radius-topright
149
+ - border-radius-bottomright
150
+ - border-radius-bottomleft
151
+ - border-radius-topleft
152
+ -
153
+ - box-shadow
154
+
155
+ SelectorFormat:
156
+ enabled: true
157
+ convention: hyphenated_BEM
158
+
159
+ SingleLinePerSelector:
160
+ enabled: false
161
+
162
+ SpaceAfterPropertyColon:
163
+ enabled: true
164
+ style: at_least_one_space
165
+
166
+ SpaceBeforeBrace:
167
+ enabled: true
168
+ style: space
169
+ allow_single_line_padding: true
170
+
171
+ VariableForProperty:
172
+ enabled: true
173
+ properties:
174
+ - color
175
+ - font-family
176
+ - background-color
177
+
178
+ PseudoElement:
179
+ enabled: false
180
+
181
+ # These default settings may be problematic to implementors. They are not
182
+ # ommitted so that they may be adjusted as needed during an implementation.
183
+ #
184
+ # For documentation:
185
+ # https://github.com/causes/scss-lint/blob/master/lib/scss_lint/linter/README.md
186
+
187
+ DuplicateProperty:
188
+ enabled: true
189
+
190
+ PropertySpelling:
191
+ enabled: true
192
+ extra_properties: [] # Add experimental CSS to this array, if needed
data/CHANGELOG.md ADDED
@@ -0,0 +1,153 @@
1
+ Workarea Product Quickview 2.0.2 (2019-08-23)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * Open Source! For real!
5
+
6
+
7
+
8
+ Workarea Product Quickview 2.0.1 (2019-08-21)
9
+ --------------------------------------------------------------------------------
10
+
11
+ * Open Source! lol jk
12
+
13
+
14
+
15
+ Workarea Product Quickview 2.0.0 (2019-03-13)
16
+ --------------------------------------------------------------------------------
17
+
18
+ * Persist Quickview Buttons for all devices
19
+
20
+ QUICKVIEW-18
21
+ Curt Howard
22
+
23
+
24
+
25
+ Workarea Product Quickview 1.2.2 (2019-02-20)
26
+ --------------------------------------------------------------------------------
27
+
28
+ * Remove Quickview Button UI when screen is touched
29
+
30
+ This solution should offer a superior UX for users operating a
31
+ touch-screen device. Since browser detection is lacking in this area,
32
+ the best way to accomplish is to trigger an event when the screen is
33
+ actually pressed. At this point we simply remove all quickview buttons
34
+ on the current page.
35
+
36
+ QUICKVIEW-17
37
+ Curt Howard
38
+
39
+ * Update for workarea v3.4 compatibility
40
+
41
+ QUICKVIEW-16
42
+ Matt Duffy
43
+
44
+
45
+
46
+ Workarea Product Quickview 1.2.1 (2018-07-24)
47
+ --------------------------------------------------------------------------------
48
+
49
+ * Fix failing test due to current SKU changes
50
+
51
+ QUICKVIEW-15
52
+ Ben Crouse
53
+
54
+
55
+
56
+ Workarea Product Quickview 1.2.0 (2018-05-24)
57
+ --------------------------------------------------------------------------------
58
+
59
+ * Make config list known prodcut template types for configuration
60
+
61
+ Copying config.product_templates made the configuration load order
62
+ dependent. If a plugin added a template but was added after quickview
63
+ it would not have quickview. The updated config is now a baseline for
64
+ product-team-supported plugins that add templates. Any other theme or
65
+ plugin is responsible for checking for quickview and adding itself
66
+ otherwise.
67
+
68
+ QUICKVIEW-13
69
+ Matt Duffy
70
+
71
+ * Leverage Workarea Changelog task
72
+
73
+ ECOMMERCE-5355
74
+ Curt Howard
75
+
76
+
77
+
78
+ Workarea Product Quickview 1.1.0 (2018-02-06)
79
+ --------------------------------------------------------------------------------
80
+
81
+ * Opt-out of product quickview
82
+
83
+ Certain products, like package products, are not able to be quickviewed
84
+ because of their complex detail pages. Quick-viewing products can now be
85
+ enabled or disabled on a per-product basis. We leverage the template
86
+ configuration, adding a new config setting called `product_quickview_templates`.
87
+ The templates in this array of symbols are the only product templates that can
88
+ be quickviewed. By default, all configured `product_templates` from base
89
+ will be quick-viewable, but plugins that add templates must also add
90
+ their template to `product_quickview_templates` if they are
91
+ able to be quickviewed.
92
+
93
+ QUICKVIEW-12
94
+ Tom Scott
95
+
96
+ * Opt-out of product quickview
97
+
98
+ Certain products, like package products, are not able to be quickviewed
99
+ because of their complex detail pages. Introduce the
100
+ `Catalog::Product#quickview?` method that defaults to `true` in these
101
+ cases, so that method can be overridden by plugins if they want to
102
+ opt-out of quickview functionality.
103
+
104
+ This also prevents a double render error from occurring when both
105
+ package products and quickview are enabled, by using an `and return`
106
+ clause to halt execution in the controller action.
107
+
108
+ QUICKVIEW-12
109
+ Tom Scott
110
+
111
+
112
+ Workarea Product Quickview 1.0.2 (2017-12-12)
113
+ --------------------------------------------------------------------------------
114
+
115
+ * Add TestCase::SearchIndexing to helper test
116
+
117
+ Fixes the build for this plugin, and opened up an issue in `ViewTest` for base
118
+ wherein we need this module to be included.
119
+
120
+ QUICKVIEW-11
121
+ Tom Scott
122
+
123
+
124
+ Workarea Product Quickview 1.0.1 (2017-06-08)
125
+ --------------------------------------------------------------------------------
126
+
127
+ * Remove unneeded explicit render from products#show
128
+
129
+ The base action does not define an explicit render, this allows plugins
130
+ to add alternative render actions without conflict or DoubleRender errors.
131
+
132
+ QUICKVIEW-9
133
+ Matt Duffy
134
+
135
+ * Move the helper to engine so that it loads earlier in the boot process
136
+
137
+ QUICKVIEW-8
138
+ Dave Barnow
139
+
140
+ * Fix failing test
141
+
142
+ The test was failing because quickview is now showing only when hovering
143
+ QUICKVIEW-7
144
+ Dave Barnow
145
+
146
+ * Bring in new rubocop config, appease rubocop
147
+
148
+ QUICKVIEW-6
149
+ Dave Barnow
150
+
151
+
152
+ Workarea Product Quickview 1.0.0 (2017-05-26)
153
+ --------------------------------------------------------------------------------