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

fix: refactor contributor page #809

Merged
merged 40 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ac79f72
refactor contributor page
tcm390 Dec 3, 2024
211a549
clean code
tcm390 Dec 3, 2024
398b198
add go back
tcm390 Dec 3, 2024
a519e65
specific the text color
tcm390 Dec 3, 2024
2e2da1e
add total_count and load more for each item
tcm390 Dec 3, 2024
6d2e077
add animation
tcm390 Dec 3, 2024
592e717
margin
tcm390 Dec 3, 2024
209b172
use grid for contributor cards
tcm390 Dec 3, 2024
86f5828
implement dark/light mode color
tcm390 Dec 3, 2024
38a690a
change back icon
tcm390 Dec 3, 2024
9b5d335
tweak text
tcm390 Dec 3, 2024
70a9c14
lazy load contributors
tcm390 Dec 3, 2024
52c973c
rename
tcm390 Dec 3, 2024
1470fdc
tweak animation
tcm390 Dec 3, 2024
91e9af5
use github token
tcm390 Dec 3, 2024
315beb0
use dotenv
tcm390 Dec 3, 2024
b81b8d1
clean code
tcm390 Dec 3, 2024
80d3b3c
add customFields
tcm390 Dec 3, 2024
88e90a9
Merge pull request #825 from ai16z/tcm-docusaurus-env
tcm390 Dec 3, 2024
c0696da
loading indicator
tcm390 Dec 3, 2024
c6e2ae3
Merge pull request #827 from ai16z/tcm-docusaurus-env
tcm390 Dec 3, 2024
e459648
small fix
tcm390 Dec 3, 2024
fe14a22
small fix
tcm390 Dec 3, 2024
849e2a6
auto scroll when new datas are added
tcm390 Dec 3, 2024
171ffec
prevent scrolling for first fetching data
tcm390 Dec 5, 2024
980cdf2
add bullet
tcm390 Dec 5, 2024
2933aba
rename enum
tcm390 Dec 5, 2024
ca1ca5d
integrate dummy summary and score
tcm390 Dec 5, 2024
5a334f4
add hero component and move the files to components folder
tcm390 Dec 5, 2024
ec7efea
use dummy json file
tcm390 Dec 5, 2024
58dd171
small tweak
tcm390 Dec 5, 2024
6168afc
update contributors json file
tcm390 Dec 6, 2024
b4c08cf
use custom hook for token access
tcm390 Dec 6, 2024
8e1b63b
fix load more issue
tcm390 Dec 6, 2024
0d5ff61
fetch remote contributors json file
tcm390 Dec 8, 2024
d623ef1
Merge remote-tracking branch 'origin/main' into tcm-contributor-page
madjin Dec 12, 2024
7cb7ec1
Merge branch 'main' into tcm-contributor-page
tcm390 Dec 12, 2024
78e5c57
Merge branch 'tcm-contributor-page' of github.com:ai16z/eliza into tc…
madjin Dec 12, 2024
bedb291
Merge remote-tracking branch 'origin/develop' into tcm-contributor-page
madjin Dec 12, 2024
12e1063
fix broken page
madjin Dec 12, 2024
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
19 changes: 0 additions & 19 deletions docs/community/Streams/12-2024/2024-12-10.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,26 @@ YouTube Link: https://www.youtube.com/watch?v=6I9e9pJprDI

Part 1: Trusted Execution Environments (TEEs) with Agent Joshua
- **00:00:09** - Stream starts, initial setup issues.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=9>
- **00:01:58** - Intro to Trusted Execution Environments (TEEs).
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=118>
- **00:08:03** - Agent Joshua begins explaining TEEs and the Eliza plugin.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=483>
- **00:19:15** - Deeper dive into remote attestation.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=1155>
- **00:24:50** - Discussion of derived keys.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=1490>
- **00:37:00** - Deploying to a real TEE, Phala Network's TEE cloud.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=2220>
- **00:50:48** - Q&A with Joshua, contact info, and next steps.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=3048>

