Skip to content

Commit

Permalink
Release (#1327)
Browse files Browse the repository at this point in the history
* chore(deps-dev): Bump @babel/eslint-parser from 7.24.7 to 7.25.9 (#1322)

Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.24.7 to 7.25.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.9/eslint/babel-eslint-parser)

---
updated-dependencies:
- dependency-name: "@babel/eslint-parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump cookie and express (#1321)

Bumps [cookie](https://github.com/jshttp/cookie) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](jshttp/cookie@v0.6.0...v0.7.1)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](expressjs/express@4.21.0...4.21.1)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* style: Misc fixes (#1318)

* chore(deps): Bump re-resizable from 6.9.17 to 6.10.0 (#1313)

Bumps [re-resizable](https://github.com/bokuweb/react-resizable-box) from 6.9.17 to 6.10.0.
- [Release notes](https://github.com/bokuweb/react-resizable-box/releases)
- [Changelog](https://github.com/bokuweb/re-resizable/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bokuweb/react-resizable-box/commits/6.10.0)

---
updated-dependencies:
- dependency-name: re-resizable
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): Bump mini-css-extract-plugin from 2.7.2 to 2.9.1 (#1310)

Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 2.7.2 to 2.9.1.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](webpack-contrib/mini-css-extract-plugin@v2.7.2...v2.9.1)

---
updated-dependencies:
- dependency-name: mini-css-extract-plugin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: Change video visibility (#1325)

* chore(deps-dev): Bump @babel/preset-react from 7.18.6 to 7.25.9 (#1330)

Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.18.6 to 7.25.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.9/packages/babel-preset-react)

---
updated-dependencies:
- dependency-name: "@babel/preset-react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): Bump cypress from 13.6.2 to 13.15.2 (#1329)

Bumps [cypress](https://github.com/cypress-io/cypress) from 13.6.2 to 13.15.2.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](cypress-io/cypress@v13.6.2...v13.15.2)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump @apollo/client from 3.9.4 to 3.11.8 (#1328)

Bumps [@apollo/client](https://github.com/apollographql/apollo-client) from 3.9.4 to 3.11.8.
- [Release notes](https://github.com/apollographql/apollo-client/releases)
- [Changelog](https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md)
- [Commits](apollographql/apollo-client@v3.9.4...v3.11.8)

---
updated-dependencies:
- dependency-name: "@apollo/client"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
Betree and dependabot[bot] authored Nov 9, 2024
1 parent 5fcb6b6 commit f28eb74
Show file tree
Hide file tree
Showing 6 changed files with 588 additions and 619 deletions.
8 changes: 7 additions & 1 deletion app/components/StyledUtils/Title.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from 'styled-components'
import { fontSize, space, style, themeGet } from 'styled-system'
import { fontSize, fontWeight, space, style, themeGet } from 'styled-system'

export const textTransform = style({
prop: 'textTransform',
Expand All @@ -11,6 +11,7 @@ export const StyledH1 = styled.h1`
${fontSize}
${space}
${textTransform}
${fontWeight}
`

export const StyledH2 = styled.h2`
Expand All @@ -19,6 +20,7 @@ export const StyledH2 = styled.h2`
${fontSize}
${space}
${textTransform}
${fontWeight}
`

export const StyledH3 = styled.h3`
Expand All @@ -27,6 +29,7 @@ export const StyledH3 = styled.h3`
${fontSize}
${space}
${textTransform}
${fontWeight}
`

export const StyledH4 = styled.h4`
Expand All @@ -35,6 +38,7 @@ export const StyledH4 = styled.h4`
${fontSize}
${space}
${textTransform}
${fontWeight}
`

export const StyledH5 = styled.h5`
Expand All @@ -43,6 +47,7 @@ export const StyledH5 = styled.h5`
${fontSize}
${space}
${textTransform}
${fontWeight}
`

export const StyledH6 = styled.h6`
Expand All @@ -51,4 +56,5 @@ export const StyledH6 = styled.h6`
${fontSize}
${space}
${textTransform}
${fontWeight}
`
5 changes: 4 additions & 1 deletion app/components/UsersActions/ActionDiff.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ class ActionDiff extends PureComponent {
formatChangeValue(value, key) {
if (key === 'speaker_id' && value) {
return <Link to={speakerURL(value)}>#{value}</Link>
} else if (key === 'is_draft' && !value) {
} else if (['is_draft', 'unlisted'].includes(key) && !value) {
return 'No'
} else if (typeof value === 'boolean') {
return value ? 'Yes' : 'No'
}

return value
}

Expand Down
134 changes: 98 additions & 36 deletions app/components/Videos/EditVideoModal.jsx
Original file line number Diff line number Diff line change
@@ -1,68 +1,130 @@
import { Mutation } from '@apollo/client/react/components'
import { Flex } from '@rebass/grid'
import { Formik } from 'formik'
import gql from 'graphql-tag'
import React from 'react'
import { withNamespaces } from 'react-i18next'
import { connect } from 'react-redux'
import Select from 'react-select'
import { Edit } from 'styled-icons/fa-regular'

import { flashErrorMsg, flashSuccessMsg } from '../../state/flashes/reducer'
import { popModal } from '../../state/modals/reducer'
import { shiftStatements } from '../../state/video_debate/effects'
import FieldWithButton from '../FormUtils/FieldWithButton'
import StyledLabel from '../FormUtils/StyledLabel'
import Modal from '../Modal/Modal'
import { StyledH3 } from '../StyledUtils/Title'

const editVideoMutation = gql`
mutation editVideo($id: ID!, $unlisted: Boolean) {
editVideo(id: $id, unlisted: $unlisted) {
id
unlisted
}
}
`

class EditVideoModal extends React.PureComponent {
renderTitle() {
return (
<span>
<div className="is-flex gap-2">
<Edit size="1em" /> {this.props.t('video.edit')}
</span>
</div>
)
}

render() {
const { t, popModal, video } = this.props
const unlistedOptions = [
{ value: true, label: t('main:videos.unlisted') },
{ value: false, label: t('main:videos.public') },
]

return (
<Modal handleCloseClick={popModal} title={this.renderTitle()}>
<Flex flexDirection="column">
<StyledH3>{t('video.shiftStatements')}</StyledH3>
<Formik
initialValues={{ youtube_offset: video.youtube_offset }}
onSubmit={async (values, { setSubmitting }) => {
setSubmitting(true)
const reply = await this.props.shiftStatements(values)
setSubmitting(false)
this.props.popModal()
return reply
}}
>
{({ handleSubmit, isSubmitting, values, handleChange }) => (
<form onSubmit={handleSubmit}>
<Flex>
<StyledLabel fontSize={3} mr={3}>
Youtube
</StyledLabel>
<FieldWithButton
type="number"
input={{
name: 'youtube_offset',
max: '10000000',
value: values.youtube_offset,
onChange: handleChange,
}}
meta={{ submitting: isSubmitting }}
placeholder="+0s"
buttonLabel={t('main:actions.apply')}
buttonClickHandler={handleSubmit}
/>
</Flex>
</form>
<StyledH3 mb={2} fontSize="15px" fontWeight="700">
Change visibility
</StyledH3>
<Mutation mutation={editVideoMutation}>
{(editVideo) => (
<Formik
initialValues={{ unlisted: video.unlisted }}
enableReinitialize
onSubmit={async (values) => {
try {
await editVideo({
variables: { id: video.id, unlisted: values.unlisted },
})
this.props.flashSuccessMsg('Visibility changed')
window.location.reload()
} catch (e) {
console.error(e) // eslint-disable-line no-console
this.props.flashErrorMsg('Failed to change visibility')
}
}}
>
{({ handleSubmit, isSubmitting, setFieldValue, values }) => (
<form onSubmit={handleSubmit}>
<Select
className="speaker-select"
placeholder="Select visibility"
menuPortalTarget={document.body}
styles={{ menuPortal: (base) => ({ ...base, zIndex: 99999 }) }}
options={unlistedOptions}
value={unlistedOptions.find((option) => option.value === values.unlisted)}
name="unlisted"
isLoading={isSubmitting}
disabled={isSubmitting}
onChange={({ value }) => {
setFieldValue('unlisted', value)
handleSubmit()
}}
/>
</form>
)}
</Formik>
)}
</Formik>
</Mutation>
</Flex>
{video['youtube_id'] && (
<React.Fragment>
<hr />
<Flex flexDirection="column">
<StyledH3 mb={2} fontSize="15px" fontWeight="700">
{t('video.shiftStatements')}
</StyledH3>
<Formik
initialValues={{ youtube_offset: video.youtube_offset }}
onSubmit={async (values, { setSubmitting }) => {
setSubmitting(true)
const reply = await this.props.shiftStatements(values)
setSubmitting(false)
this.props.popModal()
return reply
}}
>
{({ handleSubmit, isSubmitting, values, handleChange }) => (
<form onSubmit={handleSubmit}>
<FieldWithButton
type="number"
input={{
name: 'youtube_offset',
max: '10000000',
value: values.youtube_offset,
onChange: handleChange,
}}
meta={{ submitting: isSubmitting }}
placeholder="+0s"
buttonLabel="Shift"
buttonClickHandler={handleSubmit}
/>
</form>
)}
</Formik>
</Flex>
</React.Fragment>
)}
</Modal>
)
}
Expand Down
4 changes: 2 additions & 2 deletions app/styles/_components/VideoDebate/comments/comment.sass
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
.score
text-align: center
font-size: 0.9em
height: 1.1em
min-height: 1.1em
.round-spinner
animation: spinAround 400ms infinite linear, fadeIn 500ms
margin-left: 3px
Expand Down Expand Up @@ -132,4 +132,4 @@
color: lighten($red, 30)
cursor: help
.fa
font-size: 1.4em !important
font-size: 1.4em !important
Loading

0 comments on commit f28eb74

Please sign in to comment.