Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/playground feedback INTER-775 #151

Merged
merged 5 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions src/app/playground/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ import { ChevronSvg } from '../../client/img/chevronSvg';
import { pluralize } from '../../shared/utils';
import { motion } from 'framer-motion';

const PLAYGROUND_COPY = {
androidOnly: 'Applicable only to Android devices',
iosOnly: 'Applicable only to iOS devices',
mobileOnly: 'Applicable only to iOS and Android devices',
} as const;

// Nothing magic about `8` here, each customer must define their own use-case specific threshold
const SUSPECT_SCORE_RED_THRESHOLD = 8;

Expand All @@ -61,6 +55,38 @@ const DocsLink: FunctionComponent<{ children: string; href: string; style?: Reac
);
};

const PLAYGROUND_COPY = {
androidOnly: (
<>
Available in the native{' '}
<Link href='https://dev.fingerprint.com/docs/native-android-integration' target='_blank'>
Android SDK
</Link>
</>
),
iosOnly: (
<>
Available in the native{' '}
<Link href='https://dev.fingerprint.com/docs/ios' target='_blank'>
iOS SDK
</Link>
</>
),
mobileOnly: (
<>
Available in native{' '}
<Link href='https://dev.fingerprint.com/docs/ios' target='_blank'>
iOS
</Link>{' '}
and{' '}
<Link href='https://dev.fingerprint.com/docs/native-android-integration' target='_blank'>
Android
</Link>{' '}
SDKs
</>
),
} as const;

// Map cannot be server-side rendered
const Map = dynamic(() => import('./components/Map'), { ssr: false });

Expand Down
15 changes: 15 additions & 0 deletions src/app/playground/components/SignalTable.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@
td:first {
padding: rem(12px) rem(8px);
}

td:last-of-type {
a {
color: v('gray');

text-decoration: underline;
text-decoration-color: v('gray-box-stroke');
text-underline-offset: 4px;

&:hover {
color: v('dark-black');
text-decoration-color: v('dark-black');
}
}
}
}

td.red {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,25 @@
.json-view .json-view--null {
color: var(--json-null);
}

// Make expand object button look more obviously clickable
.json-view .jv-button {
visibility: hidden;
position: relative;

&:after {
visibility: visible;
position: absolute;
top: 0;
left: 0;
content: '···';
background: v('gray-box-stroke');
border-radius: 8px;
letter-spacing: -3px;
padding-left: 3px;
padding-right: 6px;
}
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/pages/coupon-fraud/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function CouponFraudUseCase({ embed }: CustomPageProps) {
const [airMaxCount, setAirMaxCount] = useState(1);
const [allStarCount, setAllStarCount] = useState(1);

const [couponCode, setCouponCode] = useState('');
const [couponCode, setCouponCode] = useState('Promo3000');
const [discount, setDiscount] = useState(0);

const cartItems = [
Expand Down Expand Up @@ -99,6 +99,7 @@ export default function CouponFraudUseCase({ embed }: CustomPageProps) {
type='text'
placeholder='Enter a coupon'
onChange={(e) => setCouponCode(e.target.value)}
value={couponCode}
required
data-testid={TEST_IDS.couponFraud.couponCode}
/>
Expand Down
Loading