Skip to content

Commit

Permalink
Merge pull request #15124 from artsy/staging
Browse files Browse the repository at this point in the history
  • Loading branch information
artsyit authored Jan 30, 2025
2 parents bd06118 + 56d5d43 commit 4ff038c
Show file tree
Hide file tree
Showing 14 changed files with 429 additions and 511 deletions.
14 changes: 4 additions & 10 deletions data/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -16879,20 +16879,17 @@ type Query {
after: String
before: String

# The number of curated artworks to return. This is a temporary field to support the transition to OpenSearch
# The number of curated artworks to return.
curatedPicksSize: Int = 2

# Exclude these artworks from the response
excludeArtworkIds: [String]
first: Int

# Which index to use to display initial batch of artworks
initialArtworksIndexName: String = "infinite_discovery_initial_artworks"
last: Int

# These artworks are used to calculate the taste profile vector. Such artworks are excluded from the response
likedArtworkIds: [String]
limit: Int
limit: Int = 5

# These fields are used for More Like This query
mltFields: [String] = ["genes", "materials", "tags", "medium"]
Expand Down Expand Up @@ -21546,20 +21543,17 @@ type Viewer {
after: String
before: String

# The number of curated artworks to return. This is a temporary field to support the transition to OpenSearch
# The number of curated artworks to return.
curatedPicksSize: Int = 2

# Exclude these artworks from the response
excludeArtworkIds: [String]
first: Int

# Which index to use to display initial batch of artworks
initialArtworksIndexName: String = "infinite_discovery_initial_artworks"
last: Int

# These artworks are used to calculate the taste profile vector. Such artworks are excluded from the response
likedArtworkIds: [String]
limit: Int
limit: Int = 5

# These fields are used for More Like This query
mltFields: [String] = ["genes", "materials", "tags", "medium"]
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
"@sentry/browser": "^8.33.0",
"@sentry/node": "^8.32.0",
"@sentry/profiling-node": "^8.32.0",
"@stripe/react-stripe-js": "1.10.0",
"@stripe/stripe-js": "^4.1.0",
"@stripe/react-stripe-js": "^3.1.1",
"@stripe/stripe-js": "^5.5.0",
"@styled-system/theme-get": "5.1.2",
"@swc-node/register": "^1.10.9",
"@swc/helpers": "^0.5.15",
Expand Down Expand Up @@ -194,19 +194,19 @@
"@graphql-tools/jest-transform": "^2.0.0",
"@loadable/webpack-plugin": "5.15.2",
"@relative-ci/agent": "^4.2.10",
"@rsbuild/core": "^1.1.8",
"@rsbuild/plugin-assets-retry": "^1.0.6",
"@rsbuild/core": "^1.2.3",
"@rsbuild/plugin-assets-retry": "^1.1.0",
"@rsbuild/plugin-node-polyfill": "^1.2.0",
"@rsbuild/plugin-react": "^1.0.7",
"@rsbuild/plugin-react": "^1.1.0",
"@storybook/addon-actions": "^8.4.7",
"@storybook/addon-essentials": "^8.4.7",
"@storybook/addon-links": "^8.4.7",
"@storybook/react": "^8.4.7",
"@swc/core": "^1.9.3",
"@swc/core": "^1.10.11",
"@swc/jest": "^0.2.37",
"@swc/plugin-loadable-components": "^4.0.1",
"@swc/plugin-relay": "^5.0.1",
"@swc/plugin-styled-components": "^5.0.0",
"@swc/plugin-loadable-components": "^5.0.4",
"@swc/plugin-relay": "^6.0.4",
"@swc/plugin-styled-components": "^6.5.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
Expand Down Expand Up @@ -270,7 +270,7 @@
"relay-test-utils": "^16.0.0",
"rewire": "2.2.0",
"storybook": "^8.4.7",
"storybook-react-rsbuild": "^0.1.5",
"storybook-react-rsbuild": "^0.1.8",
"storybook-states": "1.2.0",
"typescript": "^5.6.3",
"typescript-styled-plugin": "0.15.0",
Expand Down
17 changes: 14 additions & 3 deletions rsbuild.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import path from "path"
import nodeExternals from "webpack-node-externals"
import { loadEnvs } from "@artsy/multienv"
import LoadablePlugin from "@loadable/webpack-plugin"
import { defineConfig } from "@rsbuild/core"
import { pluginReact } from "@rsbuild/plugin-react"
import { pluginAssetsRetry } from "@rsbuild/plugin-assets-retry"
import { pluginNodePolyfill } from "@rsbuild/plugin-node-polyfill"
import { pluginReact } from "@rsbuild/plugin-react"
import nodeExternals from "webpack-node-externals"
import { EarlyHintsPlugin } from "./rspack/plugins/EarlyHintsPlugin"
import { loadEnvs } from "@artsy/multienv"

loadEnvs(".env.shared", ".env")

Expand Down Expand Up @@ -53,6 +53,9 @@ export default defineConfig({
},
tools: {
rspack: {
experiments: {
parallelCodeSplitting: true,
},
externals: [nodeExternals()],
node: {
__dirname: true,
Expand Down Expand Up @@ -96,6 +99,14 @@ export default defineConfig({
port: Number(process.env.PORT) || 3000,
},
tools: {
rspack: {
cache: true,
experiments: {
cache: {
type: "persistent",
},
},
},
swc: {
jsc: {
experimental: {
Expand Down
95 changes: 0 additions & 95 deletions src/Apps/Components/INPOptimizer.tsx

This file was deleted.

23 changes: 3 additions & 20 deletions src/Apps/Components/Layouts/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { usePrevious } from "@artsy/palette"
import {
INPOptimizer,
useEnableINPOptimizer,
} from "Apps/Components/INPOptimizer"
import { LayoutBlank } from "Apps/Components/Layouts/LayoutBlank"
import { LayoutContainerOnly } from "Apps/Components/Layouts/LayoutContainerOnly"
import { LayoutDefault } from "Apps/Components/Layouts/LayoutDefault"
import { LayoutFullBleed } from "Apps/Components/Layouts/LayoutFullBleed"
import { LayoutLogoOnly } from "Apps/Components/Layouts/LayoutLogoOnly"
import { LayoutNavOnly } from "Apps/Components/Layouts/LayoutNavOnly"
import { useRouter } from "System/Hooks/useRouter"
import type React from "react"
import type { FC, ReactNode } from "react"

export interface BaseLayoutProps {
Expand All @@ -37,10 +32,11 @@ export const Layout: FC<React.PropsWithChildren<LayoutProps>> = ({
children,
}) => {
const { match } = useRouter()
const enableINPOptimizer = useEnableINPOptimizer()

const isFetching = !match.elements

// If we're fetching, we want to render the previous layout and not execute
// the new one right away.
const previousVariant = usePrevious(variant)
const Previous = LAYOUTS[previousVariant]

Expand All @@ -50,18 +46,5 @@ export const Layout: FC<React.PropsWithChildren<LayoutProps>> = ({

const Component = LAYOUTS[variant]

return (
<Component>
{enableINPOptimizer ? (
<INPOptimizer
key={match.location.pathname}
enabled={enableINPOptimizer}
>
{children}
</INPOptimizer>
) : (
children
)}
</Component>
)
return <Component>{children}</Component>
}
Loading

0 comments on commit 4ff038c

Please sign in to comment.