Skip to content

Commit

Permalink
docs(contributions): accept pr suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasaarcoverde committed Jul 23, 2024
1 parent baeba74 commit 4e574af
Show file tree
Hide file tree
Showing 11 changed files with 258 additions and 113 deletions.
111 changes: 81 additions & 30 deletions packages/docs/__contributions__/issues.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
export const issuesOnFire = [
interface Author {
login: string
avatarUrl: string
}

export interface Issue {
assignees: { nodes: Omit<Author, 'avatarUrl'>[] }
url: string
number: number
title: string
createdAt: string
author: Author
state: string
comments: { nodes: { author: Author }[] }
}

export const issuesOnFire: Issue[] = [
{
assignees: { nodes: [{ login: 'matheusps' }] },
url: 'https://github.com/vtex/shoreline/issues/1537',
Expand Down Expand Up @@ -83,6 +99,27 @@ export const issuesOnFire = [
'https://avatars.githubusercontent.com/u/84085258?u=24adfd51781b0d3b86e4fff8f2aabcba8afaa7cc&v=4',
},
},
{
author: {
login: 'felipepowlist',
avatarUrl:
'https://avatars.githubusercontent.com/u/64273940?u=ef5500dc49b6caaaf57a0f81d887b8ce9d97d351&v=4',
},
},
{
author: {
login: 'malu-viana',
avatarUrl:
'https://avatars.githubusercontent.com/u/90862160?u=54e7a2458bc76b500106dfaea9c09ef0cc548fc8&v=4',
},
},
{
author: {
login: 'elleenvs-d',
avatarUrl:
'https://avatars.githubusercontent.com/u/175859727?u=dc01f450f095de3af29fbc2d16dc1c2bf3653861&v=4',
},
},
],
},
},
Expand Down Expand Up @@ -147,89 +184,103 @@ export const issuesOnFire = [
},
{
assignees: { nodes: [] },
url: 'https://github.com/vtex/shoreline/issues/1601',
number: 1601,
title: 'Adjust margins and paddings on filter popover',
createdAt: '2024-05-02T10:30:39Z',
url: 'https://github.com/vtex/shoreline/issues/1705',
number: 1705,
title: 'Search placeholder is not localizated',
createdAt: '2024-07-05T15:32:10Z',
author: {
login: 'felipepowlist',
login: 'lafray',
avatarUrl:
'https://avatars.githubusercontent.com/u/64273940?u=ef5500dc49b6caaaf57a0f81d887b8ce9d97d351&v=4',
'https://avatars.githubusercontent.com/u/36760180?u=66a13423e65c88a3fc82201a20ba4282a1f5224a&v=4',
},
state: 'OPEN',
comments: {
nodes: [
{
author: {
login: 'matheusps',
login: 'lucasaarcoverde',
avatarUrl:
'https://avatars.githubusercontent.com/u/6964311?u=dab11b9f9e4b1b7eb66d86d0f4bf1e0c0d55d3bd&v=4',
'https://avatars.githubusercontent.com/u/20579226?u=22c79f6ca441ee1d933d5b59326348295b6a9844&v=4',
},
},
{
author: {
login: 'beatrizmilhomem',
login: 'lafray',
avatarUrl:
'https://avatars.githubusercontent.com/u/84085258?u=24adfd51781b0d3b86e4fff8f2aabcba8afaa7cc&v=4',
'https://avatars.githubusercontent.com/u/36760180?u=66a13423e65c88a3fc82201a20ba4282a1f5224a&v=4',
},
},
{
author: {
login: 'felipepowlist',
login: 'lucasaarcoverde',
avatarUrl:
'https://avatars.githubusercontent.com/u/64273940?u=ef5500dc49b6caaaf57a0f81d887b8ce9d97d351&v=4',
'https://avatars.githubusercontent.com/u/20579226?u=22c79f6ca441ee1d933d5b59326348295b6a9844&v=4',
},
},
{
author: {
login: 'beatrizmilhomem',
login: 'davicostalf',
avatarUrl:
'https://avatars.githubusercontent.com/u/84085258?u=24adfd51781b0d3b86e4fff8f2aabcba8afaa7cc&v=4',
'https://avatars.githubusercontent.com/u/8797476?u=209f606081b76c9e4afce6812d94ca789b213ed3&v=4',
},
},
{
author: {
login: 'felipepowlist',
login: 'beatrizmilhomem',
avatarUrl:
'https://avatars.githubusercontent.com/u/64273940?u=ef5500dc49b6caaaf57a0f81d887b8ce9d97d351&v=4',
'https://avatars.githubusercontent.com/u/84085258?u=24adfd51781b0d3b86e4fff8f2aabcba8afaa7cc&v=4',
},
},
],
},
},
{
assignees: { nodes: [] },
url: 'https://github.com/vtex/shoreline/issues/1705',
number: 1705,
title: 'Search placeholder is not localizated',
createdAt: '2024-07-05T15:32:10Z',
assignees: { nodes: [{ login: 'felipepowlist' }] },
url: 'https://github.com/vtex/shoreline/issues/1601',
number: 1601,
title: 'Adjust margins and paddings on filter popover',
createdAt: '2024-05-02T10:30:39Z',
author: {
login: 'lafray',
login: 'felipepowlist',
avatarUrl:
'https://avatars.githubusercontent.com/u/36760180?u=66a13423e65c88a3fc82201a20ba4282a1f5224a&v=4',
'https://avatars.githubusercontent.com/u/64273940?u=ef5500dc49b6caaaf57a0f81d887b8ce9d97d351&v=4',
},
state: 'OPEN',
comments: {
nodes: [
{
author: {
login: 'lucasaarcoverde',
login: 'matheusps',
avatarUrl:
'https://avatars.githubusercontent.com/u/20579226?u=22c79f6ca441ee1d933d5b59326348295b6a9844&v=4',
'https://avatars.githubusercontent.com/u/6964311?u=dab11b9f9e4b1b7eb66d86d0f4bf1e0c0d55d3bd&v=4',
},
},
{
author: {
login: 'lafray',
login: 'beatrizmilhomem',
avatarUrl:
'https://avatars.githubusercontent.com/u/36760180?u=66a13423e65c88a3fc82201a20ba4282a1f5224a&v=4',
'https://avatars.githubusercontent.com/u/84085258?u=24adfd51781b0d3b86e4fff8f2aabcba8afaa7cc&v=4',
},
},
{
author: {
login: 'lucasaarcoverde',
login: 'felipepowlist',
avatarUrl:
'https://avatars.githubusercontent.com/u/20579226?u=22c79f6ca441ee1d933d5b59326348295b6a9844&v=4',
'https://avatars.githubusercontent.com/u/64273940?u=ef5500dc49b6caaaf57a0f81d887b8ce9d97d351&v=4',
},
},
{
author: {
login: 'beatrizmilhomem',
avatarUrl:
'https://avatars.githubusercontent.com/u/84085258?u=24adfd51781b0d3b86e4fff8f2aabcba8afaa7cc&v=4',
},
},
{
author: {
login: 'felipepowlist',
avatarUrl:
'https://avatars.githubusercontent.com/u/64273940?u=ef5500dc49b6caaaf57a0f81d887b8ce9d97d351&v=4',
},
},
],
Expand Down
99 changes: 71 additions & 28 deletions packages/docs/__contributions__/stats.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
export const contributors = [
export interface Contributor {
username: string
image: string
stats: {
issues: number
pulls: number
reviews: number
comments: number
merged: number
assigns: number
rate: number
}
}

export const contributors: Contributor[] = [
{
username: 'matheusps',
image:
'https://avatars.githubusercontent.com/u/6964311?u=dab11b9f9e4b1b7eb66d86d0f4bf1e0c0d55d3bd&v=4',
stats: {
issues: 13,
assigns: 9,
comments: 19,
pulls: 71,
reviews: 91,
merged: 65,
rate: 44.666666666666664,
assigns: 8,
comments: 20,
pulls: 72,
reviews: 102,
merged: 66,
rate: 46.833333333333336,
},
},
{
Expand All @@ -36,23 +50,23 @@ export const contributors = [
assigns: 3,
comments: 6,
pulls: 27,
reviews: 60,
reviews: 62,
merged: 25,
rate: 20.5,
rate: 20.833333333333332,
},
},
{
username: 'beatrizmilhomem',
image:
'https://avatars.githubusercontent.com/u/84085258?u=24adfd51781b0d3b86e4fff8f2aabcba8afaa7cc&v=4',
stats: {
issues: 10,
issues: 18,
assigns: 1,
comments: 12,
comments: 16,
pulls: 25,
reviews: 14,
reviews: 15,
merged: 24,
rate: 14.333333333333334,
rate: 16.5,
},
},
{
Expand All @@ -74,13 +88,13 @@ export const contributors = [
image:
'https://avatars.githubusercontent.com/u/8797476?u=209f606081b76c9e4afce6812d94ca789b213ed3&v=4',
stats: {
issues: 3,
issues: 4,
assigns: 0,
comments: 5,
pulls: 3,
reviews: 5,
merged: 3,
rate: 3.1666666666666665,
comments: 8,
pulls: 4,
reviews: 6,
merged: 4,
rate: 4.333333333333333,
},
},
{
Expand Down Expand Up @@ -139,6 +153,20 @@ export const contributors = [
rate: 0.8333333333333334,
},
},
{
username: 'felipepowlist',
image:
'https://avatars.githubusercontent.com/u/64273940?u=ef5500dc49b6caaaf57a0f81d887b8ce9d97d351&v=4',
stats: {
issues: 1,
assigns: 1,
comments: 2,
pulls: 0,
reviews: 0,
merged: 0,
rate: 0.6666666666666666,
},
},
{
username: 'danilomcampos',
image:
Expand All @@ -154,13 +182,13 @@ export const contributors = [
},
},
{
username: 'felipepowlist',
username: 'Luizfmcosta',
image:
'https://avatars.githubusercontent.com/u/64273940?u=ef5500dc49b6caaaf57a0f81d887b8ce9d97d351&v=4',
'https://avatars.githubusercontent.com/u/131171714?u=3a57726e05e7a9bf9abb736a5dcaea748ad85924&v=4',
stats: {
issues: 1,
assigns: 0,
comments: 1,
assigns: 1,
comments: 0,
pulls: 0,
reviews: 0,
merged: 0,
Expand Down Expand Up @@ -238,13 +266,27 @@ export const contributors = [
},
},
{
username: 'Luizfmcosta',
username: 'malu-viana',
image:
'https://avatars.githubusercontent.com/u/131171714?u=3a57726e05e7a9bf9abb736a5dcaea748ad85924&v=4',
'https://avatars.githubusercontent.com/u/90862160?u=54e7a2458bc76b500106dfaea9c09ef0cc548fc8&v=4',
stats: {
issues: 1,
issues: 0,
assigns: 0,
comments: 0,
comments: 1,
pulls: 0,
reviews: 0,
merged: 0,
rate: 0.16666666666666666,
},
},
{
username: 'elleenvs-d',
image:
'https://avatars.githubusercontent.com/u/175859727?u=dc01f450f095de3af29fbc2d16dc1c2bf3653861&v=4',
stats: {
issues: 0,
assigns: 0,
comments: 1,
pulls: 0,
reviews: 0,
merged: 0,
Expand Down Expand Up @@ -587,6 +629,7 @@ const maintainers = [

export function getContributors() {
return contributors.filter(
(contributor) => !maintainers.includes(contributor.username)
(contributor) =>
!maintainers.includes(contributor.username) && contributor.stats.rate > 0
)
}
17 changes: 14 additions & 3 deletions packages/docs/components/contributions/contributions.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
.contributionsContainer {
border: var(--sl-border-base);
padding: var(--sl-space-8);
border-radius: var(--sl-radius-1);
border-radius: var(--sl-radius-3);
}

.contributionsHeader {
Expand Down Expand Up @@ -62,14 +62,25 @@

.issuesContainer {
border: var(--sl-border-base);
border-radius: var(--sl-radius-1);
border-radius: var(--sl-radius-3);
}

.issueContainer {
padding: var(--sl-space-5) var(--sl-space-4);
display: flex;
justify-content: space-between;
cursor: pointer;
border-radius: 0;
}

.issueContainer:first-child {
border-top-left-radius: var(--sl-radius-3);
border-top-right-radius: var(--sl-radius-3);
}

.issueContainer:last-child {
border-bottom-left-radius: var(--sl-radius-3);
border-bottom-right-radius: var(--sl-radius-3);
}

.issueContainer:not(:last-child) {
Expand All @@ -83,7 +94,7 @@
.issueTitle {
font-size: 1rem;
font-weight: 500;
line-height: 1.4375rem;
line-height: 1rem;
text-align: left;
}

Expand Down
Loading

0 comments on commit 4e574af

Please sign in to comment.