Part 2: Building a Domino's pizza ordering agent
- **01:04:37** - Transition to building a Domino's pizza ordering agent.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=3877>
- **01:14:20** - Discussion of the pizza ordering agent’s order flow and state machine.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=4460>
- **01:22:07** - Using Claude to generate a state machine diagram.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=4927>
- **01:32:17** - Creating the Domino's plugin in Eliza.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=5537>
- **01:54:15** - Working on the pizza order provider.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=6855>
- **02:16:46** - Pizza provider code completed.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=8206>
- **02:28:50** - Discussion of caching customer and order data.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=8930>
- **03:13:45** - Pushing fixes to main branch and continuing work on the agent.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=11625>
- **04:24:30** - Discussion of summarizing past agent dev school sessions.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=15870>
- **05:01:18** - Shaw returns, admits to ordering Domino's manually.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=18078>
- **05:09:00** - Discussing payment flow and a confirm order action.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=18540>
- **05:27:17** - Final code push, wrap-up, and end of stream.
- Link: <https://www.youtube.com/watch?v=6I9e9pJprDI&t=19637>


## Summary
Expand Down
183 changes: 183 additions & 0 deletions docs/community/components/Accordion.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
import React, { useState, useRef, useEffect } from "react";
import { GitHubItem } from "./Contributions";
import { GITHUB_PAGE_LIMIT } from "./Contributors";

interface AccordionProps {
title: string;
isOpen: boolean;
onToggle: () => void;
data: GitHubItem[];
loadMore?: () => void;
total_count: number;
primaryText?: string;
secondaryText?: string;
mainBackgroundColor?: string;
}

export const Accordion: React.FC<AccordionProps> = ({
title,
isOpen,
onToggle,
data,
loadMore,
total_count,
primaryText,
secondaryText,
mainBackgroundColor,
}) => {
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
const [hoverLoadMore, setHoverLoadMore] = useState<boolean>(false);
const [maxHeight, setMaxHeight] = useState<string>(
isOpen ? "1000px" : "0px",
);

const contentRef = useRef<HTMLDivElement>(null);

React.useEffect(() => {
setMaxHeight(isOpen ? "1000px" : "0px");
}, [isOpen]);

useEffect(() => {
if (contentRef.current && data.length > GITHUB_PAGE_LIMIT) {
contentRef.current.scrollTo({
top: contentRef.current.scrollHeight,
behavior: "smooth",
});
}
}, [data]);

return (
<div
style={{
display: "flex",
flexDirection: "column",
justifyContent: "center",
borderRadius: "0.5rem",
padding: "1rem",
color: primaryText ?? "black",
background: mainBackgroundColor ?? "",
}}
>
<div
onClick={onToggle}
style={{
cursor: "pointer",
fontWeight: "bold",
fontSize: "1rem",
display: "flex",
alignItems: "center",
justifyContent: "space-between",
width: "100%",
}}
>
<div>{title}</div>
<div
style={{
transform: isOpen ? "rotate(90deg)" : "rotate(0deg)",
transition: "transform 0.3s ease",
}}
>
{"▶"}
</div>
</div>
<div
ref={contentRef}
style={{
maxHeight,
overflow: "scroll",
transition: isOpen ? "max-height 1s ease" : "",
scrollbarWidth: "none",
msOverflowStyle: "none",
}}
>
<div
style={{
display: "flex",
flexDirection: "column",
gap: "1rem",
margin: "2rem 0 1rem 1rem",
}}
>
{data.map((entry, index) => (
<div
key={index}
style={{
opacity: hoveredIndex === index ? 0.8 : 1.0,
}}
>
<div
style={{
display: "flex",
flexDirection: "column",
marginBottom: "0.5rem",
cursor: "pointer",
transition: "color 0.2s ease",
}}
onMouseEnter={() => setHoveredIndex(index)}
onMouseLeave={() => setHoveredIndex(null)}
onClick={() =>
window.open(
entry.html_url,
"_blank",
"noopener,noreferrer",
)
}
>
<div
style={{
display: "flex",
alignItems: "center",
gap: "0.5rem",
}}
>
{entry.bullet && (
<div
style={{
width: "0.5rem",
height: "0.5rem",
borderRadius: "50%",
backgroundColor: entry.bullet,
}}
></div>
)}
<div>{entry.title}</div>
</div>
<div
style={{
fontSize: "0.8rem",
color: secondaryText ?? "gray",
}}
>
{entry.created_at.split("T")[0]}
</div>
</div>
</div>
))}
</div>
</div>
{isOpen && loadMore && data.length < total_count && (
<div
style={{
width: "100%",
display: "flex",
justifyContent: "center",
}}
>
<span
style={{
color: hoverLoadMore
? (secondaryText ?? "#3b82f6")
: (primaryText ?? "black"),
cursor: "pointer",
}}
onMouseEnter={() => setHoverLoadMore(true)}
onMouseLeave={() => setHoverLoadMore(false)}
onClick={loadMore}
>
Load more
</span>
</div>
)}
</div>
);
};
Loading
Loading