Skip to content

Commit

Permalink
migrating menu
Browse files Browse the repository at this point in the history
  • Loading branch information
stevector committed Oct 25, 2024
2 parents 65e8afb + d72b831 commit fd5a3f3
Show file tree
Hide file tree
Showing 22 changed files with 797 additions and 793 deletions.
333 changes: 168 additions & 165 deletions gatsby-node.js

Large diffs are not rendered by default.

41 changes: 28 additions & 13 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
import React from 'react'
import React from 'react';

// Import PDS Global wrapper for applying global context providers.
import { GlobalWrapper } from "@pantheon-systems/pds-toolkit-react"
import { MOBILE_MENU_BREAKPOINT } from './src/vars/responsive'
import { GlobalWrapper } from '@pantheon-systems/pds-toolkit-react';
import { MOBILE_MENU_BREAKPOINT } from './src/vars/responsive';

/*
* Add global scripts to ensure Bootstrap and jQuery JS is included
*/
export const onRenderBody = ({ setPostBodyComponents }) => {
setPostBodyComponents([
<script key="jquery" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js" />,
<script key="bootstrap" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" />,
<script
key="jquery"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js"
/>,
<script
key="bootstrap"
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
/>,
<script key="twitter" src="https://platform.twitter.com/widgets.js" />,

// OneTrust Banner
<script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8" data-domain-script="fba5027b-04c0-4165-8778-4e10fb9f5fa3" />,
function OptanonWrapper() {
window.dataLayer.push({'event':'OneTrustGroupsUpdated'})
}
])
}
<script
src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"
type="text/javascript"
charset="UTF-8"
data-domain-script="fba5027b-04c0-4165-8778-4e10fb9f5fa3"
/>,
function OptanonWrapper() {
window.dataLayer.push({ event: 'OneTrustGroupsUpdated' });
},
]);
};

// Global context providers
export const wrapRootElement = ({ element }) => {
return <GlobalWrapper mobileMenuMaxWidth={MOBILE_MENU_BREAKPOINT}>{element}</GlobalWrapper>
}
return (
<GlobalWrapper mobileMenuMaxWidth={MOBILE_MENU_BREAKPOINT}>
{element}
</GlobalWrapper>
);
};
82 changes: 39 additions & 43 deletions src/components/omniSidebarNav/getOmniItems.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import CertificationItems from './submenus/certification';


import getStarted from './submenus/getStarted';
import goLive from './submenus/goLive';
import pagesToDelete from './submenus/pagesToDelete';
Expand All @@ -15,16 +14,14 @@ import terminus from './submenus/terminus';
import about from './submenus/about';
import workflows from './submenus/workflows';



/**
* Retrieves the all the menu items for the sidebar navigation.
* @returns {Array} An array of Omni items.
*/
const getOmniItems = () => {
const OmniItems = [
// about docs
// /contribute
// about docs
// /contribute

pagesToDelete(),
unassignedPages(),
Expand All @@ -50,44 +47,43 @@ const getOmniItems = () => {
},
];


// Existing top level nav items

// Get Started --- Keep
// Develop -- Rename to "Development Workflows"
// Go Live ---Keep
// Explore Platform Architecture --- "Rename to Web Infrastructure"
// Automate and Integrate --- Currently just "Integrations"
// Optimize Performance --- We'll remove this menu item. Much of the info here will go in Troubleshoot or Web Infra
// Manage Teams & Organizations -- "Acount Management"
// Troubleshoot --> rename to "Support and Troubleshooting"
// Release Notes --> Keep
// Glossary --> Removing. This page is under "about"
// Certification --- Keep
// Terminus --- Keep

// Stuff in the top level of this "Omni menu" but isn't in the existing top level
// Drupal -- Adding
// WordPress -- Adding
// Migrate and Upgrade --- Moving under "Get Started"
// Front end Sites --- We're moving

// New Order
//
// Get Started
// Development Workflows
// Go Live
// Web Infrastructure
// Account Management
// Command Line Interface
// WordPress
// Drupal
// Front End Sites // Move under "Web Infrastructure" ?
// Integrations
// Support and Troubleshooting
// Certification
// About Our Docs
// Release Notes
// Existing top level nav items

// Get Started --- Keep
// Develop -- Rename to "Development Workflows"
// Go Live ---Keep
// Explore Platform Architecture --- "Rename to Web Infrastructure"
// Automate and Integrate --- Currently just "Integrations"
// Optimize Performance --- We'll remove this menu item. Much of the info here will go in Troubleshoot or Web Infra
// Manage Teams & Organizations -- "Acount Management"
// Troubleshoot --> rename to "Support and Troubleshooting"
// Release Notes --> Keep
// Glossary --> Removing. This page is under "about"
// Certification --- Keep
// Terminus --- Keep

// Stuff in the top level of this "Omni menu" but isn't in the existing top level
// Drupal -- Adding
// WordPress -- Adding
// Migrate and Upgrade --- Moving under "Get Started"
// Front end Sites --- We're moving

// New Order
//
// Get Started
// Development Workflows
// Go Live
// Web Infrastructure
// Account Management
// Command Line Interface
// WordPress
// Drupal
// Front End Sites // Move under "Web Infrastructure" ?
// Integrations
// Support and Troubleshooting
// Certification
// About Our Docs
// Release Notes

console.log('OmniItems: ', OmniItems);

Expand Down
24 changes: 9 additions & 15 deletions src/components/omniSidebarNav/submenus/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,20 @@ const about = () => {
link: '/contribute',
title: 'About our Docs',
children: [
simpleLink('/contribute', "Contribute to the Docs"),
simpleLink('/contribute', 'Contribute to the Docs'),

simpleLink('/pantheon-community', "Pantheon Community",
[
simpleLink('/code-of-conduct', "Code of Conduct"),
simpleLink('/trainers', "Trainers"),
]

),
simpleLink('/pantheon-community', 'Pantheon Community', [
simpleLink('/code-of-conduct', 'Code of Conduct'),
simpleLink('/trainers', 'Trainers'),
]),
simpleLink('/style-guide', 'Style Guide', [
// The glossary page doesn't show the sidebar nav. @todo Fix this.
simpleLink('/glossary/', "Glossary"),
simpleLink('/inclusive-language', "Inclusive Language"),
simpleLink('/glossary/', 'Glossary'),
simpleLink('/inclusive-language', 'Inclusive Language'),
simpleLink('/doc-template', 'Template Docs Page'),
]),


]
}

],
};
};

