Skip to content

Commit

Permalink
Merge pull request #42362 from code-dot-org/dtp_candidate_1d596e9b
Browse files Browse the repository at this point in the history
DTP (Test > Production: 1d596e9)
  • Loading branch information
jamescodeorg committed Sep 7, 2021
2 parents 2c0936a + 59bf1c4 commit 8740b20
Show file tree
Hide file tree
Showing 220 changed files with 3,911 additions and 3,197 deletions.
7 changes: 6 additions & 1 deletion apps/i18n/javalab/en_us.json
Expand Up @@ -2,9 +2,11 @@
"addAComment": "Add a comment",
"authorLabel": "author",
"allFilesCompile": "All Files Compile!",
"backpackFileNameConflictWarning": "Saving will overwrite an existing file in your backpack",
"backpackLabel": "Backpack",
"backpackListLoadError": "An error occurred loading your backpack. Try again.",
"backpackSaveErrorTitle": "An error occurred",
"backpackListLoadErrorMessageCommitDialog": "Try closing and reopening this dialog.",
"backpackErrorTitle": "An error occurred",
"backpackSaveErrorMessage": "Please try again",
"cancel": "Cancel",
"clearConsole": "Clear Console",
Expand All @@ -28,6 +30,8 @@
"editor": "Editor",
"emptyBackpackMessage": "Files saved to your backpack will appear here.",
"enablePeerReview": "Enable Peer Review",
"errorJavabuilderConnectionGeneral": "We hit an error connecting to our server. Try again.",
"errorJavabuilderConnectionNotAuthorized": "You are not authorized to access Javalab. Do you need to log in or join a section?",
"errorMediaImageLoadError": "There was an error loading the image.",
"errorNeighborhoodInvalidGrid": "There was an error loading the neighborhood level. Please contact us at support@code.org, and be sure to include the URL to this page in your message.",
"errorNeighborhoodInvalidDirection": "The direction provided is not a recognized. Supported directions are \"north\", \"south\", \"east\", and \"west\".",
Expand All @@ -36,6 +40,7 @@
"errorNeighborhoodInvalidLocation": "The location specified isn't on the grid.",
"errorNeighborhoodInvalidMove": "Painter tried to move off the grid or into an obstacle.",
"errorNeighborhoodInvalidPaintLocation": "Painter tried to paint off the grid or over an obstacle.",
"errorProjectNotEditedYet": "This project has not been edited yet. The code will need to be edited before it can run.",
"errorSoundInvalidAudioFileFormat": "The sound file provided is in an unsupported format. Only WAV is supported at this time.",
"errorSoundMissingAudioData": "The sound file provided did not have any audio data.",
"errorTheaterDuplicatePlayCommand": "The play() method can only be called once per execution of the program.",
Expand Down
2 changes: 1 addition & 1 deletion apps/src/applab/designElements/ColorPickerPropertyRow.jsx
Expand Up @@ -24,7 +24,7 @@ export default class ColorPickerPropertyRow extends React.Component {
window.removeEventListener('mousedown', this.handlePageClick);
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const {initialValue} = nextProps;
if (this.props.initialValue !== initialValue) {
this.setState({colorPickerText: initialValue});
Expand Down
2 changes: 1 addition & 1 deletion apps/src/applab/designElements/PropertyRow.jsx
Expand Up @@ -31,7 +31,7 @@ export default class PropertyRow extends React.Component {
isValidValue: true
};

componentWillReceiveProps(newProps) {
UNSAFE_componentWillReceiveProps(newProps) {
this.setState({
value: newProps.initialValue,
isValidValue: true
Expand Down
2 changes: 1 addition & 1 deletion apps/src/code-studio/components/Attachments.jsx
Expand Up @@ -17,7 +17,7 @@ export default class Attachments extends React.Component {

state = {loaded: false};

componentWillMount() {
UNSAFE_componentWillMount() {
assetsApi.getFiles(this.onAssetListReceived);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/src/code-studio/components/SoundLibrary.jsx
Expand Up @@ -62,7 +62,7 @@ export default class SoundLibrary extends React.Component {
selectedSound: {}
};

componentWillMount() {
UNSAFE_componentWillMount() {
this.sounds = Sounds.getSingleton();
}

Expand Down
2 changes: 1 addition & 1 deletion apps/src/code-studio/components/SoundListEntry.jsx
Expand Up @@ -18,7 +18,7 @@ class SoundListEntry extends React.Component {

state = {isPlaying: false};

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (!nextProps.isSelected) {
this.props.soundsRegistry.stopPlayingURL(
this.props.soundMetadata.sourceUrl
Expand Down
2 changes: 1 addition & 1 deletion apps/src/code-studio/components/pairing/Pairing.jsx
Expand Up @@ -25,7 +25,7 @@ export default class Pairing extends React.Component {
loading: true
};

componentWillMount() {
UNSAFE_componentWillMount() {
$.ajax({
url: this.props.source,
method: 'GET',
Expand Down
Expand Up @@ -33,7 +33,7 @@ class LessonLockDialog extends React.Component {
};
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.saving) {
return;
}
Expand Down
Expand Up @@ -45,7 +45,7 @@ class TeacherPanel extends React.Component {
loadLevelsWithProgress: PropTypes.func.isRequired
};

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (
this.props.pageType !== pageTypes.scriptOverview && // no progress is shown on script overview page in teacher panel
nextProps.selectedSection?.id !== this.props.selectedSection?.id
Expand Down
Expand Up @@ -25,8 +25,8 @@ export default class TeacherApplication extends FormController {
/**
* @override
*/
componentWillMount() {
super.componentWillMount();
UNSAFE_componentWillMount() {
super.UNSAFE_componentWillMount();

// Extract school info saved in sessionStorage, if any
let reloadedSchoolId = undefined;
Expand Down
Expand Up @@ -69,7 +69,7 @@ export default class ApplicationDashboard extends React.Component {
canLockApplications: PropTypes.bool
};

componentWillMount() {
UNSAFE_componentWillMount() {
store.dispatch(setRegionalPartners(this.props.regionalPartners));
store.dispatch(
setRegionalPartnerFilter(
Expand Down
Expand Up @@ -21,7 +21,7 @@ export default class ApplicationLoader extends React.Component {
loading: true
};

componentWillMount() {
UNSAFE_componentWillMount() {
this.load();
}

Expand Down
4 changes: 2 additions & 2 deletions apps/src/code-studio/pd/application_dashboard/cohort_view.jsx
Expand Up @@ -34,11 +34,11 @@ class CohortView extends React.Component {
applications: null
};

componentWillMount() {
UNSAFE_componentWillMount() {
this.load(this.props.regionalPartnerFilter);
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (this.props.regionalPartnerFilter !== nextProps.regionalPartnerFilter) {
this.load(nextProps.regionalPartnerFilter);
}
Expand Down
Expand Up @@ -55,7 +55,7 @@ export class CohortViewTable extends React.Component {
};
}

componentWillUpdate() {
UNSAFE_componentWillUpdate() {
this.constructColumns();
}

Expand Down
Expand Up @@ -185,7 +185,7 @@ export class DetailViewContents extends React.Component {
};
}

componentWillMount() {
UNSAFE_componentWillMount() {
if (
this.props.applicationData.application_type ===
ApplicationTypes.facilitator &&
Expand Down
4 changes: 2 additions & 2 deletions apps/src/code-studio/pd/application_dashboard/quick_view.jsx
Expand Up @@ -49,13 +49,13 @@ export class QuickView extends React.Component {
this.loadRequest = null;
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (this.props.regionalPartnerFilter !== nextProps.regionalPartnerFilter) {
this.load(nextProps.regionalPartnerFilter.value);
}
}

componentWillMount() {
UNSAFE_componentWillMount() {
const statusList = getApplicationStatuses(this.props.route.viewType);
this.statuses = Object.keys(statusList).map(v => ({
value: v,
Expand Down
4 changes: 2 additions & 2 deletions apps/src/code-studio/pd/application_dashboard/summary.jsx
Expand Up @@ -31,13 +31,13 @@ export class Summary extends React.Component {
};
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (this.props.regionalPartnerFilter !== nextProps.regionalPartnerFilter) {
this.load(nextProps.regionalPartnerFilter);
}
}

componentWillMount() {
UNSAFE_componentWillMount() {
this.load(this.props.regionalPartnerFilter);
}

Expand Down
Expand Up @@ -27,7 +27,7 @@ export default class WorkshopAssignmentLoader extends React.Component {
loading: true
};

componentWillMount() {
UNSAFE_componentWillMount() {
this.load();
}

Expand Down
Expand Up @@ -58,7 +58,7 @@ export class RegionalPartnerDropdown extends React.Component {
return additionalOptions;
}

componentWillMount() {
UNSAFE_componentWillMount() {
this.regionalPartners = this.props.regionalPartners.map(v => ({
value: v.id,
label: v.name
Expand Down
5 changes: 4 additions & 1 deletion apps/src/code-studio/pd/components/scholarshipDropdown.jsx
Expand Up @@ -3,6 +3,9 @@ import React from 'react';
import {FormGroup} from 'react-bootstrap';
import Select from 'react-select';

// update this to lock scholarships so that scholarship status can't be updated via the UI.
const locked = true;

export class ScholarshipDropdown extends React.Component {
static propTypes = {
scholarshipStatus: PropTypes.string,
Expand All @@ -20,7 +23,7 @@ export class ScholarshipDropdown extends React.Component {
value={this.props.scholarshipStatus}
onChange={this.props.onChange}
options={this.props.dropdownOptions}
disabled={this.props.disabled}
disabled={locked || this.props.disabled}
/>
</FormGroup>
);
Expand Down
4 changes: 2 additions & 2 deletions apps/src/code-studio/pd/form_components/FormController.jsx
Expand Up @@ -42,7 +42,7 @@ export default class FormController extends React.Component {
this.onInitialize();
}

componentWillMount() {
UNSAFE_componentWillMount() {
let newPage;
if (
this.constructor.sessionStorageKey &&
Expand All @@ -63,7 +63,7 @@ export default class FormController extends React.Component {
/**
* @override
*/
componentWillUpdate(nextProps, nextState) {
UNSAFE_componentWillUpdate(nextProps, nextState) {
// If we got new errors, navigate to the first page containing errors
if (this.state.errors.length === 0 && nextState.errors.length > 0) {
for (let i = 0; i < this.getPageComponents().length; i++) {
Expand Down
Expand Up @@ -69,7 +69,7 @@ export class SessionAttendance extends React.Component {
}
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.sessionId !== this.props.sessionId) {
this.load(nextProps);
this.startRefreshInterval();
Expand Down
Expand Up @@ -17,7 +17,7 @@ export default class OrganizerFormPart extends React.Component {
error: false
};

componentWillMount() {
UNSAFE_componentWillMount() {
this.load(this.props.workshopId);
}

Expand Down
Expand Up @@ -175,7 +175,7 @@ export class WorkshopForm extends React.Component {
}
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.readOnly && !this.props.readOnly) {
this.setState(this.computeInitialState(this.props));
}
Expand Down
Expand Up @@ -46,13 +46,13 @@ export default class WorkshopTable extends React.Component {
showStatus: false
};

componentWillMount() {
UNSAFE_componentWillMount() {
if (this.props.onWorkshopsReceived) {
this.props.onWorkshopsReceived(this.props.workshops);
}
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (
!_.isEqual(this.props.workshops, nextProps.workshops) &&
this.props.onWorkshopsReceived
Expand Down
Expand Up @@ -26,15 +26,15 @@ export default class WorkshopTableLoader extends React.Component {
workshops: null
};

componentWillMount() {
UNSAFE_componentWillMount() {
this.load = _.debounce(this.load, 200);
}

componentDidMount() {
this.load();
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (!_.isEqual(this.props, nextProps)) {
this.abortPendingRequests();
this.load(nextProps);
Expand Down
Expand Up @@ -42,7 +42,7 @@ export class TeacherAttendanceReport extends React.Component {
}
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (
nextProps.startDate !== this.props.startDate ||
nextProps.endDate !== this.props.endDate ||
Expand Down
Expand Up @@ -44,7 +44,7 @@ export class WorkshopSummaryReport extends React.Component {
}
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (
nextProps.startDate !== this.props.startDate ||
nextProps.endDate !== this.props.endDate ||
Expand Down
Expand Up @@ -165,7 +165,7 @@ export default class VariableFormGroup extends React.Component {
this.state = {selected};
}

componentWillMount() {
UNSAFE_componentWillMount() {
if (this.hasSingleSourceValue() && this.props.onChange) {
// if we only have a single source value, we want to default to having it
// already selected, so manually trigger an on change if we have one so
Expand Down

0 comments on commit 8740b20

Please sign in to comment.