Skip to content

Commit ad2dfeb

Browse files
authored
Merge branch 'main' into update-globaleaks-repo
2 parents cbc3577 + 9f714a9 commit ad2dfeb

File tree

10 files changed

+5563
-4188
lines changed

10 files changed

+5563
-4188
lines changed

.github/ISSUE_TEMPLATE/suggest_project.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ body:
3131
options:
3232
- label: "Yes"
3333
- label: "No"
34-
required: true
3534
- type: checkboxes
3635
id: SDGs
3736
attributes:

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
skip_checkout: true
7373
push_options: '--force'
7474
- name: Upload artifact
75-
uses: actions/upload-pages-artifact@v1
75+
uses: actions/upload-pages-artifact@v3.0.1
7676
with:
7777
path: ./out
7878

@@ -86,4 +86,4 @@ jobs:
8686
steps:
8787
- name: Deploy to GitHub Pages
8888
id: deployment
89-
uses: actions/deploy-pages@v1
89+
uses: actions/deploy-pages@v4.0.5

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444
env:
4545
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
4646
- name: Upload artifact
47-
uses: actions/upload-pages-artifact@v1
47+
uses: actions/upload-pages-artifact@v3.0.1
4848
with:
4949
path: ./out

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Please note that this project is released with a [Contributor Code of Conduct](C
1515

1616
1. [Fork][fork] and clone the repository
1717
1. Configure and install the dependencies: `npm install`
18-
1. Make sure the tests pass on your machine: `npm run test`
1918
1. Make sure linter passes on your machine: `npm run lint`
2019
1. Create a new branch: `git checkout -b my-branch-name`
2120
1. Make your change, add tests, and make sure the tests and linter still pass

components/RepositoryItem.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ type RepositoryItemProps = {
1414

1515
export const RepositoryItem = ({ repository }: RepositoryItemProps) => {
1616
const [isIssueOpen, setIsIssueOpen] = useState(false);
17+
const [isIssuesListVisible, setIsIssuesListVisible] = useState(false);
1718

1819
dayjs.extend(relativeTime);
1920
const useLastModified = (date: string) => {
@@ -25,10 +26,20 @@ export const RepositoryItem = ({ repository }: RepositoryItemProps) => {
2526
};
2627
const lastModified = useLastModified(repository.last_modified);
2728

29+
useEffect(() => {
30+
if (isIssueOpen) {
31+
setIsIssuesListVisible(true);
32+
} else {
33+
// Delay unmounting to allow close animation to complete
34+
const timer = setTimeout(() => setIsIssuesListVisible(false), 300);
35+
return () => clearTimeout(timer);
36+
}
37+
}, [isIssueOpen]);
38+
2839
return (
2940
<div className="repo-item">
30-
<div id={`repo-${repository.id}`} onClick={() => setIsIssueOpen(!isIssueOpen)}>
31-
<div>
41+
<div id={`repo-${repository.id}`}>
42+
<div onClick={() => setIsIssueOpen(!isIssueOpen)}>
3243
<RepositoryItemTopBar
3344
isIssueOpen={isIssueOpen}
3445
repositoryHasNewIssues={repository.has_new_issues}
@@ -50,7 +61,9 @@ export const RepositoryItem = ({ repository }: RepositoryItemProps) => {
5061
/>
5162
</div>
5263
</div>
53-
{isIssueOpen && <IssuesList issues={repository.issues} />}
64+
<div className={`repo-item__issues-warper ${isIssueOpen ? 'open' : ''}`}>
65+
{isIssuesListVisible && <IssuesList issues={repository.issues} />}
66+
</div>
5467
</div>
5568
</div>
5669
);

0 commit comments

Comments
 (0)