Skip to content

Commit

Permalink
Merge pull request newrelic#15402 from newrelic/tabatha/revert-new-us…
Browse files Browse the repository at this point in the history
…er-view

Remove new user homepage & VSU cleanup
  • Loading branch information
tabathadelane authored Dec 6, 2023
2 parents 5e8cace + 5377359 commit 0e654dc
Show file tree
Hide file tree
Showing 20 changed files with 162 additions and 1,845 deletions.
29 changes: 4 additions & 25 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
type
subject
redirects
hideNavs
}
}
}
Expand Down Expand Up @@ -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,
});
Expand Down Expand Up @@ -352,7 +351,6 @@ exports.createSchemaCustomization = (
type Frontmatter {
isFeatured: Boolean
translationType: String
hideNavs: Boolean
eolDate: String
downloadLink: String
signupBanner: SignupBanner
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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';
}
Expand Down Expand Up @@ -573,7 +553,7 @@ const createPageFromNode = (
defer = false
) => {
const {
frontmatter: { subject: agentName, hideNavs },
frontmatter: { subject: agentName },
fields: { fileRelativePath, slug },
} = node;

Expand Down Expand Up @@ -621,7 +601,6 @@ const createPageFromNode = (
context: {
...context,
fileRelativePath,
hideNavs,
slug,
slugRegex: `${slug}/.+/`,
disableSwiftype,
Expand Down
8 changes: 3 additions & 5 deletions scripts/actions/webdriver-desktop.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -114,6 +111,7 @@ const tileTest = async () => {
'arguments[0].scrollIntoView()',
popularDocsSection
);

await firstDocTile.click();
await driver.wait(
until.stalenessOf(firstDocTile),
Expand Down
8 changes: 1 addition & 7 deletions scripts/actions/webdriver-mobile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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/';
Expand All @@ -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();
Expand Down
171 changes: 0 additions & 171 deletions src/components/HomepageVideo.js

This file was deleted.

Loading

0 comments on commit 0e654dc

Please sign in to comment.