Skip to content

Commit

Permalink
Merge branch 'feat/profiles' into feat/profiles-edit-create-form
Browse files Browse the repository at this point in the history
  • Loading branch information
naumovski-filip committed Jul 14, 2023
2 parents b40c144 + a35f4d1 commit 9b4f95c
Show file tree
Hide file tree
Showing 68 changed files with 119 additions and 68 deletions.
2 changes: 1 addition & 1 deletion src/components/Account/__snapshots__/Account.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Account> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Alert/__snapshots__/Alert.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Alert> > renders and matches snapshot 1`] = `<div />`;
2 changes: 1 addition & 1 deletion src/components/Button/__snapshots__/Button.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Button> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<CancelSubscriptionForm> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<CardGrid> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Checkbox> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<CheckoutForm> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<OffersForm> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<CollapsibleText> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<ConfirmationDialog> > renders and matches snapshot 1`] = `<div />`;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<ConfirmationForm> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<CreditCardCVCField> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<CreditCardExpiryField> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<CreditCardNumberField> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<DemoConfigDialog> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialog/__snapshots__/Dialog.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Dialog> > renders and matches snapshot 1`] = `
<body
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<DialogBackButton> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<EditPasswordForm> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<ErrorPage> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Favorites> > renders and matches snapshot 1`] = `<div />`;
2 changes: 1 addition & 1 deletion src/components/Filter/__snapshots__/Filter.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Filter> > renders Filter 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<ForgotPasswordForm> > renders and matches snapshot type forgot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/__snapshots__/Form.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Form> > renders Form 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<FormFeedback> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/__snapshots__/Header.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Header /> > renders header 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<HelperText> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<IconButton> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<LanguageMenu> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Link/__snapshots__/Link.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Link> > renders and matches snapshot 1`] = `
<div>
Expand Down
9 changes: 9 additions & 0 deletions src/components/LoadingOverlay/LoadingOverlay.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@
height: 100%;
background-color: rgba(variables.$black, 0.3);
}

.profile {
img {
position: absolute;
width: calc(#{variables.$base-spacing} * 8);
height: calc(#{variables.$base-spacing} * 8);
border-radius: 50%;
}
}
7 changes: 5 additions & 2 deletions src/components/LoadingOverlay/LoadingOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@ import Spinner from '#components/Spinner/Spinner';
type Props = {
transparentBackground?: boolean;
inline?: boolean;
profileImageUrl?: string;
};

const LoadingOverlay = ({ transparentBackground = false, inline = false }: Props): JSX.Element => {
const LoadingOverlay = ({ transparentBackground = false, inline = false, profileImageUrl = '' }: Props): JSX.Element => {
const className = classNames(styles.loadingOverlay, {
[styles.transparent]: transparentBackground,
[styles.fixed]: !inline,
[styles.inline]: inline,
[styles.profile]: profileImageUrl,
});

return (
<div className={className}>
<Spinner />
{profileImageUrl && <img src={profileImageUrl} alt="Profile Avatar" />}
<Spinner size={profileImageUrl ? 'large' : 'medium'} />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<LoginForm> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Logo/__snapshots__/Logo.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Logo/> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<MarkdownComponent> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<MenuButton> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/__snapshots__/Modal.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Modal> > renders and matches snapshot 1`] = `<div />`;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<ModalCloseButton> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<NoPaymentRequired> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<PasswordField> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<PasswordStrength> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PayPal/__snapshots__/PayPal.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<PayPal> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Payment/__snapshots__/Payment.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Payment> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<PaymentFailed> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<PersonalDetailsForm> > Renders with errors 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Player/__snapshots__/Player.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Player> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Popover/__snapshots__/Popover.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Popover> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Radio/__snapshots__/Radio.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<Radio> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<RegistrationForm> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<RenewSubscriptionForm> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<ResetPassword> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<SearchBar> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<ShareButton> > renders and matches snapshot 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Shelf/__snapshots__/Shelf.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Shelf Component tests > Featured shelf 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar/__snapshots__/Sidebar.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<SideBar /> > renders sideBar 1`] = `
<div>
Expand Down
14 changes: 14 additions & 0 deletions src/components/Spinner/Spinner.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@
height: variables.$base-spacing;
}

.large {
width: 142px;
height: 142px;
}

.large div {
width: calc(#{variables.$base-spacing} * 8);
height: calc(#{variables.$base-spacing} * 8);
}

.large.buffer div {
border-color: variables.$red-dark variables.$white variables.$white variables.$white;
}

.buffer div:nth-child(1) {
animation-delay: -0.45s;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Spinner/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import React from 'react';
import styles from './Spinner.module.scss';

type Props = {
size?: 'small' | 'medium';
size?: 'small' | 'medium' | 'large';
className?: string;
};

const Spinner = ({ size = 'medium', className = '' }: Props): JSX.Element => {
return (
<div className={classNames(styles.buffer, className, { [styles.small]: size === 'small' })}>
<div className={classNames(styles.buffer, className, { [styles.small]: size === 'small', [styles.large]: size === 'large' })}>
<div />
<div />
<div />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<SubscriptionCancelled> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<SubscriptionRenewed> > renders and matches snapshot 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`<TextField> > renders and matches multiline snapshot 1`] = `
<div>
Expand Down
Loading

0 comments on commit 9b4f95c

Please sign in to comment.