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

Merge Develop onto Main #1189

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
54 changes: 33 additions & 21 deletions .github/workflows/community-issue-comment.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,62 @@
# This workflow handles issue comments.
# See for more info: https://github.com/actions/github-script
# -----------------------------------------------------------------------------
# GitHub Actions Workflow: Issue Comments
# Description: Post issue comments
# Jobs:
# - Assigned comment
# - Stale label comment
# -----------------------------------------------------------------------------

name: Issue Comments
name: Issue Comment Workflows

on:
workflow_run:
workflows: ["Label Stale Contributions"]
types:
- completed
issues:
types:
- assigned
- labeled

jobs:
# When issues are assigned, a comment is posted
# Tags the assignee with links to helpful resources
# Job: Assigned issue comment
# Trigger: Issues are assigned
# Returns: Posts comment tagging assignee and helpful message
assigned-comment:
if: github.event.action == 'assigned'
runs-on: ubuntu-latest
steps:
- name: Post assignee issue comment
id: assigned-comment
uses: actions/github-script@v7
uses: actions/github-script@v7 # https://github.com/actions/github-script
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
body: `Thank you @${context.payload.issue.assignee.login} you have been assigned this issue!
**Please follow the directions in our [Contributing Guide](https://github.com/chaynHQ/.github/blob/main/docs/CONTRIBUTING.md). We look forward to reviewing your pull request. ✨**
---
Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you!
Learn more about Chayn and our impact [here](https://github.com/chaynHQ/.github/blob/main/profile/README.md). 🌸`
})
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
body: `Thank you @${context.payload.issue.assignee.login} you have been assigned this issue!
**Please follow the directions in our [Contributing Guide](https://github.com/chaynHQ/.github/blob/main/docs/CONTRIBUTING.md). We look forward to reviewing your pull request. ✨**

---

Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you!
Learn more about Chayn's impact [here](https://github.com/chaynHQ/.github/blob/main/profile/README.md). 🌸`
})

# When issues are labeled as stale, a comment is posted.
# Tags the assignee with warning.
# Enables manual issue management in addition to community-stale-management.yml
# Job: Stale label comment
# Triggers:
# Labeled as stale by maintainer
# 'Label Stale Contributions' workflow runs
# Returns: Posts warning comment tagging assignee
stale-label-comment:
if: github.event.action == 'labeled' && github.event.label.name == 'stale'
runs-on: ubuntu-latest
steps:
- name: Post stale issue comment
id: stale-label-comment
uses: actions/github-script@v7
uses: actions/github-script@v7 # https://github.com/actions/github-script
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/community-pr-labeler.yml

This file was deleted.

33 changes: 18 additions & 15 deletions .github/workflows/community-stale-management.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,47 @@
# This workflow labels stale issues and PRs after 30 days of inactivity.
# Stale PRs are closed after 1 week of inactivity after labeled stale.
# See for more info: https://github.com/actions/stale
# -----------------------------------------------------------------------------
# GitHub Actions Workflow: Label Stale Contributions
# Description: Labels stale contributions
# Job: actions/stale
# -----------------------------------------------------------------------------

name: Mark Stale Contributions
name: Label Stale Contributions

on:
# Enable manual run from the Actions tab so workflow can be run at any time
workflow_dispatch:
workflow_dispatch: # enables manual trigger
# Scheduled to run at 12:00 on every Monday
schedule:
- cron: '0 0 * * MON'
- cron: "0 0 * * MON"

jobs:
# Trigger: Scheduled weekly
# Returns: labels issues and PRs with 'stale' after 30 days inactivity
# PRs: automated closing after 1 more week of inactivity
# Issues: requires manual closing by maintainers
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v9
- uses: actions/stale@v9 # https://github.com/actions/stale
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: 'stale'
stale-pr-label: 'stale'
stale-issue-label: "stale"
stale-pr-label: "stale"
days-before-stale: 30
# disables closing issues
days-before-issue-close: -1
days-before-pr-close: 7
# only scan assigned issues
include-only-assigned: true
# ignore issues assigned to staff and bots
exempt-assignees: 'kyleecodes, swetha-charles, eleanorreem, annarhughes, tarebyte, dependabot[bot], dependabot, github-actions[bot], github-actions'
exempt-assignees: "kyleecodes, swetha-charles, eleanorreem, annarhughes, tarebyte, dependabot[bot], dependabot, github-actions[bot], github-actions"
# disable removing stale label due to irrelevant activity (like branch updates)
remove-stale-when-updated: false
# exempt dependabot prs from going stale
exempt-pr-labels: dependencies
# disable counting irrelevant activity (branch updates) towards day counter on prs.
ignore-pr-updates: true
# messages skipped, instead handled by issue-comment.yml
stale-pr-message: ''
close-pr-message: ''
stale-issue-message: ''
# actions/stale does not enable tagging authors / assignees, so comments are handled by Issue Comments Workflows.
stale-pr-message: "As per Chayn policy, after 30 days of inactivity, we will close this PR in 7 days. Please comment or update to keep open."
26 changes: 26 additions & 0 deletions components/head/DefaultHeadMetadata.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { useTranslations } from 'next-intl';
import Head from 'next/head';
import theme from '../../styles/theme';

