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

自分の質問一覧を見るページを追加します #482

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
195 changes: 193 additions & 2 deletions schemas/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,76 @@ paths:
description: Invalid params supplied
'404':
description: Track not found
/api/v1/streamings:
get:
parameters:
- name: eventAbbr
in: query
description: abbr of event (e.g. cndt2020)
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Streaming'
'400':
description: Invalid [eventAbbr] supplied
'404':
description: Event not found
/api/v1/speakers:
get:
tags:
- Speaker
parameters:
- name: eventAbbr
in: query
description: abbr of event (e.g. cndt2020)
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Speaker'
'400':
description: Invalid [eventAbbr] supplied
'404':
description: Event not found
/api/v1/proposals:
get:
tags:
- Proposal
parameters:
- name: eventAbbr
in: query
description: abbr of event (e.g. cndt2020)
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Proposal'
'400':
description: Invalid [eventAbbr] supplied
'404':
description: Event not found
/api/v1/talks:
get:
tags:
Expand Down Expand Up @@ -258,7 +328,7 @@ paths:
- name: roomId
in: query
description: ID of chat room
required: true
required: false
schema:
type: string
- name: roomType
Expand All @@ -274,6 +344,12 @@ paths:
schema:
type: string
format: date-time
- name: profileId
in: query
description: ID of profile
required: false
schema:
type: string
responses:
'200':
description: OK
Expand Down Expand Up @@ -994,7 +1070,7 @@ components:
theme: "ともに踏み出すCloudNative祭"
about: "『クラウドネイティブ』って何だっけ? 私たち自身ずっと考えてきました。"
privacy_policy: "プライバシーポリシーだよ"
privacy_policy_for_speaker: "スピーカー向けのポリシーだよ"
privacy_policy_for_speaker: "登壇者向けのポリシーだよ"
copyright: "CloudNative Days Committee"
coc: "CoCだよ"
required:
Expand Down Expand Up @@ -1037,6 +1113,66 @@ components:
required:
- id
- name
Streaming:
type: object
additionalProperties: false
properties:
id:
type: string
status:
type: string
trackId:
type: number
destinationUrl:
type: string
playbackUrl:
type: string
mediaLiveChannelStatus:
type: string
Speaker:
type: object
additionalProperties: false
properties:
id:
type: number
name:
type: string
company:
type: string
nullable: true
jobTitle:
type: string
profile:
type: string
githubId:
type: string
nullable: true
twitterId:
type: string
nullable: true
avatarUrl:
type: string
nullable: true
example:
- id: 1
name: "めちゃすごい人"
company: "Hoge Inc."
jobTitle: "Super Engineer"
profile: "This is profile"
githubId: "3aae1aa4-563b-4a8a-9116-7ef1f2b1b08c"
twitterId: "4639289c-b3fe-4049-8f25-58c2899c1286"
avatarUrl: "https://avatars.githubusercontent.com/u/107187?v=4" # r_takaishi's avatar of GitHub
- id: 2
name: "やんごとない人"
company: "Foo Inc."
jobTitle: "Great Engineer"
profile: "プロフィール"
githubId: "b677b66a-917e-4acb-b6ac-b7a09511e103"
twitterId: "87b72a9a-257f-4680-ab72-5edb4348124e"
avatarUrl: "https://avatars.githubusercontent.com/u/44778132?s=200&v=4" # cloudnativedaysjp's avatar of GitHub
required:
- id
- name
Talk:
type: object
additionalProperties: false
Expand Down Expand Up @@ -1104,6 +1240,12 @@ components:
nullable: true
slotNum:
type: number
allowShowingVideo:
type: boolean
offlineParticipationCount:
type: number
onlineParticipationCount:
type: number
example:
- id: 1
trackId: 2
Expand All @@ -1129,6 +1271,7 @@ components:
actualEndTime: "Sat, 23 Jan 2021 09:20:00 GMT"
presentationMethod: '現地登壇'
slotNum: 1
allowShowingVideo: true
- id: 2
trackId: 2
videoPlatform: "vimeo"
Expand All @@ -1153,6 +1296,7 @@ components:
actualEndTime: "Sat, 23 Jan 2021 09:20:00 GMT"
presentationMethod: 'オンライン登壇'
slotNum: 1
allowShowingVideo: false
required:
- id
- trackId
Expand All @@ -1167,6 +1311,53 @@ components:
- talkDuration
- talkDifficulty
- talkCategory
- offlineParticipationCount
- onlineParticipationCount
Proposal:
type: object
additionalProperties: false
properties:
id:
type: number
status:
type: string
conferenceId:
type: number
talkId:
type: number
title:
type: string
abstract:
type: string
speakers:
type: array
items:
type: object
properties:
name:
type: string
id:
type: number
params:
type: object
required:
- id
- status
- conferenceId
- talkId
example:
- id: 1
status: "accepted"
conferenceId: 1
talkId: 1
- id: 2
status: "rejected"
conferenceId: 1
talkId: 2
- id: 3
status: "registered"
conferenceId: 1
talkId: 3
ChatMessage:
type: object
additionalProperties: false
Expand Down
6 changes: 4 additions & 2 deletions src/components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ setupDayjs()
type Props = {
event: Event
talk?: Talk
defaultTab: string
}

