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: update DevCard design #3879

Merged
merged 22 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bc0f188
init style new front design
zeucapua Aug 7, 2024
237b6ee
Merge branch 'beta' into feat/devcard-design-update
zeucapua Aug 7, 2024
2d3ba91
Merge branch 'beta' into feat/devcard-design-update
zeucapua Aug 7, 2024
dcd6601
init back design
zeucapua Aug 7, 2024
246e2cd
use devstats endpoint, design back view
zeucapua Aug 8, 2024
c5b88ac
remove unused imports
zeucapua Aug 8, 2024
be8aef7
Merge branch 'beta' into feat/devcard-design-update
zeucapua Aug 8, 2024
0136f4c
move import order
zeucapua Aug 8, 2024
83e7a56
Merge branch 'feat/devcard-design-update' of https://github.com/open-…
zeucapua Aug 8, 2024
b7c3e09
fix storybook, implement ActivityPill with new ranges
zeucapua Aug 8, 2024
6acfe4d
implement UserDevStats on 404 + DevCardWall, fix component stories
zeucapua Aug 9, 2024
ae40760
Merge branch 'beta' into feat/devcard-design-update
zeucapua Aug 9, 2024
b7d1710
validate username used in devstats endpoint
zeucapua Aug 9, 2024
a4164c2
change dev card stub data, fix vitest env + carousel test
zeucapua Aug 10, 2024
85e12f5
fix stub data
zeucapua Aug 10, 2024
7c3804a
Merge branch 'beta' into feat/devcard-design-update
zeucapua Aug 10, 2024
1a2f1aa
merge fixes?
zeucapua Aug 10, 2024
a5f8024
fetch fix and capture error on fetch
zeucapua Aug 10, 2024
6bdf7c8
bio overflow scroll, change padding
zeucapua Aug 12, 2024
f5a5dbe
add logo to front view
zeucapua Aug 12, 2024
b32e800
change devcard border
zeucapua Aug 12, 2024
0882f4d
Merge branch 'beta' into feat/devcard-design-update
zeucapua Aug 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
16 changes: 15 additions & 1 deletion components/atoms/Pill/pill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,21 @@ const Pill: React.FC<PillProps> = ({ className, text, color = "slate", size = "b
${size === "small" ? "py-1 px-1.5" : "py-1.5 px-2 "}
inline-flex items-center rounded-full w-fit gap-1 ${className}`}
>
{icon}
<span
className={`${
color === "green"
? "text-light-grass-11"
: color === "yellow"
? "text-amber-700"
: color === "red"
? "text-light-red-11"
: color === "purple"
? "text-purple-600"
: "text-light-slate-11"
}`}
>
{icon}
</span>
zeucapua marked this conversation as resolved.
Show resolved Hide resolved

<p
className={clsx(
Expand Down
104 changes: 73 additions & 31 deletions components/molecules/DevCard/dev-card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,78 @@ const DevCardTemplate: ComponentStory<typeof DevCard> = (args) => <DevCard {...a
export const DevCardStory = DevCardTemplate.bind({});

DevCardStory.args = {
username: "foxyblocks",
name: "Chris Schlensker",
avatarURL: "https://avatars.githubusercontent.com/u/555044?v=4",
prs: 5,
repos: 57,
bio: "This is the story all about how my life got flipped turned upside down, and I'd like to take a minute just sit right there, I'll tell you how I became the prince of a town called Bel-Air.",
prVelocity: 102,
prMergePercentage: 74,
age: 656,
user: demoUser(),
isInteractive: true
};

export const Loading = DevCardTemplate.bind({});

Loading.args = {
username: "foxyblocks",
avatarURL: "https://avatars.githubusercontent.com/u/555044?v=4",
isLoading: true,
};

export const HighActivity = DevCardTemplate.bind({});

HighActivity.args = {
...DevCardStory.args,
repos: 200,
};

export const LowActivity = DevCardTemplate.bind({});

LowActivity.args = {
...DevCardStory.args,
repos: 0,
prs: 0,
};
function demoUser() {
zeucapua marked this conversation as resolved.
Show resolved Hide resolved
return {
"email": "",
"notification_count": 0,
"insights_count": 0,
"personal_workspace_id": "",
"id": 20603494,
"open_issues": 31,
"created_at": "2016-07-22T19:49:17.000Z",
"updated_at": "2024-08-08T19:49:09.940Z",
"first_opened_pr_at": "2022-11-09T20:50:08.000Z",
"first_pushed_commit_at": "2019-04-11T20:59:57.000Z",
"connected_at": "2024-01-31T17:16:08.609Z",
"campaign_start_date": "2024-01-31T17:16:08.609Z",
"node_id": "",
"avatar_url": "https://avatars.githubusercontent.com/u/20603494?u=dab23ed63c98dc94be294eb1a826e8d204b72235&v=4",
"gravatar_id": "",
"url": "https://github.com/zeucapua",
"login": "zeucapua",
"is_private": false,
"is_open_sauced_member": true,
"is_onboarded": true,
"is_waitlisted": true,
"role": 10,
"bio": "Fullstack Web Developer and Coding Educator",
"blog": "zeu.dev",
"name": "zeudev",
"twitter_username": "zeu_dev",
"linkedin_url": "",
"github_sponsors_url": "",
"discord_url": "",
"company": "@open-sauced",
"location": "Los Angeles, CA",
"display_local_time": false,
"interests": "javascript,typescript,svelte,react",
"hireable": false,
"public_repos": 58,
"public_gists": 0,
"type": "User",
"display_email": false,
"receive_collaboration": false,
"receive_product_updates": true,
"timezone": "Pacific Daylight Time",
"coupon_code": "",
"languages": {
"CSS": 228,
"HTML": 346,
"Svelte": 10076,
"JavaScript": 1015,
"TypeScript": 5284
},
"highlights_count": 0,
"following_count": 1,
"followers_count": 1,
"oscr": 165.20000000000002,
"devstats_updated_at": "2024-08-08T19:49:08.000Z",
"accepted_usage_terms": false,
"recent_pull_request_velocity_count": 4,
"recent_pull_requests_count": 23,
"is_maintainer": true,
"commits": 0,
"prs_created": 19,
"prs_reviewed": 14,
"issues_created": 15,
"commit_comments": 0,
"issue_comments": 14,
"pr_review_comments": 3,
"comments": 17,
"total_contributions": 48
};
}
Loading
Loading