diff --git a/gatsby-node.js b/gatsby-node.js index 9077182af52..350329284dd 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -99,7 +99,6 @@ exports.createPages = async ({ actions, graphql, reporter }) => { type subject redirects - hideNavs } } } @@ -307,10 +306,10 @@ exports.createPages = async ({ actions, graphql, reporter }) => { }); }); - // Redirect for VSU page to new Introduction to APM doc + // Redirect for old VSU Introduction to APM .js doc createRedirect({ - fromPath: '/docs/apm/new-relic-apm/getting-started/introduction-apm/', - toPath: '/introduction-apm', + fromPath: '/introduction-apm', + toPath: '/docs/apm/new-relic-apm/getting-started/introduction-apm/', isPermanent: false, redirectInBrowser: true, }); @@ -352,7 +351,6 @@ exports.createSchemaCustomization = ( type Frontmatter { isFeatured: Boolean translationType: String - hideNavs: Boolean eolDate: String downloadLink: String signupBanner: SignupBanner @@ -456,10 +454,6 @@ exports.createResolvers = ({ createResolvers }) => { ? source.translationType : null, }, - hideNavs: { - resolve: (source) => - hasOwnProperty(source, 'hideNavs') ? source.hideNavs : null, - }, eolDate: { resolve: (source) => hasOwnProperty(source, 'eolDate') ? source.eolDate : null, @@ -501,20 +495,6 @@ exports.createResolvers = ({ createResolvers }) => { exports.onCreatePage = ({ page, actions }) => { const { createPage } = actions; - if (page.path === '/') { - page.context.quicklaunchSlug = - 'docs/new-relic-solutions/get-started/quick-launch-guide'; - page.context.layout = 'homepage'; - } - if (page.path === '/jp/') { - page.context.quicklaunchSlug = - 'jp/docs/new-relic-solutions/get-started/quick-launch-guide'; - } - if (page.path === '/kr/') { - page.context.quicklaunchSlug = - 'kr/docs/new-relic-solutions/get-started/quick-launch-guide'; - } - if (page.path.match(/404/)) { page.context.layout = 'basic'; } @@ -573,7 +553,7 @@ const createPageFromNode = ( defer = false ) => { const { - frontmatter: { subject: agentName, hideNavs }, + frontmatter: { subject: agentName }, fields: { fileRelativePath, slug }, } = node; @@ -621,7 +601,6 @@ const createPageFromNode = ( context: { ...context, fileRelativePath, - hideNavs, slug, slugRegex: `${slug}/.+/`, disableSwiftype, diff --git a/scripts/actions/webdriver-desktop.mjs b/scripts/actions/webdriver-desktop.mjs index 4aafb91590a..20d242d3923 100644 --- a/scripts/actions/webdriver-desktop.mjs +++ b/scripts/actions/webdriver-desktop.mjs @@ -94,11 +94,8 @@ const searchTest = async () => { const tileTest = async () => { const initialUrl = await driver.getCurrentUrl(); - const [defaultViewTab] = await waitForXPath( - '//main//button[text()="Default view"]' - ); - console.log('clicking Default view tab button'); - await defaultViewTab.click(); + + console.log('clicking Homepage doctile'); // Added this xpath for the scroll function. // for some reason, when running in headless mode the site @@ -114,6 +111,7 @@ const tileTest = async () => { 'arguments[0].scrollIntoView()', popularDocsSection ); + await firstDocTile.click(); await driver.wait( until.stalenessOf(firstDocTile), diff --git a/scripts/actions/webdriver-mobile.mjs b/scripts/actions/webdriver-mobile.mjs index e45af618e60..8a86606abae 100644 --- a/scripts/actions/webdriver-mobile.mjs +++ b/scripts/actions/webdriver-mobile.mjs @@ -29,6 +29,7 @@ const main = async () => { // running on develop builds because the url is static // github workflow triggers on PRs to main const testUrl = + // TODO: search modal click breaks page on mobile localhost process.env.WEBDRIVER_ENV === 'main' ? 'https://docswebsitedevelop.gatsbyjs.io/' : 'http://localhost:8000/'; @@ -41,13 +42,6 @@ const main = async () => { await collapserTest(); await searchTest(); - // there's no way to switch the homepage view on mobile with the UI so this is a bit of a hack - // in synthetics, this step is being done within the tileTest, - // but it's not registering in time here - await driver.executeScript( - "localStorage.setItem('docs-website/homepage-selected-view', 'default-view')" - ); - await driver.get(testUrl); await tileTest(); await navTest(); diff --git a/src/components/HomepageVideo.js b/src/components/HomepageVideo.js deleted file mode 100644 index 811ea496920..00000000000 --- a/src/components/HomepageVideo.js +++ /dev/null @@ -1,171 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { css } from '@emotion/react'; -import { - SearchInput, - useTessen, - useTranslation, -} from '@newrelic/gatsby-theme-newrelic'; -import { navigate } from '@reach/router'; -import curlyAndDotsBackground from './curlyAndDots.webp'; -import curlyAndDotsBackgroundDarkmode from './curlyAndDotsDM.webp'; -import InlineSignup from './InlineSignup'; -import { useMainLayoutContext } from './MainLayoutContext'; - -const HomepageVideo = () => { - const [searchTerm, setSearchTerm] = useState(''); - const { t } = useTranslation(); - const tessen = useTessen(); - const [sidebar] = useMainLayoutContext(); - const [mobileBreakpoint, setMobileBreakpoint] = useState('1050px'); - - useEffect(() => { - if (sidebar) { - setMobileBreakpoint('1300px'); - } else { - setMobileBreakpoint('1050px'); - } - }, [sidebar]); - - return ( - <> -
-
-

{t('homepageVideo.header')}

-

{t('homepageVideo.p1')}

-

{t('homepageVideo.p2')}

- { - setSearchTerm(e.target.value); - }} - onSubmit={() => { - tessen.track({ - eventName: 'videoViewSearch', - category: 'SearchInput', - searchTerm, - }); - navigate(`?q=${searchTerm || ''}`); - }} - css={css` - @media screen and (max-width: ${mobileBreakpoint}) { - margin-bottom: 1rem; - } - `} - /> -
-
-
-
-