Skip to content

Commit

Permalink
Feature/plan section (#395)
Browse files Browse the repository at this point in the history
* stachign code

* adding cards

* adding more card content

* more card updates

* more styles

* finishing design

* fixing padding

* more plan id's

* simplifying bar

* fixing free card

* clean up

* adding version tracker

* pr callouts

* adding lilypad 2.0 (#401)

* adding lilypad 2.0

* client

---------

Co-authored-by: Nick Grato <[email protected]>

* loading section

* more marketing page designs and new utility classes

* adding legacy section and breaking up the form component in the email section.

* making the grid section

* adding slider

* adding assets

* finishing touches

* fixing chf price

* fixing build

* pr clean up

* copy changes

* commenting out button toggle

* final touches

---------

Co-authored-by: Nick Grato <[email protected]>
  • Loading branch information
nickgrato and Nick Grato authored Aug 17, 2023
1 parent 307d2af commit 37fcf61
Show file tree
Hide file tree
Showing 80 changed files with 1,725 additions and 1,293 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, ButtonCategoriesE, Modal } from '@mozilla/lilypad-ui';
import { Button, Modal } from '@mozilla/lilypad-ui';
import InfoBlock from '@Shared/InfoBlock/InfoBlock';
import { PERSONAL_COPY } from 'components/modules/plans/plan.const';
import styles from './ConfirmPlanModal.module.scss';
Expand Down Expand Up @@ -35,7 +35,7 @@ const ConfirmPlanModal = () => {
</p>

<Button
category={ButtonCategoriesE.SECONDARY_SOLID}
category="secondary_solid"
text="Upgrade Plan"
label="Upgrade Plan"
href={RoutesE.SUBSCRIBE}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styles from './SubscriptionModal.module.scss';
import { useCallback } from 'react';
import { Icon, Button, ButtonCategoriesE } from '@mozilla/lilypad-ui';
import { Icon, Button } from '@mozilla/lilypad-ui';
import { FXA_SERVER } from 'config';

type SubscriptionModalT = {
Expand Down Expand Up @@ -70,15 +70,15 @@ const SubscriptionModal = ({
<div className={styles.footer_container}>
<Button
label="cancel"
category={ButtonCategoriesE.PRIMARY_CLEAR}
category="primary_clear"
text="Nevermind"
classProp="mr-10-dt"
onClick={handleCloseClick}
/>
<Button
label="continue to firefox account"
onClick={onManageAccountClick}
category={ButtonCategoriesE.PRIMARY_SOLID}
category="primary_solid"
classProp="mb-24-mb"
text="Continue to Firefox Account"
target="_blank"
Expand Down
6 changes: 3 additions & 3 deletions client/components/modules/hubs/CustomizeHub/CustomizeHub.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styles from './CustomizeHub.module.scss';
import { useRouter } from 'next/router';
import { Button, ButtonCategoriesE } from '@mozilla/lilypad-ui';
import { Button } from '@mozilla/lilypad-ui';
import Card from '@Shared/Card/Card';
import { HubT } from 'types/General';

Expand All @@ -22,7 +22,7 @@ export const CustomizeHub = ({ hub }: CustomizeHubPropsT) => {
iconPlacedRight={true}
text="Edit Domain"
label="edit domain"
category={ButtonCategoriesE.SECONDARY_SOLID}
category="secondary_solid"
onClick={() => {
router.push({
pathname: '/hubs/[hub_id]',
Expand All @@ -40,7 +40,7 @@ export const CustomizeHub = ({ hub }: CustomizeHubPropsT) => {
iconPlacedRight={true}
text="Upload Client"
label="Upload Client"
category={ButtonCategoriesE.SECONDARY_SOLID}
category="secondary_solid"
onClick={() => {
router.push({
pathname: '/custom-client',
Expand Down
6 changes: 3 additions & 3 deletions client/components/modules/hubs/HubCard/ErrorBox.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styles from './ErrorBox.module.scss';
import { Button, ButtonCategoriesE, Icon } from '@mozilla/lilypad-ui';
import { Button, Icon } from '@mozilla/lilypad-ui';

type ErrorBoxPropsT = {
onTryAgainClick?: Function;
Expand Down Expand Up @@ -42,7 +42,7 @@ const ErrorBox = ({
icon="x"
classProp={styles.close}
onClick={handleOnClose}
category={ButtonCategoriesE.PRIMARY_CLEAR}
category="primary_clear"
/>
)}
<div className={styles.error_icon_wrapper}>
Expand All @@ -63,7 +63,7 @@ const ErrorBox = ({
<Button
label="contact us"
text="Contact Us"
category={ButtonCategoriesE.PRIMARY_OUTLINE}
category="primary_outline"
onClick={handleContactClick}
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions client/components/modules/hubs/HubCard/HubCardHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, ButtonCategoriesE, Dropdown } from '@mozilla/lilypad-ui';
import { Button, Dropdown } from '@mozilla/lilypad-ui';
import { useRouter } from 'next/router';
import { RoutesE } from 'types/Routes';
import { StatusE } from 'types/General';
Expand Down Expand Up @@ -71,7 +71,7 @@ const HubCardHeader = ({
<Button
icon="more-vertical"
label="toggle"
category={ButtonCategoriesE.PRIMARY_CLEAR}
category="primary_clear"
/>
}
content={DropdownContent}
Expand Down
17 changes: 5 additions & 12 deletions client/components/modules/hubs/HubFormCard/HubFormCard.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import { useState, useContext, FocusEventHandler } from 'react';
import { useRouter } from 'next/router';
import styles from './HubFormCard.module.scss';
import {
Button,
ButtonCategoriesE,
ButtonSizesE,
Icon,
Input,
Pill,
} from '@mozilla/lilypad-ui';
import { Button, Icon, Input, Pill } from '@mozilla/lilypad-ui';
import { validateHubSubdomain } from 'services/hub.service';
import { StoreContext, SubdomainRetryT } from 'contexts/StoreProvider';
import { RoutesE } from 'types/Routes';
Expand Down Expand Up @@ -162,8 +155,8 @@ const HubFormCard = ({ hub, onSubmit, classProp = '' }: HubFormCardPropsT) => {
<Button
label="cancel"
onClick={handleCancelClick}
size={ButtonSizesE.LARGE}
category={ButtonCategoriesE.PRIMARY_CLEAR}
size="large"
category="primary_clear"
icon="arrow-left"
classProp="mr-5"
/>
Expand Down Expand Up @@ -258,14 +251,14 @@ const HubFormCard = ({ hub, onSubmit, classProp = '' }: HubFormCardPropsT) => {
label="cancel"
classProp="mr-5"
onClick={handleCancelClick}
category={ButtonCategoriesE.PRIMARY_CLEAR}
category="primary_clear"
text="Cancel"
/>

<Button
label="Apply Changes"
type="submit"
category={ButtonCategoriesE.PRIMARY_SOLID}
category="primary_solid"
text="Apply Changes"
/>
</section>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
Button,
CategoryE,
NewNotificationT,
NotificationLocationE,
NotificationTypesE,
} from '@mozilla/lilypad-ui';
import { Button } from '@mozilla/lilypad-ui';
import { StoreContext } from 'contexts/StoreProvider';
import { useRouter } from 'next/router';
import { useCallback, useContext, useState } from 'react';
Expand All @@ -29,13 +23,13 @@ const BeginStarterPlanButton = ({
title: 'Error',
description: 'Failed to create Starter Hub, please try again.',
duration: 8000,
type: NotificationTypesE.ERROR,
location: NotificationLocationE.TOP_RIGHT,
type: 'error',
location: 'top_right',
pauseOnHover: true,
autoClose: true,
hasIcon: true,
category: CategoryE.TOAST,
} as NewNotificationT);
category: 'toast',
});
}, [storeContext]);

const startStarterPlan = async () => {
Expand Down
4 changes: 2 additions & 2 deletions client/components/modules/plans/ContactCard/ContactCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, ButtonCategoriesE } from '@mozilla/lilypad-ui';
import { Button } from '@mozilla/lilypad-ui';
import styles from './ContactCard.module.scss';

type ContactCardPropsT = {
Expand All @@ -21,7 +21,7 @@ const ContactCard = ({ email, subject, classProp = '' }: ContactCardPropsT) => {
label="contact us"
text="Contact us"
onClick={handleContactClick}
category={ButtonCategoriesE.SECONDARY_SOLID}
category="secondary_solid"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styles from './UpgradePlan.module.scss';
import { Button, ButtonCategoriesE } from '@mozilla/lilypad-ui';
import { Button } from '@mozilla/lilypad-ui';
import { RoutesE } from 'types/Routes';

const UpgradePlan = () => {
Expand All @@ -14,7 +14,7 @@ const UpgradePlan = () => {
</div>
<div className="mt-12-mb">
<Button
category={ButtonCategoriesE.SECONDARY_SOLID}
category="secondary_solid"
text="Upgrade"
label="Upgrade"
href={RoutesE.SUBSCRIBE}
Expand Down
5 changes: 2 additions & 3 deletions client/components/navigation/MainNav/MainNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
import {
Button,
Avatar,
ButtonCategoriesE,
Icon,
Dropdown,
dropdownT,
Expand Down Expand Up @@ -138,7 +137,7 @@ const MainNav = ({
<Button
label="edit dashboard"
classProp={styles.exit_button}
category={ButtonCategoriesE.SECONDARY_OUTLINE}
category="secondary_outline"
text="Exit Dashboard"
onClick={onLogOutClick}
/>
Expand Down Expand Up @@ -170,7 +169,7 @@ const MainNav = ({
{showLoggedOutUi && (
<Button
label="sign in"
category={ButtonCategoriesE.SECONDARY_OUTLINE}
category="secondary_outline"
text="Sign In"
href={`https://${AUTH_SERVER}/login?idp=fxa&client=https://${DASH_ROOT_DOMAIN}`}
/>
Expand Down
8 changes: 2 additions & 6 deletions client/components/shared/ButtonToggle/ButtonToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, ButtonCategoriesE } from '@mozilla/lilypad-ui';
import { Button } from '@mozilla/lilypad-ui';
import { useState } from 'react';
import styles from './ButtonToggle.module.scss';

Expand Down Expand Up @@ -39,11 +39,7 @@ const ButtonToggle = ({
onClick={() => {
handleButtonClick(value);
}}
category={
value === currentValue
? ButtonCategoriesE.PRIMARY_SOLID
: ButtonCategoriesE.PRIMARY_CLEAR
}
category={value === currentValue ? 'primary_solid' : 'primary_clear'}
/>
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/components/shared/ExpansionPanel/ExpansionPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactNode, useState, useCallback } from 'react';
import styles from './ExpansionPanel.module.scss';
import { Icon, ButtonCategoriesE } from '@mozilla/lilypad-ui';
import { Icon } from '@mozilla/lilypad-ui';
import FadeIn from '@Util/FadeIn';

export type ExpansionPanelPropsT = {
Expand Down
4 changes: 2 additions & 2 deletions client/components/shared/FeedbackBanner/FeedbackBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback, useState } from 'react';
import styles from './FeedbackBanner.module.scss';
import { Button, ButtonCategoriesE, Icon } from '@mozilla/lilypad-ui';
import { Button, Icon } from '@mozilla/lilypad-ui';
import FadeIn from '@Util/FadeIn';

type FeedbackBannerPropsT = {
Expand Down Expand Up @@ -50,7 +50,7 @@ const FeedbackBanner = ({ classProp = '' }: FeedbackBannerPropsT) => {
label="give feedback"
href="https://connect.mozilla.org/t5/ideas/idb-p/ideas/label-name/hubs"
classProp={styles.button}
category={ButtonCategoriesE.SECONDARY_OUTLINE}
category="secondary_outline"
target="_blank"
text="Give Feedback"
/>
Expand Down
14 changes: 7 additions & 7 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint && prettier -c ."
},
"dependencies": {
"@mozilla/lilypad-ui": "1.8.6",
"@mozilla/lilypad-ui": "2.0.0",
"@reduxjs/toolkit": "^1.8.1",
"axios": "^0.27.1",
"cookies-next": "^2.0.4",
Expand Down
6 changes: 3 additions & 3 deletions client/pages/custom-client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRouter } from 'next/router';
import Head from 'next/head';
import type { GetServerSidePropsContext } from 'next';
import { AxiosRequestHeaders } from 'axios';
import { Button, ButtonSizesE, ButtonCategoriesE } from '@mozilla/lilypad-ui';
import { Button } from '@mozilla/lilypad-ui';
import { HubT } from 'types/General';
import { RoutesE } from 'types/Routes';
import { customClientRG } from 'services/routeGuard.service';
Expand Down Expand Up @@ -68,8 +68,8 @@ const CustomClient = ({ subscription }: HubDetailsViewPropsT) => {
<Button
label="cancel"
onClick={handleCancelClick}
size={ButtonSizesE.LARGE}
category={ButtonCategoriesE.PRIMARY_CLEAR}
size="large"
category="primary_clear"
icon="arrow-left"
classProp="mr-5"
/>
Expand Down
11 changes: 3 additions & 8 deletions client/pages/hubs/[hub_id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ import { RoutesE } from 'types/Routes';
import { getHub, updateHub } from 'services/hub.service';
import { hubIdRG } from 'services/routeGuard.service';
import Head from 'next/head';
import {
NotificationTypesE,
NotificationLocationE,
CategoryE,
} from '@mozilla/lilypad-ui';
import SkeletonCard from '@Shared/SkeletonCard/SkeletonCard';
import HubFormCard, {
HubFormCardT,
Expand Down Expand Up @@ -65,12 +60,12 @@ const HubDetailsView = ({ subscription }: HubDetailsViewPropsT) => {
title: 'Error',
description: errorMessage,
duration: 8000,
type: NotificationTypesE.ERROR,
location: NotificationLocationE.TOP_CENTER,
type: 'error',
location: 'top_center',
pauseOnHover: true,
autoClose: true,
hasIcon: true,
category: CategoryE.TOAST,
category: 'toast',
});
setLoading(false);
},
Expand Down
Loading

0 comments on commit 37fcf61

Please sign in to comment.