Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy #5897

Merged
merged 45 commits into from
Jul 9, 2020
Merged

Deploy #5897

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9ea1d09
paired with justin, created new component to hold logged in items
lilyfromseattle Jun 10, 2020
bd7e8b0
Merge branch 'master' into desktop-header-notif
zephraph Jun 10, 2020
764897b
Use new logged in actions
zephraph Jun 10, 2020
2b9f246
Merge branch 'master' into desktop-header-notif
zephraph Jun 24, 2020
4490a1d
Complete desktop header notifications
zephraph Jun 24, 2020
699e8b9
Update comment
zephraph Jun 24, 2020
837ce15
Remove notification badge test
zephraph Jun 24, 2020
28222ae
Track event when conversation text input is focused
starsirius Jun 26, 2020
9e3d5a5
Track event when a message is sent
starsirius Jun 26, 2020
a22fbf6
Switch to camelcase
starsirius Jun 30, 2020
ffe211d
Add tests
starsirius Jun 30, 2020
871689a
adds notification count inside of mobile dropdown menu
xtina-starr Jul 2, 2020
9e4d7d1
adds inbox notification badge over hamburger icon
xtina-starr Jul 2, 2020
a64de63
Add tests for InboxNotificationCount
xtina-starr Jul 2, 2020
2ee6e8a
Fix merge conflicts
xtina-starr Jul 2, 2020
577ceaa
Update mp v2 query, and handling of fetched data
anandaroop Jul 2, 2020
b252250
Remove obsolete helpers
anandaroop Jul 2, 2020
0381564
Update tests
anandaroop Jul 2, 2020
2e5bac8
Clean up comments
xtina-starr Jul 2, 2020
6a94539
Respect newlines in conversation messages
starsirius Jul 6, 2020
8675c67
Add react-linkify to linkify links in conversation
starsirius Jul 6, 2020
cae539b
Use workaround to open link in conversations in a new window
starsirius Jul 6, 2020
5191854
Add tests for linkifying message text
starsirius Jul 6, 2020
372d494
address PR feedback: extract duplication & check for logged in user
xtina-starr Jul 6, 2020
e5f6217
text area autoresizes on message send
lilyfromseattle Jul 6, 2020
54aa4fa
added ts-ignore
lilyfromseattle Jul 6, 2020
889ca48
Merge branch 'master' into double-tracking
sepans Jul 7, 2020
f5e117d
Track events for conversation inbox (PURCHASE-1896) (#5844)
artsy-peril[bot] Jul 7, 2020
6eb5bb8
Merge pull request #5884 from starsirius/inbox-text-formatting
xtina-starr Jul 7, 2020
8e29710
fix merge conflicts
xtina-starr Jul 7, 2020
00e44f1
Merge pull request #5892 from lilyfromseattle/close-expanded-input
xtina-starr Jul 7, 2020
1d4f0bb
Merge pull request #5831 from artsy/desktop-header-notif
starsirius Jul 7, 2020
365021c
Pin dep react-linkify from ^1.0.0-alpha to 1.0.0-alpha
renovate-bot Jul 7, 2020
c12bfe5
Update metaphysics schema
artsyit Jul 7, 2020
75cba07
Merge pull request #5896 from artsy/renovate/pin-dependencies
starsirius Jul 7, 2020
750a4c7
Update metaphysics schema (#5898)
artsy-peril[bot] Jul 7, 2020
66c0824
Merge pull request #5881 from artsy/mp-v2-categories
anandaroop Jul 7, 2020
e6db9ea
Update dep @artsy/palette from 11.6.0 to v11.6.1
renovate-bot Jul 7, 2020
1562000
Add valid key for .map'd FeaturedGene components
anandaroop Jul 7, 2020
7571e00
Use slugs instead of ids to fix scrolly nav
anandaroop Jul 7, 2020
61e2cd3
Update dep @artsy/palette from 11.6.1 to v11.7.0
renovate-bot Jul 7, 2020
167b289
Polyfills :focus-visible; adds :focus-visible outlines
dzucconi Jul 6, 2020
2e4731c
[FX-2076] Polyfills :focus-visible; adds :focus-visible outlines (#5887)
artsy-peril[bot] Jul 8, 2020
8c540e7
Pin dep focus-visible from ^5.1.0 to 5.1.0
renovate-bot Jul 8, 2020
553e784
Merge pull request #5901 from artsy/mp-v2-categories
anandaroop Jul 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions data/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ type Artist implements EntityWithFilterArtworksConnectionInterface & Node & Sear
aggregations: [ArtworkAggregation]
artistID: String
artistIDs: [String]
artistSeriesID: String
atAuction: Boolean
attributionClass: [String]
before: String
Expand Down Expand Up @@ -992,6 +993,48 @@ type ArtistSeries {
artists(page: Int, size: Int): [Artist]
description: String
featured: Boolean!
filterArtworksConnection(
acquireable: Boolean
after: String
aggregationPartnerCities: [String]
aggregations: [ArtworkAggregation]
artistID: String
artistIDs: [String]
artistSeriesID: String
atAuction: Boolean
attributionClass: [String]
before: String
color: String
dimensionRange: String
extraAggregationGeneIDs: [String]
first: Int
forSale: Boolean
geneID: String
geneIDs: [String]
height: String
includeArtworksByFollowedArtists: Boolean
includeMediumFilterInAggregation: Boolean
inquireableOnly: Boolean
keyword: String
keywordMatchExact: Boolean
last: Int
majorPeriods: [String]
marketable: Boolean
medium: String
offerable: Boolean
page: Int
partnerCities: [String]
partnerID: ID
period: String
periods: [String]
priceRange: String
saleID: ID
size: Int
sizes: [ArtworkSizes]
sort: String
tagID: String
width: String
): FilterArtworksConnection

# Unique ID for this artist series
internalID: ID!
Expand Down Expand Up @@ -4573,6 +4616,7 @@ interface EntityWithFilterArtworksConnectionInterface {
aggregations: [ArtworkAggregation]
artistID: String
artistIDs: [String]
artistSeriesID: String
atAuction: Boolean
attributionClass: [String]
before: String
Expand Down Expand Up @@ -4713,6 +4757,7 @@ type Fair implements EntityWithFilterArtworksConnectionInterface & Node {
aggregations: [ArtworkAggregation]
artistID: String
artistIDs: [String]
artistSeriesID: String
atAuction: Boolean
attributionClass: [String]
before: String
Expand Down Expand Up @@ -5323,6 +5368,7 @@ type Gene implements Node & Searchable {
aggregations: [ArtworkAggregation]
artistID: String
artistIDs: [String]
artistSeriesID: String
atAuction: Boolean
attributionClass: [String]
before: String
Expand Down Expand Up @@ -5964,6 +6010,7 @@ type MarketingCollection {
aggregations: [ArtworkAggregation]
artistID: String
artistIDs: [String]
artistSeriesID: String
atAuction: Boolean
attributionClass: [String]
before: String
Expand Down Expand Up @@ -7214,6 +7261,7 @@ type Query {
aggregations: [ArtworkAggregation]
artistID: String
artistIDs: [String]
artistSeriesID: String
atAuction: Boolean
attributionClass: [String]
before: String
Expand Down Expand Up @@ -8455,6 +8503,7 @@ type Show implements EntityWithFilterArtworksConnectionInterface & Node {
aggregations: [ArtworkAggregation]
artistID: String
artistIDs: [String]
artistSeriesID: String
atAuction: Boolean
attributionClass: [String]
before: String
Expand Down Expand Up @@ -8835,6 +8884,7 @@ type Tag implements Node {
aggregations: [ArtworkAggregation]
artistID: String
artistIDs: [String]
artistSeriesID: String
atAuction: Boolean
attributionClass: [String]
before: String
Expand Down Expand Up @@ -9219,6 +9269,7 @@ type Viewer {
aggregations: [ArtworkAggregation]
artistID: String
artistIDs: [String]
artistSeriesID: String
atAuction: Boolean
attributionClass: [String]
before: String
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@artsy/cohesion": "1.19.0",
"@artsy/express-reloadable": "1.4.8",
"@artsy/gemup": "0.0.3",
"@artsy/palette": "11.6.0",
"@artsy/palette": "11.7.0",
"@artsy/passport": "1.3.0",
"@artsy/reaction": "26.53.0",
"@artsy/stitch": "6.1.6",
Expand Down Expand Up @@ -135,6 +135,7 @@
"fastclick": "1.0.6",
"flickity": "2.1.2",
"flickity-imagesloaded": "2.0.0",
"focus-visible": "5.1.0",
"forever": "0.15.3",
"found": "0.4.9",
"found-relay": "0.5.0",
Expand Down Expand Up @@ -194,6 +195,7 @@
"react": "16.8.6",
"react-autosuggest": "9.4.3",
"react-dom": "16.8.6",
"react-linkify": "1.0.0-alpha",
"react-redux": "5.1.1",
"react-relay": "7.1.0",
"react-relay-network-modern": "2.5.1",
Expand Down
7 changes: 2 additions & 5 deletions src/desktop/apps/categories/__tests__/routes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ describe("#index", () => {
beforeEach(() => {
req = {
app: {
get: sinon
.stub()
.withArgs("views")
.returns("components"),
get: sinon.stub().withArgs("views").returns("components"),
},
}
res = {}
Expand Down Expand Up @@ -46,7 +43,7 @@ describe("#index", () => {
}

rewire.__set__(
"metaphysics",
"metaphysics2",
sinon.stub().returns(Promise.resolve(geneFamiliesQuery))
)

Expand Down
27 changes: 0 additions & 27 deletions src/desktop/apps/categories/__tests__/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,6 @@ describe("#alphabetizeGenes", () => {
})
})

describe("#featuredGenesForFamily", () => {
it("pulls out featured genes for the given family", () => {
const featuredGenesByFamily = [
{
name: "Materials",
genes: [
{ id: "aluminum", href: "/gene/aluminum" },
{ id: "gold", href: "/gene/gold" },
],
},
{
name: "Styles",
genes: [
{ id: "impressionism", href: "/gene/impressionism" },
{ id: "photorealism", href: "/gene/photorealism" },
],
},
]

const result = featuredGenesForFamily("Materials", featuredGenesByFamily)
result.should.be.of.type.Object
result.name.should.equal("Materials")
result.genes[0].id.should.equal("aluminum")
result.genes[1].id.should.equal("gold")
})
})

describe("#geneFamiliesFromConnection", () => {
it("maps the connection to a simple list of gene families", () => {
const dataFromGeneFamilyConnection = {
Expand Down
6 changes: 1 addition & 5 deletions src/desktop/apps/categories/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,14 @@ const Layout = styled.div`
class App extends Component {
static propTypes = {
geneFamilies: PropTypes.array.isRequired,
allFeaturedGenesByFamily: PropTypes.array.isRequired,
}

render() {
const { geneFamilies, allFeaturedGenesByFamily } = this.props
return (
<Layout>
<GeneFamilyNav geneFamilies={geneFamilies} />
<TAGPContent
geneFamilies={geneFamilies}
allFeaturedGenesByFamily={allFeaturedGenesByFamily}
/>
<TAGPContent geneFamilies={geneFamilies} />
</Layout>
)
}
Expand Down
12 changes: 6 additions & 6 deletions src/desktop/apps/categories/components/FeaturedGenes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styled from "styled-components"
import FeaturedGene from "./FeaturedGene"

const propTypes = {
featuredGenes: PropTypes.object,
featuredGeneLinks: PropTypes.array,
}

const Layout = styled.div`
Expand All @@ -19,14 +19,14 @@ const Layout = styled.div`
}
`

const FeaturedGenes = ({ featuredGenes }) => {
const FeaturedGenes = ({ featuredGeneLinks }) => {
return (
<Layout>
{featuredGenes &&
featuredGenes.genes.length > 0 &&
featuredGenes.genes
{featuredGeneLinks &&
featuredGeneLinks.length > 0 &&
featuredGeneLinks
.map(featuredGene => (
<FeaturedGene key={featuredGene.id} {...featuredGene} />
<FeaturedGene key={featuredGene.href} {...featuredGene} />
))
.slice(0, 3)}
</Layout>
Expand Down
15 changes: 2 additions & 13 deletions src/desktop/apps/categories/components/GeneFamilies.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,13 @@ import { featuredGenesForFamily } from "../utils.js"

const propTypes = {
geneFamilies: PropTypes.array.isRequired,
allFeaturedGenesByFamily: PropTypes.array.isRequired,
}

const GeneFamilies = ({ geneFamilies, allFeaturedGenesByFamily }) => {
const GeneFamilies = ({ geneFamilies }) => {
return (
<div>
{geneFamilies.map(geneFamily => {
const featuredGenes = featuredGenesForFamily(
geneFamily.name,
allFeaturedGenesByFamily
)
return (
<GeneFamily
key={geneFamily.id}
featuredGenes={featuredGenes}
{...geneFamily}
/>
)
return <GeneFamily key={geneFamily.id} {...geneFamily} />
})}
</div>
)
Expand Down
12 changes: 7 additions & 5 deletions src/desktop/apps/categories/components/GeneFamily.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const propTypes = {
id: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
genes: PropTypes.array.isRequired,
featuredGenes: PropTypes.object,
featuredGeneLinks: PropTypes.array,
}

const GeneFamilyName = styled.h2`
Expand All @@ -29,15 +29,17 @@ const GeneList = styled.ul`
}
`

const GeneFamily = ({ id, name, genes, featuredGenes }) => {
const GeneFamily = ({ slug, name, genes, featuredGeneLinks }) => {
const publishedGenes = genes.filter(g => g.is_published)
const sortedGenes = alphabetizeGenes(publishedGenes)
return (
<div id={id}>
<div id={slug}>
<GeneFamilyName>{name}</GeneFamilyName>
<FeaturedGenes featuredGenes={featuredGenes} />
<FeaturedGenes featuredGeneLinks={featuredGeneLinks} />
<GeneList>
{sortedGenes.map(gene => <Gene key={gene.id} {...gene} />)}
{sortedGenes.map(gene => (
<Gene key={gene.id} {...gene} />
))}
</GeneList>
</div>
)
Expand Down
4 changes: 2 additions & 2 deletions src/desktop/apps/categories/components/GeneFamilyNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ class GeneFamilyNav extends React.Component {
offset={-1 * TOP_BUFFER}
>
{geneFamilies.map(geneFamily => (
<GeneFamilyItem key={geneFamily.id}>
<GeneFamilyItem key={geneFamily.slug}>
<GeneFamilyLink
href={`#${geneFamily.id}`}
href={`#${geneFamily.slug}`}
onClick={this.handleClick}
>
{geneFamily.name}
Expand Down
6 changes: 1 addition & 5 deletions src/desktop/apps/categories/components/TAGPContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import GeneFamilies from "./GeneFamilies"

const propTypes = {
geneFamilies: PropTypes.array.isRequired,
allFeaturedGenesByFamily: PropTypes.array.isRequired,
}

const ResponsiveContent = styled.main`
Expand All @@ -22,10 +21,7 @@ const TAGPContent = ({ geneFamilies, allFeaturedGenesByFamily }) => {
return (
<ResponsiveContent>
<TAGPIntro />
<GeneFamilies
geneFamilies={geneFamilies}
allFeaturedGenesByFamily={allFeaturedGenesByFamily}
/>
<GeneFamilies geneFamilies={geneFamilies} />
</ResponsiveContent>
)
}
Expand Down
25 changes: 5 additions & 20 deletions src/desktop/apps/categories/components/__tests__/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import App from "../App"
describe("Categories App", () => {
let app
let geneFamilies
let allFeaturedGenesByFamily

beforeEach(() => {
geneFamilies = [
Expand All @@ -15,37 +14,23 @@ describe("Categories App", () => {
genes: [
/* … */
],
},
{
id: "styles",
name: "Styles",
genes: [
featuredGeneLinks: [
/* … */
],
},
]

allFeaturedGenesByFamily = [
{
name: "Materials",
id: "styles",
name: "Styles",
genes: [
/* … */
],
},
{
name: "Styles",
genes: [
featuredGeneLinks: [
/* … */
],
},
]

app = shallow(
<App
geneFamilies={geneFamilies}
allFeaturedGenesByFamily={allFeaturedGenesByFamily}
/>
)
app = shallow(<App geneFamilies={geneFamilies} />)
})

it("renders navigation", () => {
Expand Down
Loading