export default about;
14 changes: 6 additions & 8 deletions src/components/omniSidebarNav/submenus/accountManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const accountManagement = () => {
getGuideDirectory('guides/account-mgmt/plans'),
getGuideDirectory('guides/account-mgmt/traffic'),
simpleLink('/agency-tips', 'Agency Tips'),
simpleLink('/enterprise-billing-center', "Enterprise Billing Center"),
simpleLink('/tax-exempt-status', "Tax Exempt Status"),
simpleLink('/resetting-passwords', "Resetting Passwords"),
simpleLink('/platform-notifications', "Platform Notifications"),
simpleLink('/enterprise-billing-center', 'Enterprise Billing Center'),
simpleLink('/tax-exempt-status', 'Tax Exempt Status'),
simpleLink('/resetting-passwords', 'Resetting Passwords'),
simpleLink('/platform-notifications', 'Platform Notifications'),
getGuideDirectory('guides/account-mgmt/workspace-sites-teams'),
getGuideDirectory('guides/enterprise-billing-center'),
getGuideDirectory('guides/sso'),
Expand All @@ -35,13 +35,11 @@ const accountManagement = () => {
simpleLink('/ldap-and-ldaps', 'LDAP and LDAPS'),
getGuideDirectory('guides/wordpress-google-sso', 'WP SAML Auth'),
getGuideDirectory('guides/autopilot', 'Autopilot Guide'),

simpleLink('/ssh-keys', 'SSH Keys'),
simpleLink('/billing', 'Billing'),

],
}

};
};

export default accountManagement;
12 changes: 3 additions & 9 deletions src/components/omniSidebarNav/submenus/drupal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const drupal = () => {
children: [
simpleLink('/develop-drupal'),


// This page is odd now that D11 is out.
simpleLink('/drupal-10', 'Drupal 10'),
// This page might belong in s a tutorial section.
Expand All @@ -17,7 +16,7 @@ const drupal = () => {
simpleLink('/drupal-cache'),
simpleLink('/drupal-caching-views'),

simpleLink('/drupal-commerce', "Drupal Commerce"),
simpleLink('/drupal-commerce', 'Drupal Commerce'),

// This page probably belongs in a different section.
simpleLink('/drupal-composer-managed'),
Expand All @@ -35,19 +34,14 @@ const drupal = () => {
simpleLink('/drupal-s3'),
simpleLink('/drupal-cloudfront'),


simpleLink('/supported-drupal'),
simpleLink('/services-yml'),
simpleLink('/modules'),
simpleLink('/modules-known-issues'),

simpleLink('/drush'),



]
}

],
};
};

