Skip to content

Commit 38eadfb

Browse files
committed
fix minor styling issues
1 parent b270039 commit 38eadfb

File tree

16 files changed

+754
-302
lines changed

16 files changed

+754
-302
lines changed

CLAUDE.md

Lines changed: 121 additions & 77 deletions
Large diffs are not rendered by default.

auth4genai/intro/asynchronous-authorization.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ This process relies on a decoupled authentication flow where the user provides c
1313

1414
<Frame>
1515
<iframe
16-
width="590px"
17-
height="330px"
1816
src="https://play.vidyard.com/tHw62YdhKaUCRrmLheT1dE.html"
1917
title="Asynchronous authorization with Auth0 for AI Agents"
2018
frameborder="0"
2119
allow="accelerometer; autoplay; gyroscope; picture-in-picture; fullscreen"
2220
referrerpolicy="no-referrer-when-downgrade"
2321
allowfullscreen
24-
/>
22+
className="aspect-video object-cover w-full h-full"
23+
/>
24+
2525
</Frame>
2626

2727
## Use cases for asynchronous authorization

auth4genai/intro/authorization-for-rag.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ permalink: "/intro/authorization-for-rag"
1111

1212
<Frame>
1313
<iframe
14-
width="590px"
15-
height="330px"
1614
src="https://play.vidyard.com/TCAzaPdj4SEp9yXTbgPP1W.html"
1715
title="Authorization for RAG using Auth0 FGA"
1816
frameborder="0"
1917
allow="accelerometer; autoplay; gyroscope; picture-in-picture; fullscreen"
2018
referrerpolicy="no-referrer-when-downgrade"
2119
allowfullscreen
20+
className="aspect-video object-cover w-full h-full"
2221
/>
2322
</Frame>
2423

@@ -67,11 +66,11 @@ The process works as follows:
6766
`document:2024-financials`.
6867
</Step>
6968
<Step title="Fetch and filter">
70-
When a user submits a query to your AI agent, your backend first
71-
fetches relevant documents from a vector database and then makes a
72-
permission check call to Auth0 FGA. This call asks, "Is this user allowed to
73-
view these documents?". Our AI framework SDKs abstract this and make it as
74-
easy as plugging in a filter in your retriever tool.
69+
When a user submits a query to your AI agent, your backend first fetches
70+
relevant documents from a vector database and then makes a permission check
71+
call to Auth0 FGA. This call asks, "Is this user allowed to view these
72+
documents?". Our AI framework SDKs abstract this and make it as easy as
73+
plugging in a filter in your retriever tool.
7574
</Step>
7675
<Step title="Secure retrieval">
7776
Auth0 FGA determines if the user is authorized to access the documents. Your

auth4genai/intro/overview.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Follow our [quickstart guides](/get-started/overview) for a step-by-step tutoria
4949

5050
Explore our sample applications and templates
5151

52-
<Columns cols={3}>
52+
<Columns cols={1}>
5353
<Card href="https://github.com/auth0-samples/auth0-assistant0" title="Assistant0" vertical>
5454
A fullstack AI personal assistant with pre-configured tools that
5555
demonstrates different Auth0 for AI Agents features like User Authentication,
@@ -71,6 +71,7 @@ Explore our sample applications and templates
7171
Authorization).
7272

7373
`NEXT.JS` `LLAMAINDEX`
74+
7475
</Card>
7576
<Card href="https://github.com/auth0-samples/auth0-ai-samples" title="AI Samples" vertical>
7677
Explore our repository of standalone sample applications that showcase

auth4genai/intro/token-vault.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ Once the external account has been successfully connected, the AI agent can fetc
2222

2323
<Frame>
2424
<iframe
25-
width="590px"
26-
height="330px"
2725
src="https://play.vidyard.com/9A42zhQBXirXUpb43PKKAZ.html"
2826
title="Calling APIs with Token Vault"
2927
frameborder="0"
3028
allow="accelerometer; autoplay; gyroscope; picture-in-picture; fullscreen"
3129
referrerpolicy="no-referrer-when-downgrade"
3230
allowfullscreen
31+
className="aspect-video object-cover w-full h-full"
3332
/>
3433
</Frame>
3534

@@ -85,7 +84,8 @@ Token Vault supports a variety of social and enterprise identity providers, incl
8584
title="View All Integrations"
8685
href="/integrations/overview"
8786
icon="share-nodes"
88-
horizontal />
87+
horizontal
88+
/>
8989

9090
## Using Token Vault
9191

auth4genai/intro/user-authentication.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ permalink: "/intro/user-authentication"
1212

1313
<Frame>
1414
<iframe
15-
width="590px"
16-
height="330px"
1715
src="https://play.vidyard.com/cdwosENc4TT1ZhFdJmfKvF.html"
1816
title="User authentication for AI agents using Auth0"
1917
frameborder="0"
2018
allow="accelerometer; autoplay; gyroscope; picture-in-picture; fullscreen"
2119
referrerpolicy="no-referrer-when-downgrade"
2220
allowfullscreen
21+
className="aspect-video object-cover w-full h-full"
2322
/>
2423
</Frame>
2524

auth4genai/snippets/custom-grid/SearchAndFilterGrid.jsx

Lines changed: 82 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,40 @@
1-
import { useState, useMemo } from "react";
1+
import { useState, useMemo, useRef, useEffect } from "react";
22
import { CustomCard } from "/snippets/custom-grid/CustomCard.jsx";
33