type MessageType = Exclude<ChatMessageProperties['messageType'], undefined>
Expand Down Expand Up @@ -64,6 +65,7 @@ const { useGetApiV1ChatMessagesQuery } = dreamkastApi.injectEndpoints({
roomId: queryArg.roomId,
roomType: queryArg.roomType,
createdFrom: queryArg.createdFrom,
profileId: queryArg.profileId,
},
}),
async onCacheEntryAdded(
Expand Down Expand Up @@ -101,14 +103,14 @@ const { useGetApiV1ChatMessagesQuery } = dreamkastApi.injectEndpoints({
overrideExisting: true,
})

export const Chat: React.FC<Props> = ({ event, talk }) => {
export const Chat: React.FC<Props> = ({ event, talk, defaultTab }) => {
const initialChatMessage = {
eventAbbr: event.abbr,
body: '',
roomId: !!talk ? talk.id : 0,
messageType: 'chat' as MessageType,
}
const [selectedTab, setSelectedTab] = useState('0')
const [selectedTab, setSelectedTab] = useState(defaultTab)
const [messages, setMessages] = useState<ChatMessageMap>(
() => new ChatMessageMap(),
)
Expand Down
6 changes: 6 additions & 0 deletions src/components/Chat/__tests__/Chat.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe('Chat', () => {
const mockProps = {
event: MockEvent(),
talk: MockTalkA1(),
defaultTab: '0',
}

const store = setupStore()
Expand Down Expand Up @@ -90,6 +91,7 @@ describe('Chat', () => {

const mockProps = {
event: MockEvent(),
defaultTab: '0',
}

const store = setupStore()
Expand Down Expand Up @@ -124,6 +126,7 @@ describe('Chat', () => {
const mockProps = {
event: MockEvent(),
talk: MockTalkA1(),
defaultTab: '0',
}

const store = setupStore()
Expand Down Expand Up @@ -163,6 +166,7 @@ describe('Chat', () => {
const mockProps = {
event: MockEvent(),
talk: MockTalkA1(),
defaultTab: '0',
}

const store = setupStore()
Expand Down Expand Up @@ -199,6 +203,7 @@ describe('Chat', () => {
const mockProps = {
event: MockEvent(),
talk: MockTalkA1(),
defaultTab: '0',
}

const store = setupStore()
Expand Down Expand Up @@ -237,6 +242,7 @@ describe('Chat', () => {
const mockProps = {
event: MockEvent(),
talk: MockTalkA1(),
defaultTab: '0',
}

const store = setupStore()
Expand Down
4 changes: 4 additions & 0 deletions src/components/Menu/DesktopMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export const DesktopMenu: React.FC<Props> = ({ event }) => {
<Button style={{ color: '#423A57' }}>Your Schedule</Button>
</Link>

<Link href={`/${event?.abbr}/ui/qa`} rel="noreferrer">
<Button style={{ color: '#423A57' }}>Your QA</Button>
</Link>

{/* TODO: TrailMapを使わない判断がされたら、TrailMap関連の処理を消す */}
{/* {!isPreEvent && <TrailMapButton />} */}

Expand Down
10 changes: 10 additions & 0 deletions src/components/Menu/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import MenuIcon from '@material-ui/icons/Menu'
import ScheduleIcon from '@material-ui/icons/Schedule'
import ViewStreamIcon from '@material-ui/icons/ViewStream'
import SendIcon from '@material-ui/icons/Send'
import ChatIcon from '@material-ui/icons/Chat'
import { Drawer, List, ListItem, ListItemIcon } from '@material-ui/core'
import Link from 'next/link'
import { useMenuContents } from './hooks'
Expand Down Expand Up @@ -74,6 +75,15 @@ export const MobileMenu: React.FC<Props> = ({ event }) => {
</Link>
</ListItem>

<ListItem button key="qa">
<ListItemIcon>
<ChatIcon />
</ListItemIcon>
<Link href={`/${event?.abbr}/ui/qa`} rel="noreferrer">
<Button style={{ color: '#423A57' }}>Your QA</Button>
</Link>
</ListItem>

{!isPreEvent && (
<>
<ListItem button key="guide">
Expand Down
Loading
Loading