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

Move ranking information from separate /rank page to ClubEditPage modal #741

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
55 changes: 54 additions & 1 deletion frontend/components/ClubEditPage/ClubEditCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ import {
SITE_ID,
SITE_NAME,
} from '../../utils/branding'
import { ModalContent } from '../ClubPage/Actions'
import { LiveBanner, LiveSub, LiveTitle } from '../ClubPage/LiveEventsDialog'
import { Checkbox, CheckboxLabel, Contact, Text } from '../common'
import { Checkbox, CheckboxLabel, Contact, Modal, Text } from '../common'
import {
CheckboxField,
CheckboxTextField,
Expand Down Expand Up @@ -189,6 +190,7 @@ export default function ClubEditCard({
isEdit,
onSubmit = () => Promise.resolve(undefined),
}: ClubEditCardProps): ReactElement {
const [showRankModal, setShowRankModal] = useState<boolean>(false)
const [showTargetFields, setShowTargetFields] = useState<boolean>(
!!(
club.target_majors?.length ||
Expand Down Expand Up @@ -397,6 +399,57 @@ export default function ClubEditCard({
{
name: 'General',
type: 'group',
description: (
<div className="mb-4">
<a onClick={() => setShowRankModal(true)} className="is-italic">
How can filling out this information help your club's ranking?
julianweng marked this conversation as resolved.
Show resolved Hide resolved
</a>
<Modal
show={showRankModal}
closeModal={() => setShowRankModal(false)}
marginBottom={false}
width="80%"
>
<ModalContent className="content mb-4">
<h2>Rank Algorithm</h2>
julianweng marked this conversation as resolved.
Show resolved Hide resolved
<h5>
The following positively affects your club's ranking in homepage
search results:
</h5>
<ul>
<li>
Upcoming events with filled out name, description, and image
</li>
<li>Upcoming, open applications for membership</li>
<li>
Having at least 3 active officers, plus a bonus for any
additional non-officer member on the platform
</li>
<li>
Having between 3 and 7 useful tags (please email <Contact />{' '}
if none apply)
</li>
<li>
Posting a public (non-personal) contact email and 2 or more
social links
</li>
<li>
Having a club logo image uploaded and subtitle filled out
</li>
<li>
Filling out a club mission with images and detail (rewarded up
to 1000 words)
</li>
<li>Displaying 3 or more student testimonials (experiences)</li>
<li>Filling out the {FIELD_PARTICIPATION_LABEL} section</li>
<li>
Updating the club listing recently (within the last 8 months)
</li>
</ul>
</ModalContent>
</Modal>
</div>
),
fields: [
{
name: 'name',
Expand Down
Loading
Loading