Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
damassi committed Jan 23, 2018
1 parent 5ba12dd commit 8e82b76
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 13 deletions.
5 changes: 4 additions & 1 deletion desktop/analytics/article_impressions.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const $ = require('jquery')
const _ = require('underscore')

if (location.pathname.match('/article/') || location.pathname.match('/articles')) {
var trackedImpressions = []

Expand Down Expand Up @@ -123,7 +126,7 @@ if (location.pathname.match('/article/') || location.pathname.match('/articles')
id: 'article_callout:' + articleId + ':' + destinationPath
}
} else {
return

}
}).toArray()

Expand Down
3 changes: 1 addition & 2 deletions desktop/apps/auction/components/DOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import mediator from 'desktop/lib/mediator.coffee'
import scrollToTop from 'desktop/apps/auction/utils/scrollToTop'
import { Component } from 'react'
import { connect } from 'react-redux'
import { data as sd } from 'sharify'

class DOM extends Component {
static propTypes = {
Expand All @@ -22,7 +21,7 @@ class DOM extends Component {
const FastClick = require('fastclick')

// removes 300ms delay
if (sd.NODE_ENV === 'test') {
if (FastClick.attach) {
FastClick.attach(document.body)
}

Expand Down
3 changes: 1 addition & 2 deletions desktop/apps/auctions2/components/DOM.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import PropTypes from 'prop-types'
import { Component } from 'react'
import { connect } from 'react-redux'
import { data as sd } from 'sharify'

class DOM extends Component {
static propTypes = {
Expand All @@ -16,7 +15,7 @@ class DOM extends Component {
const FastClick = require('fastclick')

// removes 300ms delay
if (sd.NODE_ENV === 'test') {
if (FastClick.attach) {
FastClick.attach(document.body)
}

Expand Down
6 changes: 4 additions & 2 deletions desktop/apps/inquiry/client/routes/inquiry.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
_ = require 'underscore'
attachFastClick = -> require('fastclick') arguments...
{ ARTWORK } = require('sharify').data
User = require '../../../../models/user.coffee'
Artwork = require '../../../../models/artwork.coffee'
Expand All @@ -10,10 +9,13 @@ openErrorFlash = require '../../../../components/inquiry_questionnaire/error.cof
Logger = require '../../../../components/logger/index.coffee'
Trail = require '../../../../components/inquiry_questionnaire/trail.coffee'
analytics = require '../../../../components/inquiry_questionnaire/analytics.coffee'
FastClick = require 'fastclick'
{ steps, decisions, views } = require '../map.coffee'


module.exports = (id, bypass) ->
attachFastClick document.body
if FastClick.attach
FastClick.attach document.body

steps = [bypass] if bypass and _.contains(_.keys(views), bypass)

Expand Down
2 changes: 2 additions & 0 deletions desktop/apps/inquiry/stylesheets/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

.inquiry-page
margin (main-header-height + 20px) 0
+respond-mobile()
padding 20px

.iqm-alert
position absolute
Expand Down
2 changes: 1 addition & 1 deletion desktop/apps/inquiry/test/client/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe 'mobile inquiry flow initialization', ->
jQuery: benv.require 'jquery'
Backbone.$ = $
initializeInquiry = rewire '../../client/routes/inquiry'
initializeInquiry.__set__ 'attachFastClick', sinon.stub()
initializeInquiry.__set__ 'FastClick', sinon.stub()
@StateView = initializeInquiry.__get__ 'StateView'
@render = sinon.stub @StateView::, 'render', -> this
done()
Expand Down
2 changes: 2 additions & 0 deletions desktop/components/recently_viewed_artworks/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#recently-viewed-artworks
background-color gray-lightest-color
+respond-mobile()
padding 17px
.rva-container
padding-bottom 50px
.rva-header
Expand Down
4 changes: 3 additions & 1 deletion desktop/components/simple_contact/stylesheets/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
text-align center
border-bottom 1px solid gray-lighter-color
padding 0 0 20px
margin 0 -30px
+respond-desktop()
margin 0 -30px

.scontact-errors
.scontact-description
.scontact-from
Expand Down
2 changes: 1 addition & 1 deletion mobile/assets/mobile_all.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# to get more complex in how we break up and load assets.
#

require 'jquery'
$ = require 'jquery'
sd = require('sharify').data

# TODO: Refactor to use Backbone router
Expand Down
3 changes: 2 additions & 1 deletion mobile/assets/mobile_articles.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'jquery'
$ = require 'jquery'
require('backbone').$ = $
sd = require('sharify').data
articleIndex = require '../apps/articles/client/articles.coffee'
sectionView = require '../apps/articles/client/section.coffee'
ArticleView = require '../components/article/client/view.coffee'
Expand Down
9 changes: 8 additions & 1 deletion mobile/components/layout/bootstrap.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require 'jquery'
Backbone = require 'backbone'
Backbone.$ = $

_ = require 'underscore'
FastClick = require 'fastclick'
RavenClient = require 'raven-js'
Expand All @@ -18,7 +19,13 @@ HeaderView = require './client/header_view.coffee'
doc = window.document
sharify = require('sharify')

imagesLoaded = require 'imagesloaded'
jqueryFillwidthLite = require 'jquery-fillwidth-lite'

module.exports = ->
imagesLoaded.makeJQueryPlugin($)
jqueryFillwidthLite($, _, imagesLoaded)

# Add the Gravity XAPP or access token to all ajax requests
$.ajaxSettings.headers = {
"X-XAPP-TOKEN": sd.ARTSY_XAPP_TOKEN
Expand All @@ -32,7 +39,7 @@ module.exports = ->
Cookies.set 'inquiry-session-start', location.href

# removes 300ms delay
if sharify.data.NODE_ENV is 'development'
if FastClick.attach
FastClick.attach document.body

setupErrorReporting()
Expand Down
12 changes: 11 additions & 1 deletion test/test.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
require('raf/polyfill')
const path = require('path')
const _ = require('underscore')
const $ = require('jquery')
const Backbone = require('backbone')
const imagesLoaded = require('imagesloaded')
const jqueryFillwidthLite = require('jquery-fillwidth-lite')

require('raf/polyfill')
try {
Backbone.$ = $
imagesLoaded.makeJQueryPlugin($)
jqueryFillwidthLite($, _, imagesLoaded)
} catch (error) {}

// TODO: Look into why this bumps user off of other node command-line tab
require('dotenv').config({
Expand Down

0 comments on commit 8e82b76

Please sign in to comment.