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

change-case-to-module #677

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
2 changes: 1 addition & 1 deletion app/decorators/case_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def elements
end

def short_title
kicker.tap { |k| return 'Untitled Case' unless k.present? }
kicker.tap { |k| return 'Untitled Module' unless k.present? }
end

def cover_url(options = { width: 1280, height: 540 })
Expand Down
11 changes: 4 additions & 7 deletions app/javascript/overview/Billboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import type { State, Case, Tag, Viewport } from 'redux/state'

const MapView = asyncComponent(() => import('map_view').then(m => m.default))

function mapStateToProps ({ caseData, edit }: State) {
function mapStateToProps({ caseData, edit }: State) {
const {
baseCoverUrl,
dek,
Expand Down Expand Up @@ -101,7 +101,7 @@ const Billboard = ({
multiline
value={dek}
disabled={!editing}
placeholder="In one concise sentence, provide background and an intriguing twist: get a student to read this case."
placeholder="In one concise sentence, provide background and an intriguing twist: get a student to read this module."
onChange={value => {
updateCase({ dek: value })
}}
Expand All @@ -120,7 +120,7 @@ const Billboard = ({
multiline
value={summary}
disabled={!editing}
placeholder="Summarize the case in a short paragraph."
placeholder="Summarize the module in a short paragraph."
onChange={value => updateCase({ summary: value })}
onEdit={onBeginEditing}
onCancel={onFinishEditing}
Expand Down Expand Up @@ -181,10 +181,7 @@ const Billboard = ({
)

// $FlowFixMe
export default connect(
mapStateToProps,
{ updateCase }
)(Billboard)
export default connect(mapStateToProps, { updateCase })(Billboard)

// $FlowFixMe
export const Container = styled.section.attrs({ className: 'Billboard' })`
Expand Down
11 changes: 5 additions & 6 deletions app/javascript/overview/BillboardTitle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Container as SidebarContainer } from 'elements/Sidebar'

import type { State, CaseDataState, Byline, Library } from 'redux/state'

function mapStateToProps ({ edit, caseData }: State) {
function mapStateToProps({ edit, caseData }: State) {
const {
slug,
kicker,
Expand Down Expand Up @@ -149,7 +149,7 @@ export const UnconnectedBillboardTitle = ({
multiline
value={title}
disabled={!editing || minimal}
placeholder="What is the central question of the case?"
placeholder="What is the central question of the module?"
onChange={value => updateCase({ title: value })}
onEdit={onBeginEditing}
onCancel={onFinishEditing}
Expand Down Expand Up @@ -181,10 +181,9 @@ export const UnconnectedBillboardTitle = ({
}

// $FlowFixMe
export default connect(
mapStateToProps,
{ updateCase, displayErrorToast }
)(UnconnectedBillboardTitle)
export default connect(mapStateToProps, { updateCase, displayErrorToast })(
UnconnectedBillboardTitle
)

export const Container = styled.div`
display: grid;
Expand Down
Loading