Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Merge branch 'contributions' into issue9115
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude authored Jun 8, 2024
2 parents c4d8841 + 70d0a3c commit 335518c
Show file tree
Hide file tree
Showing 125 changed files with 4,563 additions and 6,378 deletions.
6 changes: 0 additions & 6 deletions .github/scripts/check-filenames.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
let fileNames = process.env.FILENAMES.split(" ");
const baseFileNames = process.env.BASE_FILENAMES.split(" ");
const user = process.env.USERNAME;
let exitCode = 0;

// Remove files not changed in this PR from list
if (baseFileNames.length > 0) {
fileNames = fileNames.filter((file) => !baseFileNames.includes(file));
}

if (fileNames.length > 0) {
fileNames.forEach((file) => {
const splitFile = file.split("/");
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/data-filenames.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,20 @@ jobs:
name: Test changed-files
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "lts/*"

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35.5.0

- name: Get changed files between base & head
id: base-changed-files
uses: tj-actions/changed-files@v35.5.0
with:
base_sha: ${{ github.event.pull_request.head.sha }}
uses: tj-actions/changed-files@v41

- name: Check changed files
env:
BASE_FILENAMES: ${{ steps.base-changed-files.outputs.all_changed_files }}
FILENAMES: ${{ steps.changed-files.outputs.all_changed_files }}
USERNAME: ${{ github.actor }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
id: format-files
with:
commit_message: "style: format files"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testimonial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
DATA_DATE: ${{ steps.date.outputs.time }}
- name: validate JSON
run: jq . "data/${{ steps.issue-parser.outputs.issueparser_name }}/testimonials/${{ github.actor }}.json"
- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Testimonial for '${{ steps.issue-parser.outputs.issueparser_name }}' by '${{ github.actor }}'"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vercel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
needs: deploy
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
Expand Down
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.16.0
v18.17.0
5 changes: 4 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import remarkGfm from "remark-gfm";

const config = {
stories: [
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
],

addons: [
"@storybook/addon-essentials",
"@storybook/addon-a11y",
Expand All @@ -30,6 +30,9 @@ const config = {
...config,
STORYBOOK_RUN: true,
}),
docs: {
autodocs: false
}
};

export default config;
1 change: 0 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const decorators = [
];

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down
22 changes: 11 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
## [2.97.9](https://github.com/EddieHubCommunity/BioDrop/compare/v2.97.8...v2.97.9) (2024-01-07)
## [2.101.1](https://github.com/EddieHubCommunity/BioDrop/compare/v2.101.0...v2.101.1) (2024-05-13)


### Bug Fixes

* version description in bug template ([#9947](https://github.com/EddieHubCommunity/BioDrop/issues/9947))([#9946](https://github.com/EddieHubCommunity/BioDrop/issues/9946)) ([5083539](https://github.com/EddieHubCommunity/BioDrop/commit/5083539cf6820b852104b41e43be59e1eca2a9d1))
* remove create profile button ([#10375](https://github.com/EddieHubCommunity/BioDrop/issues/10375)) ([e0e90a7](https://github.com/EddieHubCommunity/BioDrop/commit/e0e90a7ced6901c68dd063ed1d656dc5b6233d84))



## [2.97.8](https://github.com/EddieHubCommunity/BioDrop/compare/v2.97.7...v2.97.8) (2024-01-05)
# [2.101.0](https://github.com/EddieHubCommunity/BioDrop/compare/v2.100.4...v2.101.0) (2024-05-13)


### Bug Fixes
### Features

* mongoose validate error and upgrade ([#10102](https://github.com/EddieHubCommunity/BioDrop/issues/10102)) ([052f076](https://github.com/EddieHubCommunity/BioDrop/commit/052f0765369dd86dfe25e1461d506e73540d1fea))
* premium plan for all ([#10361](https://github.com/EddieHubCommunity/BioDrop/issues/10361)) ([bb4383d](https://github.com/EddieHubCommunity/BioDrop/commit/bb4383dbebe033e7b87f89799c4127cffee98d56))



## [2.97.7](https://github.com/EddieHubCommunity/BioDrop/compare/v2.97.6...v2.97.7) (2024-01-04)
## [2.100.4](https://github.com/EddieHubCommunity/BioDrop/compare/v2.100.3...v2.100.4) (2024-05-06)


### Bug Fixes

* rolled back mongoose version ([#10097](https://github.com/EddieHubCommunity/BioDrop/issues/10097)) ([8b13530](https://github.com/EddieHubCommunity/BioDrop/commit/8b13530294083b1578fba769436c20efa303c6cc))
* archive website message about db deletion ([#10369](https://github.com/EddieHubCommunity/BioDrop/issues/10369)) ([57badca](https://github.com/EddieHubCommunity/BioDrop/commit/57badcab79555f2d6bbd7d8f977b958a6acb3241))



## [2.97.6](https://github.com/EddieHubCommunity/BioDrop/compare/v2.97.5...v2.97.6) (2023-12-30)
## [2.100.3](https://github.com/EddieHubCommunity/BioDrop/compare/v2.100.2...v2.100.3) (2024-05-05)


### Bug Fixes

* alert info for dark mode ([#9902](https://github.com/EddieHubCommunity/BioDrop/issues/9902)) ([2e1ce65](https://github.com/EddieHubCommunity/BioDrop/commit/2e1ce6545f64e1b6ad7c1208715c540644d2f0d9))
* archive alert message ([#10366](https://github.com/EddieHubCommunity/BioDrop/issues/10366)) ([8f52efc](https://github.com/EddieHubCommunity/BioDrop/commit/8f52efc97943ccb5796604726a0b71b1520f156c))



## [2.97.5](https://github.com/EddieHubCommunity/BioDrop/compare/v2.97.4...v2.97.5) (2023-12-30)
## [2.100.2](https://github.com/EddieHubCommunity/BioDrop/compare/v2.100.1...v2.100.2) (2024-03-25)


### Bug Fixes

* update action dependencies ([#10053](https://github.com/EddieHubCommunity/BioDrop/issues/10053)) ([aa1149b](https://github.com/EddieHubCommunity/BioDrop/commit/aa1149b91b07f3b81e6a7c424f0bee908a1678e2))
* revert husky to regular dependency ([#10310](https://github.com/EddieHubCommunity/BioDrop/issues/10310)) ([cccd62f](https://github.com/EddieHubCommunity/BioDrop/commit/cccd62f39b721b529aa9f626b07859cd53461fc4))



2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ representative at an online or offline event.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported (this can be done anonymously) to the Project Maintainers responsible for enforcement at http://eddiejaoude.io/contact.
reported (this can be done anonymously) to the Project Maintainers responsible for enforcement at http://eddiejaoude.io.
All complaints will be reviewed and investigated promptly and fairly.

All Project Maintainers are obligated to respect the privacy and security of the
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 - 2023 Eddie Jaoude
Copyright (c) 2021 - 2024 Eddie Jaoude

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
> [!IMPORTANT]
> From **10 June 2024** BioDrop will be archived. What does this mean?
>
> ### Profile
> You will not be able to use your Profile from 10 June so remember to stop using your BioDrop url before then
> You will not be able to access your Dashboard (meaning you will not be able to see any Stats or make changes to your Profile)
> All database data will be deleted
>
> ### GitHub Repo
>
> No Issues or PRs can be raised
>
> If you have an existing Issue or PR assigned to you this will not be reviewed/merged
> A big thank you to our users and contributors, without which this project would not have been possible.
[![RepoRater](https://repo-rater.eddiehub.io/api/badge?owner=EddieHubCommunity&name=BioDrop)](https://repo-rater.eddiehub.io/rate?owner=EddieHubCommunity&name=BioDrop)
[![Open in Gitpod](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/EddieHubCommunity/BioDrop)
![Uptime](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FEddieHubCommunity%2Fmonitoring%2Fmaster%2Fapi%2Fbio-drop-biodrop-io%2Fuptime.json)
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- Please do not create GitHub issues to report security vulnerabilities.
- Instead, report them via <http://eddiejaoude.io/contact>.
- Instead, report them via <http://eddiejaoude.io>.
60 changes: 60 additions & 0 deletions components/GroupLinkSearch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { useState } from "react";
import { Combobox } from "@headlessui/react";
import Label from "./form/Label";

function GroupLinkSearch({ selectedGroup, handleGroupSelection, groups }) {
const [query, setQuery] = useState("");

const handleGroupChange = (e) => {
setQuery(e.target.value);
const currentValue = e.target.value;
if (!groups.includes(currentValue)) {
handleGroupSelection(currentValue);
}
};

const filteredGroup =
query === ""
? groups.length > 0 && groups.slice(0, 5)
: groups.length > 0 &&
groups
.filter((group) => {
return group.toLowerCase().includes(query.toLowerCase());
})
.slice(0, 5);

return (
<Combobox value={selectedGroup} onChange={handleGroupSelection}>
<Label htmlFor="search-groups">Group</Label>
<Combobox.Input
name="search-group"
onChange={handleGroupChange}
className={
"border-2 transition-all duration-250 ease-linear rounded px-6 py-2 mb-2 block w-full dark:bg-primary-high hover:border-tertiary-medium focus:ring-0 focus:border-tertiary-medium focus:outline-0"
}
/>
<Combobox.Options
className={
"absolute z-10 w-full border-2 rounded border-tertiary-medium dark:bg-primary-medium"
}
>
{filteredGroup.length > 0 &&
filteredGroup.map((group) => {
return (
<Combobox.Option
key={group}
value={group}
className={
"px-3 py-2 flex items-center bg-white dark:bg-primary-medium dark:hover:bg-tertiary-medium/60 hover:bg-secondary-low/100"
}
>
{group !== "" && <span>{group}</span>}
</Combobox.Option>
);
})}
</Combobox.Options>
</Combobox>
);
}

export default GroupLinkSearch;
10 changes: 8 additions & 2 deletions components/IconSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,21 @@ function IconSearch({ selectedIcon, handleSelectedIcon }) {
className={`border-2 transition-all duration-250 ease-linear rounded px-6 py-2 mb-2 block w-full dark:bg-primary-high hover:border-tertiary-medium focus:ring-0 focus:border-tertiary-medium focus:outline-0`}
/>
<Combobox.Options
className={`border-2 rounded border-tertiary-medium dark:bg-primary-medium`}
className={`absolute z-10 w-full border-2 rounded border-tertiary-medium dark:bg-primary-medium`}
>
{filteredIcon.map((icon) => {
const Icon = getIcon(icon);
return (
<Combobox.Option
key={icon}
value={icon}
className={`px-3 py-2 flex items-center dark:hover:bg-tertiary-medium/60 hover:bg-secondary-low/40`}
className={({ active }) =>
`px-3 py-2 flex items-center ${
active
? "bg-red-400"
: "dark:hover:bg-tertiary-medium/60 hover:bg-secondary-low/100"
}`
}
>
<Icon className="h-5 w-5 mr-2 fill-grey-700 inline align-center justify-center" />{" "}
<span>{icon}</span>
Expand Down
7 changes: 4 additions & 3 deletions components/Tabs.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import Select from "@components/form/Select";
import { classNames } from "@services/utils/classNames";

export default function Tabs({ tabs, setTabs, selectedTab }) {
export default function Tabs({ tabs, setTabs, selectedTab, placeholder }) {
return (
<div>
<div className="sm:hidden">
<div className="lg:hidden">
{tabs.length > 1 && (
<Select
name="tabs"
value={selectedTab?.name}
placeholder={placeholder}
onChange={(e) =>
setTabs(tabs.find((tab) => tab.name === e.currentTarget.value))
}
Expand All @@ -17,7 +18,7 @@ export default function Tabs({ tabs, setTabs, selectedTab }) {
/>
)}
</div>
<div className="hidden sm:block mb-4">
<div className="hidden lg:block mb-4">
<div className="border-b border-primary-medium-low">
<nav className="-mb-px flex" aria-label="Tabs">
{tabs.map((tab) => (
Expand Down
4 changes: 2 additions & 2 deletions components/account/manage/Edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export default function Edit({ href, label = "", children }) {
<a
href={href}
aria-label={`Edit ${label}`}
className="rounded-full bg-secondary-medium p-2 text-white shadow-sm hover:bg-tertiary-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary-medium absolute top-0 left-0 pointer z-10"
className="rounded-full bg-secondary-medium p-2 mt-1 text-white shadow-sm hover:bg-tertiary-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary-medium absolute top-0 left-0 pointer z-10"
>
<PencilIcon className="h-5 w-5" aria-hidden="true" />
<PencilIcon className="h-4 w-4" aria-hidden="true" />
</a>
{children}
</div>
Expand Down
8 changes: 4 additions & 4 deletions components/event/EventTabs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Link from "@components/Link";
import Select from "@components/form/Select";
import { classNames } from "@services/utils/classNames";
export function EventTabs({ tabs, eventType, setEventType }) {
export function EventTabs({ tabs, eventType, onEventTypeChange }) {
const changeTab = (e, value) => {
e.preventDefault();
setEventType(value);
onEventTypeChange(value);
if (!value) {
setEventType(tabs.find((tab) => tab.title === e.target.value).key);
onEventTypeChange(tabs.find((tab) => tab.title === e.target.value).key);
}
};

Expand All @@ -18,7 +18,7 @@ export function EventTabs({ tabs, eventType, setEventType }) {
label="Select a tab"
value={tabs.find((tab) => tab.key === eventType)?.title}
onChange={(e) => changeTab(e)}
className="block w-full rounded-md border-primary-medium-low dark:bg-primary-medium dark:focus:border-secondary-low dark:focus:ring-secondary-low focus:border-secondary-low focus:ring-secondary-low"
className="mb-2 block w-full rounded-md border-primary-medium-low px-3 py-1 focus:border-secondary-low focus:ring-secondary-low dark:bg-primary-medium dark:focus:border-secondary-low dark:focus:ring-secondary-low"
options={tabs.map((tab) => ({ label: tab.title, value: tab.title }))}
/>
</div>
Expand Down
8 changes: 7 additions & 1 deletion components/form/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import { classNames } from "@services/utils/classNames";
import Label from "./Label";

export default function Select({
value,
value = "",
onChange,
options = [],
label,
name,
className,
placeholder,
...restProps
}) {
return (
Expand All @@ -27,6 +28,11 @@ export default function Select({
)}
{...restProps}
>
{placeholder && (
<option value="" disabled>
{placeholder}
</option>
)}
{options.map((option) => (
<option
className="checked:text-secondary-high checked:font-bold dark:checked:text-secondary-low-high"
Expand Down
Loading

0 comments on commit 335518c

Please sign in to comment.