export default drupal;
3 changes: 1 addition & 2 deletions src/components/omniSidebarNav/submenus/frontEndSites.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ const frontEndSites = () => {
getGuideDirectory('guides/decoupled/drupal-nextjs-frontend-starters'),
getGuideDirectory('guides/decoupled/no-starter-kit'),
],
}

};
};

export default frontEndSites;
15 changes: 9 additions & 6 deletions src/components/omniSidebarNav/submenus/getStarted.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ const getStarted = () => {
children: [
getGuideDirectory('guides/getstarted'),
// This page is kind of a landing page? Should it be in this menu?
simpleLink('/required-reading', "Required Reading"),
simpleLink('/dashboard', "Dashboard", [
simpleLink('/site-dashboard', "Site Dashboard"),
simpleLink('/personal-settings', "Personal Settings"),
simpleLink('/add-site-custom-upstream', "Adding a Site with a Custom Upstream"),
simpleLink('/required-reading', 'Required Reading'),
simpleLink('/dashboard', 'Dashboard', [
simpleLink('/site-dashboard', 'Site Dashboard'),
simpleLink('/personal-settings', 'Personal Settings'),
simpleLink(
'/add-site-custom-upstream',
'Adding a Site with a Custom Upstream',
),
]),
],
}
};
};

export default getStarted;
42 changes: 20 additions & 22 deletions src/components/omniSidebarNav/submenus/pagesToDelete.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ const dnsProviders = () => {
children: [
simpleLink('/workshops'),


// This is a really small page.
simpleLink('/add-site-clone'),
simpleLink('/supported-wp'),
simpleLink('/cygwin-windows'),
simpleLink('/faq', "FAQ"),
simpleLink('/faq', 'FAQ'),

// This page is already deleted in the main branch.
simpleLink('/guides/wordpress-composer/pre-ga'),
simpleLink('/wordpress', "WordPress changelog"),
simpleLink('/wordpress', 'WordPress changelog'),
// Deprecated
simpleLink('/crisis-response-upstream'),
simpleLink('/static-site-empty-upstream'),
Expand All @@ -25,7 +24,7 @@ const dnsProviders = () => {
// This page is pretty empty
simpleLink('/overview'),

// minimal landing page
// minimal landing page
simpleLink('/addons'),
// Maybe we should keep some of these landing listing and just have
// no sidebar for them.
Expand All @@ -34,29 +33,33 @@ const dnsProviders = () => {
simpleLink('/products'),

// This page is a bit short. It is also a duplicate of /guides/getstarted/signup
simpleLink('/sign-up', "Sign Up for Pantheon"),
simpleLink('/sign-up', 'Sign Up for Pantheon'),
// This duplicates /guides/getstarted/addsite
simpleLink('/add-site', "Adding a Site"),
simpleLink('/add-site', 'Adding a Site'),
// Non-dupe content on this page should be moved to /guides/getstarted/addsite
simpleLink('/add-site-dashboard', "Add a site"),
simpleLink('/add-site-dashboard', 'Add a site'),
// This should be added as a sub-page of guides/mariadb-mysql
simpleLink('/optimize-wp-options-table-autoloaded-data', 'Optimize wp_options Table and Autoloaded Data'),
simpleLink(
'/optimize-wp-options-table-autoloaded-data',
'Optimize wp_options Table and Autoloaded Data',
),

// This is actually for google domains and that's no longer a service
simpleLink('/google', 'Google Cloud DNS'),
// Has unsupported "product" upstreams Panopoly and OpenAtrium
simpleLink('/start-state'),

// This page is duplicated by other terminus stuff
simpleLink('/terminus-demo', 'Introduction to Terminus'),

// This page is duplicated by other terminus stuff
simpleLink('/terminus-demo', "Introduction to Terminus"),

// Redirect this page to https://docs.pantheon.io/guides/drush/drupal-commandline
simpleLink('/terminus-drupal-site-management', "Using Terminus to Create and Update Drupal Sites on Pantheon"),
// Redirect this page to https://docs.pantheon.io/guides/drush/drupal-commandline
simpleLink(
'/terminus-drupal-site-management',
'Using Terminus to Create and Update Drupal Sites on Pantheon',
),

// Redirect to /terminus
simpleLink('/terminus-overview', "Terminus Overview"),

simpleLink('/terminus-overview', 'Terminus Overview'),

// @todo, this page seems like it should be an article.
simpleLink('/cloud-optimization'),
Expand All @@ -66,14 +69,9 @@ const dnsProviders = () => {

simpleLink('/autopilot', 'Autopilot Overview'), // Duplicates the autopilot guide



simpleLink('/certificate-bundles'),


]
}

],
};
};

export default dnsProviders;
Loading

0 comments on commit fd5a3f3

Please sign in to comment.