Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Remove community creation, marketing pages
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlovin committed Jan 6, 2021
1 parent d1c3960 commit 9a31bb5
Show file tree
Hide file tree
Showing 39 changed files with 79 additions and 4,217 deletions.
2 changes: 1 addition & 1 deletion api/routes/auth/logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const debug = require('debug')('api:routes:auth:logout');
import { destroySession } from '../../models/session';

const IS_PROD = process.env.NODE_ENV === 'production';
const HOME = IS_PROD ? '/' : 'http://localhost:3000/';
const HOME = IS_PROD ? '/explore' : 'http://localhost:3000/explore';
const logoutRouter = Router();

logoutRouter.get('/', (req, res) => {
Expand Down
126 changes: 0 additions & 126 deletions cypress/integration/community/settings/create_spec.js

This file was deleted.

12 changes: 0 additions & 12 deletions cypress/integration/faq_page_spec.js

This file was deleted.

11 changes: 0 additions & 11 deletions cypress/integration/home_spec.js

This file was deleted.

27 changes: 0 additions & 27 deletions cypress/integration/navbar_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const user = data.users[0];

const coreSplashPageNavbarLinksVisible = () => {
cy.get('[data-cy="navigation-splash"]').should('be.visible');

cy.get('[data-cy="navigation-splash-features"]').should('be.visible');
};

const checkSignedOutSplashNavbarLinksRender = () => {
Expand All @@ -14,12 +12,6 @@ const checkSignedOutSplashNavbarLinksRender = () => {
cy.get('[data-cy="navigation-splash-signin"]').should('be.visible');
};

const checkSignedInSplashNavbarLinksRender = () => {
coreSplashPageNavbarLinksVisible();

cy.get('[data-cy="navigation-splash-profile"]').should('be.visible');
};

const checkProductNavbarLinksRender = () => {
cy.get('[data-cy="navigation-bar"]').should('be.visible');

Expand All @@ -39,24 +31,9 @@ const checkSignedOutNavbarRenders = () => {

cy.get('[data-cy="navigation-explore"]').should('be.visible');

cy.get('[data-cy="navigation-features"]').should('be.visible');

cy.get('[data-cy="navigation-login"]').should('be.visible');
};

const checkSignedInSplashNavbarRenders = () => {
cy.visit('/about');
checkSignedInSplashNavbarLinksRender();

cy.visit('/features');
checkSignedInSplashNavbarLinksRender();

checkSignedInSplashNavbarLinksRender();

cy.visit('/faq');
checkSignedInSplashNavbarLinksRender();
};

describe('Navbar logged in', () => {
beforeEach(() => {
cy.auth(user.id).then(() => cy.visit('/explore'));
Expand Down Expand Up @@ -85,10 +62,6 @@ describe('Navbar logged in', () => {
cy.visit(`/spectrum/general`);
checkProductNavbarLinksRender();
});

it('should render splash navbar when viewing splash pages', () => {
checkSignedInSplashNavbarRenders();
});
});

describe('Navbar logged out', () => {
Expand Down
1 change: 0 additions & 1 deletion docs/testing/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ describe('Home View', () => {
it('should render the home page', () => {
cy.get('[data-cy="home-page"]').should('be.visible');
cy.get('[href*="/login"]').should('be.visible');
cy.get('[href*="/new/community"]').should('be.visible');
});
});
```
Expand Down
2 changes: 1 addition & 1 deletion hyperion/renderer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const renderer = (req: express$Request, res: express$Response) => {
: 'Only output in production.';
res.status(500);
res.send(
`<!DOCTYPE html><html><head><title>Spectrum</title> <style>body{margin: 0;}html{-webkit-font-smoothing: antialiased; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';}h1, p{line-height: 1.5;}.container{background: rgb(56,24,229);background: linear-gradient(90deg, rgba(56,24,229,1) 0%, rgba(56,24,229,0.8029586834733894) 52%, rgba(56,24,229,1) 100%); width: 100%; display: flex; height: 100vh; justify-content: center;}.item{color: white; font-weight: bold; align-self: center; text-align: center;}a{color: white;}span{font-size: 40px; padding: 0; margin: 0;}</style></head><body> <div class="container"> <div class="item"> <span>😢</span> <h1>Oops, something went wrong. Sorry!</h1> <p>Please refresh or <a href="/">go home</a>. </p></div></div></body></html>`
`<!DOCTYPE html><html><head><title>Spectrum</title> <style>body{margin: 0;}html{-webkit-font-smoothing: antialiased; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';}h1, p{line-height: 1.5;}.container{background: rgb(56,24,229);background: linear-gradient(90deg, rgba(56,24,229,1) 0%, rgba(56,24,229,0.8029586834733894) 52%, rgba(56,24,229,1) 100%); width: 100%; display: flex; height: 100vh; justify-content: center;}.item{color: white; font-weight: bold; align-self: center; text-align: center;}a{color: white;}span{font-size: 40px; padding: 0; margin: 0;}</style></head><body> <div class="container"> <div class="item"> <span>😢</span> <h1>Oops, something went wrong. Sorry!</h1> <p>Please refresh the page.</p></div></div></body></html>`
);
});
};
Expand Down
31 changes: 1 addition & 30 deletions src/components/upsell/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,32 +82,7 @@ export const UpsellMiniCreateCommunity = () => {
bg="onboarding"
heading="Create a community"
copy="Building communities on Spectrum is easy and free forever"
>
<Link to="/new/community">
<Button>Get Started</Button>
</Link>
</MiniNullCard>
);
};

// takes a 'close' props from the new user onboarding which allows a user
// to create a community rather than joining communities - if they choose
// to go down the path of creating a community, clicking on the 'get started'
// button will close the new user onboarding
export const UpsellCreateCommunity = () => {
const title = 'Create a community';
const subtitle = 'Building communities on Spectrum is easy and free forever';

return (
<NullCard bg={'onboarding'}>
<Title>{title}</Title>
<Subtitle>{subtitle}</Subtitle>
<Actions>
<Link to="/new/community">
<Button>Get Started</Button>
</Link>
</Actions>
</NullCard>
/>
);
};

Expand Down Expand Up @@ -211,10 +186,6 @@ export const Upsell404Community = () => {
<Link to={'/'}>
<OutlineButton large>Take me back</OutlineButton>
</Link>

<Link to={'/new/community'}>
<Button large>Create a community</Button>
</Link>
</Actions>
);
};
Expand Down
8 changes: 0 additions & 8 deletions src/components/upsell/newUserUpsell.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ class UpsellNewUser extends Component {
});
};

createCommunity = () => {
this.props.history.push('/new/community');
};

clickShareLink = () => {};

savedUsername = () => {
Expand Down Expand Up @@ -179,10 +175,6 @@ class UpsellNewUser extends Component {
building a new space for people who like the same things? Create a
community in less than a minute:
</SmallSubtitle>

<OutlineButton onClick={this.createCommunity}>
Create a community
</OutlineButton>
</Section>

<Section>
Expand Down
8 changes: 1 addition & 7 deletions src/helpers/is-viewing-marketing-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,5 @@ export const isViewingMarketingPage = (

if (isRoot && (!currentUser || !currentUser.id)) return true;

return (
viewing === '/home' ||
viewing === '/about' ||
viewing === '/code-of-conduct' ||
viewing === '/faq' ||
viewing === '/features'
);
return viewing === '/code-of-conduct';
};
Loading

0 comments on commit 9a31bb5

Please sign in to comment.