44
export const SearchAndFilterGrid = ({ items = [], filters = [] }) => {
5-
65
const fuzzySearch = (needle, haystack) => {
76
if (!needle || !haystack) return false;
87
const needleLower = needle.toLowerCase();
98
const haystackLower = haystack.toLowerCase();
109
return haystackLower.includes(needleLower);
11-
}
10+
};
1211

1312
const [searchTerm, setSearchTerm] = useState("");
1413
const [filter, setFilter] = useState(null);
14+
const filterButtonsRef = useRef(null);
15+
const indicatorRef = useRef(null);
16+
17+
useEffect(() => {
18+
if (!filterButtonsRef.current || !indicatorRef.current) return;
19+
20+
const activeButton = filterButtonsRef.current.querySelector(
21+
".custom-grid-filter-button.active"
22+
);
23+
const container = filterButtonsRef.current;
24+
const indicator = indicatorRef.current;
25+
26+
if (activeButton) {
27+
const containerRect = container.getBoundingClientRect();
28+
const buttonRect = activeButton.getBoundingClientRect();
29+
30+
const left = buttonRect.left - containerRect.left - 2;
31+
const width = buttonRect.width;
32+
33+
indicator.style.transform = `translateX(${left}px)`;
34+
indicator.style.width = `${width}px`;
35+
indicator.style.opacity = "1";
36+
}
37+
}, [filter]);
1538

1639
const filteredItems = useMemo(() => {
1740
let filtered = items;
@@ -28,7 +51,7 @@ export const SearchAndFilterGrid = ({ items = [], filters = [] }) => {
2851
if (filter) {
2952
filtered = filtered.filter((item) => item.type === filter);
3053
}
31-
54+
3255
return filtered;
3356
}, [searchTerm, filter]);
3457

@@ -59,42 +82,76 @@ export const SearchAndFilterGrid = ({ items = [], filters = [] }) => {
5982
fill="none"
6083
className="custom-grid-search-icon"
6184
>
62-
<circle cx="11" cy="11" r="8" stroke="currentColor" strokeWidth="2"/>
63-
<path d="m21 21-4.35-4.35" stroke="currentColor" strokeWidth="2"/>
85+
<circle
86+
cx="11"
87+
cy="11"
88+
r="8"
89+
stroke="currentColor"
90+
strokeWidth="2"
91+
/>
92+
<path
93+
d="m21 21-4.35-4.35"
94+
stroke="currentColor"
95+
strokeWidth="2"
96+
/>
6497
</svg>
6598
</div>
66-
<div className="custom-grid-filter-buttons">
67-
<button
68-
onClick={() => setFilter(null)}
69-
className={`custom-grid-filter-button ${filter === null ? 'active' : ''}`}
70-
>
71-
All
72-
</button>
73-
{filters.map((filterOption) => (
99+
<div className="custom-grid-filter-buttons-wrapper">
100+
<div className="custom-grid-filter-buttons" ref={filterButtonsRef}>
74101
<button
75-
key={filterOption}
76-
onClick={() => setFilter(filterOption)}
77-
className={`custom-grid-filter-button ${filter === filterOption ? 'active' : ''}`}
102+
onClick={() => setFilter(null)}
103+
className={`custom-grid-filter-button ${
104+
filter === null ? "active" : ""
105+
}`}
78106
>
79-
{filterOption}
107+
All
80108
</button>
81-
))}
109+
{filters.map((filterOption) => (
110+
<button
111+
key={filterOption}
112+
onClick={() => setFilter(filterOption)}
113+
className={`custom-grid-filter-button ${
114+
filter === filterOption ? "active" : ""
115+
}`}
116+
>
117+
{filterOption}
118+
</button>
119+
))}
120+
<span
121+
ref={indicatorRef}
122+
className="custom-grid-filter-buttons-indicator"
123+
/>
124+
</div>
82125
</div>
83126
</div>
84127
</div>
85128

86-
<Columns cols={3}>
129+
<Columns cols={2}>
87130
{sortedItems.map((item) => (
88131
<CustomCard item={item} key={item.id} />
89132
))}
90133
</Columns>
91134

92135
{sortedItems.length === 0 && (
93136
<div className="custom-grid-no-results">
94-
<div className="custom-grid-no-results-icon">🔍</div>
95-
<h3 className="custom-grid-no-results-title">
96-
No results found
97-
</h3>
137+
<div className="custom-grid-no-results-icon">
138+
<svg
139+
width="40"
140+
height="40"
141+
viewBox="0 0 24 24"
142+
fill="none"
143+
xmlns="http://www.w3.org/2000/svg"
144+
class="sc-cpUzJl"
145+
>
146+
<path
147+
fill-rule="evenodd"
148+
clip-rule="evenodd"
149+
d="M10 2a8 8 0 104.87 14.348l5.423 5.423 1.414-1.415-5.415-5.415A8 8 0 0010 2zm-6 8a6 6 0 1112 0 6 6 0 01-12 0z"
150+
fill="currentColor"
151+
></path>
152+
</svg>
153+
</div>
154+
<h3 className="custom-grid-no-results-title">No results found</h3>
98155
<p className="custom-grid-no-results-text">
99156
{searchTerm ? `No results for "${searchTerm}". ` : ""}Try adjusting
100157
your search or filter criteria.
@@ -103,4 +160,4 @@ export const SearchAndFilterGrid = ({ items = [], filters = [] }) => {
103160
)}
104161
</div>
105162
);
106-
};
163+
};

0 commit comments

Comments
 (0)