const DefaultHeadMetadata = () => {
const t = useTranslations('Shared.metadata');

return (
<Head>
<meta name="viewport" content="initial-scale=1, width=device-width" />
<meta property="og:title" content={t('title')} key="og-title" />
<meta property="og:description" content={t('description')} key="og-description" />
<meta property="og:image" content="/preview.png" key="og-image" />
<meta property="og:image:alt" content={t('imageAlt')} key="og-image-alt" />
<meta name="twitter:card" content="summary_large_image" key="twitter-card" />
<meta name="twitter:site" content="@ChaynHQ" />
<meta name="twitter:creator" content="@ChaynHQ" />
{/** PWA specific tags **/}
<link rel="manifest" href="/manifest.json" />
<link rel="apple-touch-icon" href="/icons/apple/icon-120x120.png"></link>
<meta name="theme-color" content={theme.palette.primary.main} />
</Head>
);
};

export default DefaultHeadMetadata;
27 changes: 0 additions & 27 deletions components/head/OpenGraphMetadata.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions components/session/MultipleBonusContent.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import LinkIcon from '@mui/icons-material/Link';
import { ISbRichtext } from '@storyblok/react';
import { render } from 'storyblok-rich-text-react-renderer';
import SessionDetail from '../../pages/courses/image-based-abuse-and-rebuilding-ourselves/[sessionSlug]';
import { EventUserData } from '../../utils/logEvent';
import { RichTextOptions } from '../../utils/richText';
import SessionContentCard from '../cards/SessionContentCard';
import { Dots } from '../common/Dots';

/**
* This React component is used to render storyblok component "Bonus Block".
* This is currently used in the following session page: {@link SessionDetail}
*/

export type BonusContent = {
_uid: string;
title: string;
Expand Down
63 changes: 63 additions & 0 deletions components/session/SessionChat.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import ChatBubbleOutlineIcon from '@mui/icons-material/ChatBubbleOutline';
import { Box, Button, Typography } from '@mui/material';
import { useTranslations } from 'next-intl';
import SessionContentCard from '../cards/SessionContentCard';
import { Dots } from '../common/Dots';
import Link from '../common/Link';
import Video from '../video/Video';
import { EventData } from './SessionVideo';

const chatDetailIntroStyle = { marginTop: 3, marginBottom: 1.5 } as const;

export interface SessionChatProps {
eventData: EventData;
}

export const SessionChat = (props: SessionChatProps) => {
const { eventData } = props;
const t = useTranslations('Courses');

return (
<>
<Dots />
<SessionContentCard
title={t('sessionDetail.chat.title')}
titleIcon={ChatBubbleOutlineIcon}
titleIconSize={24}
eventPrefix="SESSION_CHAT"
eventData={eventData}
>
<Typography paragraph>{t('sessionDetail.chat.description')}</Typography>
<Typography paragraph>{t('sessionDetail.chat.videoIntro')}</Typography>
<Video
eventPrefix="SESSION_CHAT_VIDEO"
eventData={eventData}
url={t('sessionDetail.chat.videoLink')}
containerStyles={{ mx: 'auto', my: 2 }}
></Video>
<Box sx={chatDetailIntroStyle}>
<Typography>{t('sessionDetail.chat.detailIntro')}</Typography>
</Box>
<Box>
<ul>
<li>{t('sessionDetail.chat.detailPrivacy')}</li>
<li>{t('sessionDetail.chat.detailTimezone')}</li>
<li>{t('sessionDetail.chat.detailLanguage')}</li>
<li>{t('sessionDetail.chat.detailLegal')}</li>
<li>{t('sessionDetail.chat.detailImmediateHelp')}</li>
</ul>
</Box>
<Box sx={{ display: 'flex', justifyContent: 'center', mt: 3 }}>
<Button
variant="contained"
href="/messaging"
component={Link}
startIcon={<ChatBubbleOutlineIcon color="error" />}
>
{t('sessionDetail.chat.startButton')}
</Button>
</Box>
</SessionContentCard>
</>
);
};
Loading
Loading