Skip to content

Commit 1ae07bd

Browse files
authored
Mission editing slang (#496)
* Added Template Reset Feature * Update GlobalDeploymentTab.tsx nicer symbol editing * nicer buttons * made local deployment and added globals editing * yarn format * minor bug fix * Auto update overview maxGrade/Xp * xp bug fix * Update NavigationBar.tsx.snap * Update EditingWorkspace.tsx * Reset button added * fixed bugs globals fixed previous button fixed new template fixed added manual library refresh fixed graderdeployment * yarn format * placeholder for overview card
1 parent 1076f40 commit 1ae07bd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/components/incubator/EditingOverviewCard.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class EditingOverviewCard extends React.Component<Props, IState> {
105105
{this.state.editingOverviewField === 'shortSummary' ? (
106106
this.makeEditingOverviewTextarea('shortSummary')
107107
) : (
108-
<Markdown content={overview.shortSummary} />
108+
<Markdown content={createPlaceholder(overview.shortSummary)} />
109109
)}
110110
</div>
111111
<div className="listing-controls">
@@ -138,7 +138,7 @@ export class EditingOverviewCard extends React.Component<Props, IState> {
138138
<h4 onClick={this.toggleEditField('title')}>
139139
{this.state.editingOverviewField === 'title'
140140
? this.makeEditingOverviewTextarea('title')
141-
: title}{' '}
141+
: createPlaceholder(title)}
142142
</h4>
143143
</Text>
144144
<div className="col-xs-2">{this.makeExportButton(overview)}</div>
@@ -160,6 +160,14 @@ export class EditingOverviewCard extends React.Component<Props, IState> {
160160
);
161161
}
162162

163+
const createPlaceholder = (str: string): string => {
164+
if (str.match('^\n*$')) {
165+
return 'Enter Value Here.';
166+
} else {
167+
return str;
168+
}
169+
};
170+
163171
const makeOverviewCardButton = (overview: IAssessmentOverview, listingPath: string | undefined) => {
164172
const icon: IconName = IconNames.EDIT;
165173
const label: string = 'Edit mission';

0 commit comments

Comments
 (0)