before_code
stringlengths
30
149k
reviewer_comment
stringlengths
16
20.6k
after_code
stringlengths
30
163k
diff_context
stringlengths
0
22.4k
file_path
stringlengths
6
155
comment_line
int64
0
26
language
stringclasses
19 values
quality_score
float64
0.07
1
comment_type
stringclasses
9 values
comment_length
int64
16
20.6k
before_lines
int64
2
4.61k
after_lines
int64
2
4.4k
is_negative
bool
2 classes
pr_title
stringlengths
7
140
pr_number
int64
18
61.2k
repo_name
stringclasses
29 values
repo_stars
int64
321
56k
repo_language
stringclasses
14 values
reviewer_username
stringclasses
378 values
author_username
stringclasses
739 values
user
stringlengths
361
200k
assistant
stringlengths
16
20.6k
system
stringclasses
1 value
if (propertyType == "String" || propertyType == "Choice" || propertyType == "Color" || propertyType == "Behavior" || propertyType == "Resource" || propertyType == "LeaderboardId") { element.SetStringValue(property->GetValue()); } else if (propertyType == "Number") { element.SetDouble...
No issues found.
if (propertyType == "String" || propertyType == "Choice" || propertyType == "Color" || propertyType == "Behavior" || propertyType == "Resource" || propertyType == "LeaderboardId") { element.SetStringValue(property->GetValue()); } else if (propertyType == "Number") { element.SetDouble...
@@ -53,7 +53,8 @@ std::map<gd::String, gd::PropertyDescriptor> CustomConfigurationHelper::GetPrope if (configurationContent.HasChild(propertyName)) { if (propertyType == "String" || propertyType == "Choice" || propertyType == "Color" || propertyType == "Behavior" || - propertyType == "Re...
Core/GDCore/Project/CustomConfigurationHelper.cpp
0
C++
1
none
16
51
51
true
AnimationName selector
7,288
4ian/GDevelop
10,154
JavaScript
NeylMahfouf2608
Review this pull request change. Language: C++ File: Core/GDCore/Project/CustomConfigurationHelper.cpp PR Title: AnimationName selector BEFORE CODE: if (propertyType == "String" || propertyType == "Choice" || propertyType == "Color" || propertyType == "Behavior" || propertyType == "Resource" || ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
(props, ref) => { const inputRef = React.useRef<?HTMLInputElement>(null); React.useEffect( () => { // If the value passed changed, update the input. Otherwise, // keep the input uncontrolled. if (inputRef.current) inputRef.current.value = props.value; }, ...
No issues found.
(props, ref) => { const inputRef = React.useRef<?HTMLInputElement>(null); React.useEffect( () => { // If the value passed changed, update the input. Otherwise, // keep the input uncontrolled. if (inputRef.current) inputRef.current.value = props.value; }, ...
@@ -7,7 +7,7 @@ import classNames from 'classnames'; type SimpleTextFieldProps = {| disabled: boolean, type: 'number' | 'text', - onChange: (newValue: string, context: any) => void, + onChange: (newValue: string, context: any, reason: 'change' | 'blur') => void, value: string, hint?: string, id: strin...
newIDE/app/src/UI/SimpleTextField.js
0
JavaScript
1
none
16
51
51
true
Fix variable list usability
7,290
4ian/GDevelop
10,154
JavaScript
AlexandreSi
Review this pull request change. Language: JavaScript File: newIDE/app/src/UI/SimpleTextField.js PR Title: Fix variable list usability BEFORE CODE: (props, ref) => { const inputRef = React.useRef<?HTMLInputElement>(null); React.useEffect( () => { // If the value passed changed, up...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
task => task.chapterId === chapterId ); if (!currentChapterProgress) { newUserCourseProgress.progress.push({ chapterId, completedTasks: [] }); currentChapterProgress = newUserCourseProgress.progress[ newUserCourseProgress.progress.length - 1 ]; }...
No issues found.
task => task.chapterId === chapterId ); if (!currentChapterProgress) { newUserCourseProgress.progress.push({ chapterId, completedTasks: [] }); currentChapterProgress = newUserCourseProgress.progress[ newUserCourseProgress.progress.length - 1 ]; }...
@@ -67,9 +67,10 @@ const useCourses = () => { updateUserCourseProgress ); - const [isLoadingChapters, setIsLoadingChapters] = React.useState<boolean>( + const [areChaptersReady, setAreChaptersReady] = React.useState<boolean>( false ); + const [ courseChapters, setCourseChapters, @@ -85,...
newIDE/app/src/MainFrame/EditorContainers/HomePage/UseCourses.js
0
JavaScript
1
none
16
51
51
true
Wait for courses to load before opening them
7,304
4ian/GDevelop
10,154
JavaScript
AlexandreSi
Review this pull request change. Language: JavaScript File: newIDE/app/src/MainFrame/EditorContainers/HomePage/UseCourses.js PR Title: Wait for courses to load before opening them BEFORE CODE: task => task.chapterId === chapterId ); if (!currentChapterProgress) { newUserCourseProgress.pr...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
object, } = await setupObjectAndGetDomElementContainer(); // Check the default size. expect(object.getWidth()).to.be(300); expect(object.getHeight()).to.be(30); expect(gameDomElementContainer.hasChildNodes()).to.be(true); const inputElement = gameDomElementContainer.querySelector('input...
No issues found.
object, } = await setupObjectAndGetDomElementContainer(); // Check the default size. expect(object.getWidth()).to.be(300); expect(object.getHeight()).to.be(30); expect(gameDomElementContainer.hasChildNodes()).to.be(true); const inputElement = gameDomElementContainer.querySelector('input...
@@ -25,6 +25,9 @@ describe('gdjs.TextInputRuntimeObject (using a PixiJS RuntimeGame with DOM eleme borderWidth: 2, disabled: false, readOnly: false, + padding: 0, + textAlign: 'left', + maxLength: 20, }, }); @@ -166,33 +169,33 @@ describe('gdjs.TextInputRunt...
Extensions/TextInput/tests/textinputruntimeobject.pixiruntimegamewithassets.spec.js
0
JavaScript
1
none
16
51
51
true
Improvement features for Input text box
7,308
4ian/GDevelop
10,154
JavaScript
NeylMahfouf2608
Review this pull request change. Language: JavaScript File: Extensions/TextInput/tests/textinputruntimeobject.pixiruntimegamewithassets.spec.js PR Title: Improvement features for Input text box BEFORE CODE: object, } = await setupObjectAndGetDomElementContainer(); // Check the default size. expec...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (field.current) field.current.focus(options); }; React.useImperativeHandle(ref, () => ({ focus, })); // If the current value is not in the list, display an expression field. const [isExpressionField, setIsExpressionField] = React.useState( !!props.value && !isValidLiteralMouseB...
No issues found.
if (field.current) field.current.focus(options); }; React.useImperativeHandle(ref, () => ({ focus, })); // If the current value is not in the list, display an expression field. const [isExpressionField, setIsExpressionField] = React.useState( !!props.value && !isValidLiteralMouseB...
@@ -33,6 +33,28 @@ const mouseButtons = [ label: t`Forward (Additional button, typically the Browser Forward button)`, }, ]; +const mouseButtonsSet = new Set(mouseButtons.map(button => button.value)); + +const stringRegex = /^"(\w*)"$/; + +const isValidLiteralMouseButton = (expression: string): boolean => { + ...
newIDE/app/src/EventsSheet/ParameterFields/MouseButtonField.js
0
JavaScript
1
none
16
51
51
true
Fix syntax errors not showing up on mouse button and key parameters
7,320
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/EventsSheet/ParameterFields/MouseButtonField.js PR Title: Fix syntax errors not showing up on mouse button and key parameters BEFORE CODE: if (field.current) field.current.focus(options); }; React.useImperativeHandle(ref, () =>...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
import React from 'react'; import SvgIcon from '@material-ui/core/SvgIcon'; export default React.memo(props => ( <SvgIcon {...props} width="16" height="16" viewBox="0 0 16 16" fill="none"> <rect x="0.5" y="0.5" width="15" height="15" rx="3.5" stroke="currentColor" fill="...
No issues found.
import React from 'react'; import SvgIcon from '@material-ui/core/SvgIcon'; export default React.memo(props => ( <SvgIcon {...props} width="16" height="16" viewBox="0 0 16 16" fill="none"> <rect x="0.5" y="0.5" width="15" height="15" rx="3.5" stroke="currentColor" fill="...
@@ -0,0 +1,22 @@ +import React from 'react'; +import SvgIcon from '@material-ui/core/SvgIcon'; + +export default React.memo(props => ( + <SvgIcon {...props} width="16" height="16" viewBox="0 0 16 16" fill="none"> + <rect + x="0.5" + y="0.5" + width="15" + height="15" + rx="3.5" + strok...
newIDE/app/src/UI/CustomSvgIcons/ChevronArrowDownWithRoundedBorder.js
0
JavaScript
1
none
16
23
23
true
Consistency on arrows
7,322
4ian/GDevelop
10,154
JavaScript
Bouh
Review this pull request change. Language: JavaScript File: newIDE/app/src/UI/CustomSvgIcons/ChevronArrowDownWithRoundedBorder.js PR Title: Consistency on arrows BEFORE CODE: import React from 'react'; import SvgIcon from '@material-ui/core/SvgIcon'; export default React.memo(props => ( <SvgIcon {...props} width...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
.getEvents() .unserializeFrom(project, eventsSerializerElement); gd.WholeProjectRefactorer.ensureBehaviorEventsFunctionsProperParameters( eventsFunctionsExtension, eventsBasedBehavior ); const { runtimeScene, behavior } = generatedBehavior( gd, project, eventsFunct...
No issues found.
.getEvents() .unserializeFrom(project, eventsSerializerElement); gd.WholeProjectRefactorer.ensureBehaviorEventsFunctionsProperParameters( eventsFunctionsExtension, eventsBasedBehavior ); const { runtimeScene, behavior } = generatedBehavior( gd, project, eventsFunct...
@@ -260,6 +260,71 @@ describe('libGD.js - GDJS Behavior Code Generation integration tests', function expect(behavior._getMyProperty()).toBe(456); }); + it('Can use a property in a variable action when a parameter with the same name exits', () => { + const project = new gd.ProjectHelper.createNewGDJSProjec...
GDevelop.js/__tests__/GDJSBehaviorCodeGenerationIntegrationTests.js
0
JavaScript
1
none
16
51
51
true
Fix conflict between variable or property and parameter in variable setters
7,329
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: GDevelop.js/__tests__/GDJSBehaviorCodeGenerationIntegrationTests.js PR Title: Fix conflict between variable or property and parameter in variable setters BEFORE CODE: .getEvents() .unserializeFrom(project, eventsSerializerElement); gd.Whole...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
const matchB = resultB.matches.find(match => match.key === key); if (matchA && matchB) { if ( matchA.closestExactMatchAtStartOfWordIndex !== null && matchB.closestExactMatchAtStartOfWordIndex !== null ) { return ( matchA.closestExactMatchAtStartOfWor...
No issues found.
const matchB = resultB.matches.find(match => match.key === key); if (matchA && matchB) { if ( matchA.closestExactMatchAtStartOfWordIndex !== null && matchB.closestExactMatchAtStartOfWordIndex !== null ) { return ( matchA.closestExactMatchAtStartOfWor...
@@ -23,9 +23,19 @@ export type SearchMatch = {| indices: number[][], value: string, |}; +export type AugmentedSearchMatch = {| + ...SearchMatch, + closestExactMatchAtStartOfWordIndex: number | null, + closestExactMatchIndex: number | null, +|}; export type SearchResult<T> = {| item: T, matches: SearchM...
newIDE/app/src/UI/Search/UseSearchStructuredItem.js
0
JavaScript
1
none
16
51
51
true
Return exact matches when searching for an instruction
7,330
4ian/GDevelop
10,154
JavaScript
AlexandreSi
Review this pull request change. Language: JavaScript File: newIDE/app/src/UI/Search/UseSearchStructuredItem.js PR Title: Return exact matches when searching for an instruction BEFORE CODE: const matchB = resultB.matches.find(match => match.key === key); if (matchA && matchB) { if ( ma...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
.addExpressionAndConditionAndAction( 'string', 'InputType', _('Input type'), _('the input type'), _('the input type'), _('Type'), 'res/conditions/text24_black.png' ) .addParameter('object', _('Text input'), 'TextInputObject', false) .useSta...
No issues found.
.addExpressionAndConditionAndAction( 'string', 'InputType', _('Input type'), _('the input type'), _('the input type'), _('Type'), 'res/conditions/text24_black.png' ) .addParameter('object', _('Text input'), 'TextInputObject', false) .useSta...
@@ -81,8 +81,11 @@ module.exports = { } else if (propertyName === 'maxLength') { objectContent.maxLength = newValue; return true; - } else if (propertyName === 'padding') { - objectContent.padding = newValue; + } else if (propertyName === 'paddingX') { + objectContent.pa...
Extensions/TextInput/JsExtension.js
0
JavaScript
1
none
16
51
51
true
Split text input padding into 2 separate properties
7,338
4ian/GDevelop
10,154
JavaScript
AlexandreSi
Review this pull request change. Language: JavaScript File: Extensions/TextInput/JsExtension.js PR Title: Split text input padding into 2 separate properties BEFORE CODE: .addExpressionAndConditionAndAction( 'string', 'InputType', _('Input type'), _('the input type'), _...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} _getShowDeprecatedInstructionWarning() { return this.state.values.showDeprecatedInstructionWarning; } _setUse3DEditor(use3DEditor: boolean) { this.setState( state => ({ values: { ...state.values, use3DEditor, }, }), () => this._persistValuesToLoc...
No issues found.
} _getShowDeprecatedInstructionWarning() { return this.state.values.showDeprecatedInstructionWarning; } _setUse3DEditor(use3DEditor: boolean) { this.setState( state => ({ values: { ...state.values, use3DEditor, }, }), () => this._persistValuesToLoc...
@@ -39,7 +39,6 @@ type Props = {| type State = Preferences; const localStorageItem = 'gd-preferences'; -const MAX_RECENT_FILES_COUNT = 20; export const loadPreferencesFromLocalStorage = (): ?PreferencesValues => { try { @@ -85,7 +84,7 @@ export const getInitialPreferences = () => { return { ...initialPrefe...
newIDE/app/src/MainFrame/Preferences/PreferencesProvider.js
0
JavaScript
1
none
16
51
51
true
Fix a few issues with displaying projects correctly in the create section
7,349
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/MainFrame/Preferences/PreferencesProvider.js PR Title: Fix a few issues with displaying projects correctly in the create section BEFORE CODE: } _getShowDeprecatedInstructionWarning() { return this.state.values.showDeprecatedInstruct...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
project, instance, associatedObjectConfiguration, pixiContainer, threeGroup, PixiResourcesLoader ); } else { return new RenderedCustomObjectInstance( project, instance, associatedObjec...
No issues found.
project, instance, associatedObjectConfiguration, pixiContainer, threeGroup, PixiResourcesLoader ); } else { return new RenderedCustomObjectInstance( project, instance, associatedObjec...
@@ -20,7 +20,11 @@ import * as PIXI_SPINE from 'pixi-spine'; import * as THREE from 'three'; import * as SkeletonUtils from 'three/examples/jsm/utils/SkeletonUtils'; import optionalRequire from '../Utils/OptionalRequire'; -import { rgbOrHexToHexNumber } from '../Utils/ColorTransformer'; +import { + rgbOrHexToHexNum...
newIDE/app/src/ObjectsRendering/ObjectsRenderingService.js
0
JavaScript
1
none
16
51
51
true
Tint color for 3D cube
7,354
4ian/GDevelop
10,154
JavaScript
NeylMahfouf2608
Review this pull request change. Language: JavaScript File: newIDE/app/src/ObjectsRendering/ObjectsRenderingService.js PR Title: Tint color for 3D cube BEFORE CODE: project, instance, associatedObjectConfiguration, pixiContainer, threeGroup, Pi...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} if ( !matchA && matchB && matchB.closestExactMatchAtStartOfWordIndex !== null ) { return 1; } // If both result have exact matches in the key, give priority to the one where // the match is closer to the start of the sentence. if (matchA && mat...
No issues found.
} if ( !matchA && matchB && matchB.closestExactMatchAtStartOfWordIndex !== null ) { return 1; } // If both result have exact matches in the key, give priority to the one where // the match is closer to the start of the sentence. if (matchA && mat...
@@ -241,6 +241,24 @@ export const sortResultsUsingExactMatches = (orderedKeys: string[]) => { for (const key of orderedKeys) { const matchA = resultA.matches.find(match => match.key === key); const matchB = resultB.matches.find(match => match.key === key); + // If a result has an exact math at t...
newIDE/app/src/UI/Search/UseSearchStructuredItem.js
0
JavaScript
1
none
16
51
51
true
Refine free instructions search to give priority to exact matches at start of word
7,360
4ian/GDevelop
10,154
JavaScript
AlexandreSi
Review this pull request change. Language: JavaScript File: newIDE/app/src/UI/Search/UseSearchStructuredItem.js PR Title: Refine free instructions search to give priority to exact matches at start of word BEFORE CODE: } if ( !matchA && matchB && matchB.closestExactMatchAtStartOfW...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
project, PixiResourcesLoader, serializedObject ); // The asset header is used because the Pixi texture will likely be invalid // when the asset has just been downloaded. const assetDimensions = assetShortHeader ? { width: assetShortHeader.width, height: assetShortHeader.height } : getFirstFr...
No issues found.
project, PixiResourcesLoader, serializedObject ); // The asset header is used because the Pixi texture will likely be invalid // when the asset has just been downloaded. const assetDimensions = assetShortHeader ? { width: assetShortHeader.width, height: assetShortHeader.height } : getFirstFr...
@@ -81,10 +81,18 @@ type SpriteObjectDataType = { animations: Array<SpriteAnimationData>, }; -export const canSwapAssetOfObject = (object: gdObject) => { - const type = object.getType(); - return type === 'Scene3D::Model3DObject' || type === 'Sprite'; -}; +const unswappableObjectTypes = [ + 'BBText::BBText', +...
newIDE/app/src/AssetStore/AssetSwapper.js
0
JavaScript
1
none
16
51
51
true
Allow to swap assets of any object type
7,365
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/AssetStore/AssetSwapper.js PR Title: Allow to swap assets of any object type BEFORE CODE: project, PixiResourcesLoader, serializedObject ); // The asset header is used because the Pixi texture will likely be invalid // when...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
setTextInput(''); }; React.useEffect( () => { if (open && shouldAutofocus && !confirmText) { // If the dialog is opened and autofocus should be set and there is no confirm text // to enter, focus Confirm button to enable quick deletion with only keyboard navigation. setTimeout...
No issues found.
setTextInput(''); }; React.useEffect( () => { if (open && shouldAutofocus && !confirmText) { // If the dialog is opened and autofocus should be set and there is no confirm text // to enter, focus Confirm button to enable quick deletion with only keyboard navigation. setTimeout...
@@ -11,6 +11,7 @@ import { LargeSpacer } from '../Grid'; import Text from '../Text'; import TextField from '../TextField'; import { useShouldAutofocusInput } from '../Responsive/ScreenTypeMeasurer'; +import { MarkdownText } from '../MarkdownText'; type Props = {| open: boolean, @@ -22,6 +23,7 @@ type Props = {...
newIDE/app/src/UI/Alert/ConfirmDeleteDialog.js
0
JavaScript
1
none
16
51
51
true
Add a clearer warning before the deletion of a game and a project.
7,368
4ian/GDevelop
10,154
JavaScript
Bouh
Review this pull request change. Language: JavaScript File: newIDE/app/src/UI/Alert/ConfirmDeleteDialog.js PR Title: Add a clearer warning before the deletion of a game and a project. BEFORE CODE: setTextInput(''); }; React.useEffect( () => { if (open && shouldAutofocus && !confirmText) { ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
value={gd.Variable.Boolean} />, <SelectOption key="array" label={t`Array`} value={gd.Variable.Array} />, <SelectOption key="structure" label={t`Structure`} value={gd.Variable.Structure} />, ]; } return options; }; export const getVariableTypeToIcon = (): ...
No issues found.
value={gd.Variable.Boolean} />, <SelectOption key="array" label={t`Array`} value={gd.Variable.Array} />, <SelectOption key="structure" label={t`Structure`} value={gd.Variable.Structure} />, ]; } return options; }; export const getVariableTypeToIcon = (): ...
@@ -2,6 +2,7 @@ import * as React from 'react'; import { t } from '@lingui/macro'; +import { type MessageDescriptor } from '../Utils/i18n/MessageDescriptor.flow'; import SelectField from '../UI/SelectField'; import SelectOption from '../UI/SelectOption'; import VariableStringIcon from './Icons/VariableStringIcon...
newIDE/app/src/VariablesList/VariableTypeSelector.js
0
JavaScript
1
none
16
51
51
true
Add a warning on array children with inconsistent type
7,376
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/VariablesList/VariableTypeSelector.js PR Title: Add a warning on array children with inconsistent type BEFORE CODE: value={gd.Variable.Boolean} />, <SelectOption key="array" label={t`Array`} value={gd.Variable.Array} />, ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
let nextStepIndex = stepIndex; // Check if we can go directly to next mandatory (not-skippable) and not deprecated step. while (nextStepIndex < stepCount - 1) { if ( flow[nextStepIndex] && (flow[nextStepIndex].deprecated || (flow[nextStepIndex].sk...
No issues found.
let nextStepIndex = stepIndex; // Check if we can go directly to next mandatory (not-skippable) and not deprecated step. while (nextStepIndex < stepCount - 1) { if ( flow[nextStepIndex] && (flow[nextStepIndex].deprecated || (flow[nextStepIndex].sk...
@@ -1,6 +1,5 @@ // @flow import * as React from 'react'; -import { I18n } from '@lingui/react'; import { I18n as I18nType } from '@lingui/core'; import { useDebounce } from '../Utils/UseDebounce'; import { useInterval } from '../Utils/UseInterval'; @@ -428,6 +427,7 @@ type Props = {| tutorial: InAppTutorial, ...
newIDE/app/src/InAppTutorial/InAppTutorialOrchestrator.js
0
JavaScript
1
none
16
51
51
true
Add possibility to display message in the preview when an in-app tutorial is running
7,379
4ian/GDevelop
10,154
JavaScript
AlexandreSi
Review this pull request change. Language: JavaScript File: newIDE/app/src/InAppTutorial/InAppTutorialOrchestrator.js PR Title: Add possibility to display message in the preview when an in-app tutorial is running BEFORE CODE: let nextStepIndex = stepIndex; // Check if we can go directly to next man...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Center the model. const centerPoint = this._model3DRuntimeObject._centerPoint; if (centerPoint) { threeObject.position.set( -(boundingBox.min.x + modelWidth * centerPoint[0]), // The model is flipped on Y axis. -(boundingBox.min.y + modelHeight * (1 - centerPoi...
No issues found.
// Center the model. const centerPoint = this._model3DRuntimeObject._centerPoint; if (centerPoint) { threeObject.position.set( -(boundingBox.min.x + modelWidth * centerPoint[0]), // The model is flipped on Y axis. -(boundingBox.min.y + modelHeight * (1 - centerPoi...
@@ -359,7 +359,6 @@ namespace gdjs { } playAnimation(animationName: string, shouldLoop: boolean) { - this._animationMixer.stopAllAction(); const clip = THREE.AnimationClip.findByName( this._originalModel.animations, animationName @@ -370,12 +369,22 @@ namespace gdjs { ...
Extensions/3D/Model3DRuntimeObject3DRenderer.ts
0
TypeScript
1
none
16
51
51
true
add a crossfade duration property to 3d models and an action to set it
7,386
4ian/GDevelop
10,154
JavaScript
NeylMahfouf2608
Review this pull request change. Language: TypeScript File: Extensions/3D/Model3DRuntimeObject3DRenderer.ts PR Title: add a crossfade duration property to 3d models and an action to set it BEFORE CODE: // Center the model. const centerPoint = this._model3DRuntimeObject._centerPoint; if (centerPoin...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
); const moveAnimation = React.useCallback( (targetIndex: number) => { const draggedIndex = draggedAnimationIndex.current; if (draggedIndex === null) return; setNameErrors({}); model3DConfiguration.moveAnimation( draggedIndex, targetIndex > draggedIndex ? targetIndex -...
No issues found.
); const moveAnimation = React.useCallback( (targetIndex: number) => { const draggedIndex = draggedAnimationIndex.current; if (draggedIndex === null) return; setNameErrors({}); model3DConfiguration.moveAnimation( draggedIndex, targetIndex > draggedIndex ? targetIndex -...
@@ -667,6 +667,12 @@ const Model3DEditor = ({ </SelectField> </ResponsiveLineStackLayout> <Text size="block-title">Animations</Text> + <Column noMargin expand> + <PropertyField + objectConfiguration={objectConfiguration} + propertyName="cr...
newIDE/app/src/ObjectEditor/Editors/Model3DEditor.js
0
JavaScript
1
none
16
51
51
true
fix crossfade icon, crossfade property and add unit
7,390
4ian/GDevelop
10,154
JavaScript
NeylMahfouf2608
Review this pull request change. Language: JavaScript File: newIDE/app/src/ObjectEditor/Editors/Model3DEditor.js PR Title: fix crossfade icon, crossfade property and add unit BEFORE CODE: ); const moveAnimation = React.useCallback( (targetIndex: number) => { const draggedIndex = draggedAnimationIndex...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
namespace gdjs { export namespace evtTools { export namespace spatialSound { export const setSoundPosition = ( instanceContainer: gdjs.RuntimeInstanceContainer, channel: integer, x: float, y: float, z: float ) => { // TODO EBO The position must be transf...
No issues found.
namespace gdjs { export namespace evtTools { export namespace spatialSound { export const setSoundPosition = ( instanceContainer: gdjs.RuntimeInstanceContainer, channel: integer, x: float, y: float, z: float ) => { // TODO EBO The position must be transf...
@@ -1,7 +1,6 @@ namespace gdjs { export namespace evtTools { export namespace spatialSound { - const logger = new gdjs.Logger('Spatial Sound'); export const setSoundPosition = ( instanceContainer: gdjs.RuntimeInstanceContainer, channel: integer, @@ -10,15 +9,8 @@ namespace gdjs { ...
Extensions/SpatialSound/spatialsoundtools.ts
0
TypeScript
1
none
16
18
18
true
Fix spatial sound setting if sound not playing yet
7,393
4ian/GDevelop
10,154
JavaScript
AlexandreSi
Review this pull request change. Language: TypeScript File: Extensions/SpatialSound/spatialsoundtools.ts PR Title: Fix spatial sound setting if sound not playing yet BEFORE CODE: namespace gdjs { export namespace evtTools { export namespace spatialSound { export const setSoundPosition = ( instan...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
* * This is an Euler angle. Objects use the `ZYX` order. */ setRotationY(angle: float): void { this._rotationY = angle; this.getRenderer().updateRotation(); } /** * Get the object rotation on the X axis. * * This is an Euler angle. Objects use the `ZYX` order. ...
No issues found.
* * This is an Euler angle. Objects use the `ZYX` order. */ setRotationY(angle: float): void { this._rotationY = angle; this.getRenderer().updateRotation(); } /** * Get the object rotation on the X axis. * * This is an Euler angle. Objects use the `ZYX` order. ...
@@ -1,15 +1,4 @@ namespace gdjs { - export interface Object3DDataContent { - width: float; - height: float; - depth: float; - } - /** Base parameters for {@link gdjs.RuntimeObject3D} */ - export interface Object3DData extends ObjectData { - /** The base parameters of the RuntimeObject3D */ - content...
Extensions/3D/A_RuntimeObject3D.ts
0
TypeScript
1
none
16
51
51
true
Upgrade to TypeScript 5.4.5
7,394
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: TypeScript File: Extensions/3D/A_RuntimeObject3D.ts PR Title: Upgrade to TypeScript 5.4.5 BEFORE CODE: * * This is an Euler angle. Objects use the `ZYX` order. */ setRotationY(angle: float): void { this._rotationY = angle; this.getRenderer()....
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
else { // Between MAXIMUM_DURATION_FOR_SMALL_STATUS and MINIMUM_DURATION_FOR_RISKY_STATUS without saving. if (changesCount <= MINIMUM_CHANGES_FOR_SIGNIFICANT_STATUS) return 'small'; if (changesCount <= MINIMUM_CHANGES_FOR_RISKY_STATUS) return 'significant'; return 'risky'; } }; const useSaveReminde...
No issues found.
else { // Between MAXIMUM_DURATION_FOR_SMALL_STATUS and MINIMUM_DURATION_FOR_RISKY_STATUS without saving. if (changesCount <= MINIMUM_CHANGES_FOR_SIGNIFICANT_STATUS) return 'small'; if (changesCount <= MINIMUM_CHANGES_FOR_RISKY_STATUS) return 'significant'; return 'risky'; } }; const useSaveReminde...
@@ -28,16 +28,19 @@ const CHECK_FREQUENCY = 5000; export const getUnsavedChangesAmount = ( unsavedChanges: UnsavedChanges ): UnsavedChangesAmount => { - const { getChangesCount, getLastCheckpointTime } = unsavedChanges; + const { getChangesCount, getTimeOfFirstChangeSinceLastSave } = unsavedChanges; const cha...
newIDE/app/src/MainFrame/UseSaveReminder.js
0
JavaScript
1
none
16
51
51
true
Improve save reminder
7,413
4ian/GDevelop
10,154
JavaScript
AlexandreSi
Review this pull request change. Language: JavaScript File: newIDE/app/src/MainFrame/UseSaveReminder.js PR Title: Improve save reminder BEFORE CODE: else { // Between MAXIMUM_DURATION_FOR_SMALL_STATUS and MINIMUM_DURATION_FOR_RISKY_STATUS without saving. if (changesCount <= MINIMUM_CHANGES_FOR_SIGNIFICANT...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
const shouldAllowCreatingProject = !isLoading && !needUserAuthenticationForStorage && !hasTooManyCloudProjects && (hasSelectedAStorageProvider || shouldAllowCreatingProjectWithoutSaving); const onCreateGameClick = React.useCallback( async (i18n: I18nType) => { if (!shouldAllowCreatingProj...
No issues found.
const shouldAllowCreatingProject = !isLoading && !needUserAuthenticationForStorage && !hasTooManyCloudProjects && (hasSelectedAStorageProvider || shouldAllowCreatingProjectWithoutSaving); const onCreateGameClick = React.useCallback( async (i18n: I18nType) => { if (!shouldAllowCreatingProj...
@@ -39,6 +39,7 @@ import { type PrivateGameTemplateListingData } from '../Utils/GDevelopServices/S import { CLOUD_PROJECT_NAME_MAX_LENGTH } from '../Utils/GDevelopServices/Project'; import AIPromptField from './AIPromptField'; import EmptyAndStartingPointProjects, { + isLinkedToStartingPointExampleShortHeader, i...
newIDE/app/src/ProjectCreation/NewProjectSetupDialog.js
0
JavaScript
1
none
16
51
51
true
Allow selecting a Pixel Art version of 2D starting points
7,425
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/ProjectCreation/NewProjectSetupDialog.js PR Title: Allow selecting a Pixel Art version of 2D starting points BEFORE CODE: const shouldAllowCreatingProject = !isLoading && !needUserAuthenticationForStorage && !hasTooManyCloudPro...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
gd::String conditionsCode = codeGenerator.GenerateConditionsListCode( event.GetConditions(), context); gd::String actionsCode = codeGenerator.GenerateActionsListCode(event.GetActions(), context); gd::String ifPredicate = event.GetConditions().empty() ...
No issues found.
gd::String conditionsCode = codeGenerator.GenerateConditionsListCode( event.GetConditions(), context); gd::String actionsCode = codeGenerator.GenerateActionsListCode(event.GetActions(), context); gd::String ifPredicate = event.GetConditions().empty() ...
@@ -540,7 +540,7 @@ CommonInstructionsExtension::CommonInstructionsExtension() { .FindAndReplace( "$VALUE_ITERATOR_VARIABLE_ACCESSOR", codeGenerator.GenerateAnyOrSceneVariableGetter( - event.GetValueIteratorVariableName(), c...
GDJS/GDJS/Extensions/Builtin/CommonInstructionsExtension.cpp
0
C++
1
none
16
51
51
true
Fix access to object in variable expressions of "for each child variable" loops
7,435
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: C++ File: GDJS/GDJS/Extensions/Builtin/CommonInstructionsExtension.cpp PR Title: Fix access to object in variable expressions of "for each child variable" loops BEFORE CODE: gd::String conditionsCode = codeGenerator.GenerateConditionsListCode( event.Get...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
) { return null; } return ( <DragSourceAndDropTarget key={property.ptr} beginDrag={() => { draggedProperty.current = property...
No issues found.
) { return null; } return ( <DragSourceAndDropTarget key={property.ptr} beginDrag={() => { draggedProperty.current = property...
@@ -734,6 +734,11 @@ export default function EventsBasedObjectPropertiesEditor({ value="LeaderboardId" label={t`Leaderboard (text)`} /> + <SelectOption + ...
newIDE/app/src/EventsBasedObjectEditor/EventsBasedObjectPropertiesEditor.js
0
JavaScript
1
none
16
51
51
true
Allow custom objects to declare multi-line text properties
7,436
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/EventsBasedObjectEditor/EventsBasedObjectPropertiesEditor.js PR Title: Allow custom objects to declare multi-line text properties BEFORE CODE: ) { return null; } ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Resources may have been renamed to be added to the project. // In this case, rename them in the object. const renamedResourcesMap = toNewGdMapStringString(resourceNewNames); const resourcesRenamer = new gd.ResourcesRenamer( project.getResourcesManager(), renamedResourcesMap ); ren...
No issues found.
// Resources may have been renamed to be added to the project. // In this case, rename them in the object. const renamedResourcesMap = toNewGdMapStringString(resourceNewNames); const resourcesRenamer = new gd.ResourcesRenamer( project.getResourcesManager(), renamedResourcesMap ); ren...
@@ -4,7 +4,9 @@ import { isPixelArt, isPublicAssetResourceUrl, extractDecodedFilenameWithExtensionFromPublicAssetResourceUrl, + isCompatibleWithGDevelopVersion, } from '../Utils/GDevelopServices/Asset'; +import { getIDEVersion } from '../Version'; import newNameGenerator from '../Utils/NewNameGenerator'; i...
newIDE/app/src/AssetStore/InstallAsset.js
0
JavaScript
1
none
16
51
51
true
Forbid to install assets or behaviors from extensions incompatible with the editor
7,441
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/AssetStore/InstallAsset.js PR Title: Forbid to install assets or behaviors from extensions incompatible with the editor BEFORE CODE: // Resources may have been renamed to be added to the project. // In this case, rename them in the o...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// @flow export const OPEN_OBJECTS_PANEL_BUTTON_ID = 'toolbar-open-objects-panel-button'; export const OPEN_OBJECT_GROUPS_PANEL_BUTTON_ID = 'toolbar-open-object-groups-panel-button'; export const OPEN_PROPERTIES_PANEL_BUTTON_ID = 'toolbar-open-properties-panel-button'; export const OPEN_INSTANCES_PANEL_BUTTON_ID = ...
No issues found.
// @flow export const OPEN_OBJECTS_PANEL_BUTTON_ID = 'toolbar-open-objects-panel-button'; export const OPEN_OBJECT_GROUPS_PANEL_BUTTON_ID = 'toolbar-open-object-groups-panel-button'; export const OPEN_PROPERTIES_PANEL_BUTTON_ID = 'toolbar-open-properties-panel-button'; export const OPEN_INSTANCES_PANEL_BUTTON_ID = ...
@@ -0,0 +1,23 @@ +// @flow +export const OPEN_OBJECTS_PANEL_BUTTON_ID = 'toolbar-open-objects-panel-button'; +export const OPEN_OBJECT_GROUPS_PANEL_BUTTON_ID = + 'toolbar-open-object-groups-panel-button'; +export const OPEN_PROPERTIES_PANEL_BUTTON_ID = + 'toolbar-open-properties-panel-button'; +export const OPEN_INST...
newIDE/app/src/SceneEditor/utils.js
0
JavaScript
1
none
16
24
24
true
Improve Guided Lessons flow by preventing clicking outside of the next action
7,444
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/SceneEditor/utils.js PR Title: Improve Guided Lessons flow by preventing clicking outside of the next action BEFORE CODE: // @flow export const OPEN_OBJECTS_PANEL_BUTTON_ID = 'toolbar-open-objects-panel-button'; export const OPEN_OBJECT_GROU...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
export const sendUserSurveyStarted = () => { recordEvent('user_survey_started'); }; export const sendUserSurveyCompleted = () => { recordEvent('user_survey_completed'); }; export const sendUserSurveyHidden = () => { recordEvent('user_survey_hidden'); }; export const sendHelpSearch = (searchText: string) => { ...
No issues found.
export const sendUserSurveyStarted = () => { recordEvent('user_survey_started'); }; export const sendUserSurveyCompleted = () => { recordEvent('user_survey_completed'); }; export const sendUserSurveyHidden = () => { recordEvent('user_survey_hidden'); }; export const sendHelpSearch = (searchText: string) => { ...
@@ -621,3 +621,32 @@ export const sendInAppTutorialProgress = ({ nextCheckTimeoutId: setTimeout(() => immediatelyRecordEvent(true), 30000), }; }; + +export const sendAssetSwapStart = ({ + originalObjectName, + objectType, +}: {| + originalObjectName: string, + objectType: string, +|}) => { + recordEvent('...
newIDE/app/src/Utils/Analytics/EventSender.js
0
JavaScript
1
none
16
51
51
true
Add events when swapping assets
7,450
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/Utils/Analytics/EventSender.js PR Title: Add events when swapping assets BEFORE CODE: export const sendUserSurveyStarted = () => { recordEvent('user_survey_started'); }; export const sendUserSurveyCompleted = () => { recordEvent('user_s...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
eventsBasedObject: gdEventsBasedObject ) => { const { currentProject, editorTabs } = state; if (!currentProject) return; const foundTab = getCustomObjectEditor( editorTabs, eventsFunctionsExtension, eventsBasedObject ); if (foundTab) { setState(st...
No issues found.
eventsBasedObject: gdEventsBasedObject ) => { const { currentProject, editorTabs } = state; if (!currentProject) return; const foundTab = getCustomObjectEditor( editorTabs, eventsFunctionsExtension, eventsBasedObject ); if (foundTab) { setState(st...
@@ -489,8 +489,6 @@ const MainFrame = (props: Props) => { setQuickCustomizationDialogOpenedFromGameId, ] = React.useState<?string>(null); - const { getAuthenticatedPlayerForPreview } = useAuthenticatedPlayer(); - // This is just for testing, to check if we're getting the right state // and gives us an ...
newIDE/app/src/MainFrame/index.js
0
JavaScript
1
none
16
51
51
true
Update player token logic to be fetched on project opening
7,460
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/MainFrame/index.js PR Title: Update player token logic to be fetched on project opening BEFORE CODE: eventsBasedObject: gdEventsBasedObject ) => { const { currentProject, editorTabs } = state; if (!currentProject) retur...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Already unloaded. return; } if (timeoutToUnloadIframe.current) { // Cancel the previous timeout to start a new one. clearTimeout(timeoutToUnloadIframe.current); timeoutToUnloadIframe.current = null; } // The iframe becomes invisible right away, /...
No issues found.
// Already unloaded. return; } if (timeoutToUnloadIframe.current) { // Cancel the previous timeout to start a new one. clearTimeout(timeoutToUnloadIframe.current); timeoutToUnloadIframe.current = null; } // The iframe becomes invisible right away, /...
@@ -13,6 +13,8 @@ import { isNativeMobileApp } from '../../../../Utils/Platform'; import Window from '../../../../Utils/Window'; import { delay } from '../../../../Utils/Delay'; import { useStableUpToDateRef } from '../../../../Utils/UseStableUpToDateCallback'; +import { useSoftKeyboardBottomOffset } from '../../../...
newIDE/app/src/MainFrame/EditorContainers/HomePage/PlaySection/GamesPlatformFrameContext.js
0
JavaScript
1
none
16
51
51
true
Send message to gd.games iframe when keyboard opens
7,472
4ian/GDevelop
10,154
JavaScript
AlexandreSi
Review this pull request change. Language: JavaScript File: newIDE/app/src/MainFrame/EditorContainers/HomePage/PlaySection/GamesPlatformFrameContext.js PR Title: Send message to gd.games iframe when keyboard opens BEFORE CODE: // Already unloaded. return; } if (timeoutToUnloadIframe.curr...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
const TabsTitlebarTooltip = ({ anchorElement, editorTab }: Props) => { const gdevelopTheme = React.useContext(GDevelopThemeContext); const [tooltipStyle, setTooltipStyle] = React.useState<Object>( styles.tooltip ); const brightness = gdevelopTheme.palette.type === 'dark' ? 0.978 : 0.224; const...
No issues found.
const TabsTitlebarTooltip = ({ anchorElement, editorTab }: Props) => { const gdevelopTheme = React.useContext(GDevelopThemeContext); const [tooltipStyle, setTooltipStyle] = React.useState<Object>( styles.tooltip ); const brightness = gdevelopTheme.palette.type === 'dark' ? 0.978 : 0.224; const...
@@ -0,0 +1,162 @@ +// @flow +import * as React from 'react'; +import { Trans } from '@lingui/macro'; +import Fade from '@material-ui/core/Fade'; +import Paper from '@material-ui/core/Paper'; +import Popper from '@material-ui/core/Popper'; + +import GDevelopThemeContext from '../UI/Theme/GDevelopThemeContext'; +...
newIDE/app/src/MainFrame/TabsTitlebarTooltip.js
0
JavaScript
1
none
16
51
51
true
Add tooltip for tabs
7,482
4ian/GDevelop
10,154
JavaScript
AlexandreSi
Review this pull request change. Language: JavaScript File: newIDE/app/src/MainFrame/TabsTitlebarTooltip.js PR Title: Add tooltip for tabs BEFORE CODE: const TabsTitlebarTooltip = ({ anchorElement, editorTab }: Props) => { const gdevelopTheme = React.useContext(GDevelopThemeContext); const [tooltipStyle, se...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
_fetchUserGameTemplates = async () => { const { authentication } = this.props; const firebaseUser = this.state.authenticatedUser.firebaseUser; if (!firebaseUser) return; try { const receivedGameTemplates = await listReceivedGameTemplates( authentication.getAuthorizationHeader, ...
No issues found.
_fetchUserGameTemplates = async () => { const { authentication } = this.props; const firebaseUser = this.state.authenticatedUser.firebaseUser; if (!firebaseUser) return; try { const receivedGameTemplates = await listReceivedGameTemplates( authentication.getAuthorizationHeader, ...
@@ -41,9 +41,7 @@ import CreateAccountDialog from './CreateAccountDialog'; import EditProfileDialog from './EditProfileDialog'; import ChangeEmailDialog from './ChangeEmailDialog'; import EmailVerificationDialog from './EmailVerificationDialog'; -import PreferencesContext, { - type PreferencesValues, -} from '../Ma...
newIDE/app/src/Profile/AuthenticatedUserProvider.js
0
JavaScript
1
none
16
51
51
true
Fix "Manage subscription" button not working
7,507
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/Profile/AuthenticatedUserProvider.js PR Title: Fix "Manage subscription" button not working BEFORE CODE: _fetchUserGameTemplates = async () => { const { authentication } = this.props; const firebaseUser = this.state.authenticatedU...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
type Props = {| anchorElement: HTMLElement, editorTab: EditorTab, |}; const TabsTitlebarTooltip = ({ anchorElement, editorTab }: Props) => { const gdevelopTheme = React.useContext(GDevelopThemeContext); const [tooltipStyle, setTooltipStyle] = React.useState<Object>( styles.tooltip ); const ...
No issues found.
type Props = {| anchorElement: HTMLElement, editorTab: EditorTab, |}; const TabsTitlebarTooltip = ({ anchorElement, editorTab }: Props) => { const gdevelopTheme = React.useContext(GDevelopThemeContext); const [tooltipStyle, setTooltipStyle] = React.useState<Object>( styles.tooltip ); const ...
@@ -12,7 +12,6 @@ import { type EditorKind, } from './EditorTabs/EditorTabsHandler'; import { ColumnStackLayout } from '../UI/Layout'; -import { Line } from '../UI/Grid'; import Text from '../UI/Text'; const editorKindToLabel: { [kind: EditorKind]: React.Node } = { @@ -25,6 +24,7 @@ const editorKindToLa...
newIDE/app/src/MainFrame/TabsTitlebarTooltip.js
0
JavaScript
1
none
16
51
51
true
Fix tab tooltip being stuck when closing tab + improve design
7,513
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/MainFrame/TabsTitlebarTooltip.js PR Title: Fix tab tooltip being stuck when closing tab + improve design BEFORE CODE: type Props = {| anchorElement: HTMLElement, editorTab: EditorTab, |}; const TabsTitlebarTooltip = ({ anchorElemen...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
onResourcePathUpdated(); forceUpdate(); await resourceManagementProps.onFetchNewlyAddedResources(); }, [resourceManagementProps, resources, onResourcePathUpdated, forceUpdate] ); const resourceSources = React.useMemo( () => { const storageProvider = resourceM...
No issues found.
onResourcePathUpdated(); forceUpdate(); await resourceManagementProps.onFetchNewlyAddedResources(); }, [resourceManagementProps, resources, onResourcePathUpdated, forceUpdate] ); const resourceSources = React.useMemo( () => { const storageProvider = resourceM...
@@ -85,6 +85,23 @@ const ResourcePropertiesEditor = React.forwardRef< [resourceManagementProps, resources, onResourcePathUpdated, forceUpdate] ); + const resourceSources = React.useMemo( + () => { + const storageProvider = resourceManagementProps.getStorageProvider(); + return resour...
newIDE/app/src/ResourcesEditor/ResourcePropertiesEditor/index.js
0
JavaScript
1
none
16
51
51
true
Update worker url logic + consistent lights + fix using in resources list
7,551
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/ResourcesEditor/ResourcePropertiesEditor/index.js PR Title: Update worker url logic + consistent lights + fix using in resources list BEFORE CODE: onResourcePathUpdated(); forceUpdate(); await resourceManagementProp...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return buildLastWeekChartData(lastWeekGameMetrics); }, [gameMetrics, oneWeekAgoIsoDate] ); return ( <> <I18n> {({ i18n }) => ( <DashboardWidget widgetSize={'twoThirds'} minHeight title={<Trans>Analytics</Trans>} topRightActio...
No issues found.
return buildLastWeekChartData(lastWeekGameMetrics); }, [gameMetrics, oneWeekAgoIsoDate] ); return ( <> <I18n> {({ i18n }) => ( <DashboardWidget widgetSize={'twoThirds'} minHeight title={<Trans>Analytics</Trans>} topRightActio...
@@ -119,7 +119,7 @@ const AnalyticsWidget = ({ game, onSeeAll, gameMetrics, gameUrl }: Props) => { ) : ( <Column expand noMargin> <Line alignItems="center" justifyContent="space-between"> - <Text size="block-title" noMargin> + <Tex...
newIDE/app/src/GameDashboard/Widgets/AnalyticsWidget.js
0
JavaScript
1
none
16
51
51
true
Add tooltip in game analytics
7,559
4ian/GDevelop
10,154
JavaScript
Bouh
Review this pull request change. Language: JavaScript File: newIDE/app/src/GameDashboard/Widgets/AnalyticsWidget.js PR Title: Add tooltip in game analytics BEFORE CODE: return buildLastWeekChartData(lastWeekGameMetrics); }, [gameMetrics, oneWeekAgoIsoDate] ); return ( <> <I18n> ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
(effect: gdEffect) => { effectsContainer.removeEffect(effect.getName()); onUpdate(); onEffectsUpdated(); }, [effectsContainer, onUpdate, onEffectsUpdated] ); const copyEffect = React.useCallback( (effect: gdEffect) => { Clipboard.set(EFFECTS_CLIPBOARD_KIND, [ { ...
No issues found.
(effect: gdEffect) => { effectsContainer.removeEffect(effect.getName()); onUpdate(); onEffectsUpdated(); }, [effectsContainer, onUpdate, onEffectsUpdated] ); const copyEffect = React.useCallback( (effect: gdEffect) => { Clipboard.set(EFFECTS_CLIPBOARD_KIND, [ { ...
@@ -53,6 +53,8 @@ import PasteIcon from '../UI/CustomSvgIcons/Clipboard'; import CopyIcon from '../UI/CustomSvgIcons/Copy'; import { type ConnectDragSource } from 'react-dnd'; import ResponsiveFlatButton from '../UI/ResponsiveFlatButton'; +import { Accordion, AccordionHeader, AccordionBody } from '../UI/Accordion'; ...
newIDE/app/src/EffectsList/index.js
0
JavaScript
1
none
16
51
51
true
[DRAFT] implementation of Shadowmapping
7,592
4ian/GDevelop
10,154
JavaScript
NeylMahfouf2608
Review this pull request change. Language: JavaScript File: newIDE/app/src/EffectsList/index.js PR Title: [DRAFT] implementation of Shadowmapping BEFORE CODE: (effect: gdEffect) => { effectsContainer.removeEffect(effect.getName()); onUpdate(); onEffectsUpdated(); }, [effectsContainer, ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} else if (input === 'Release Ladder') { this._releaseLadderKey = true; } } /**. * @param input The control to be tested [Left,Right,Up,Down,Ladder,Jump,Release,Release Ladder]. * @returns true if the key was used since the last `doStepPreEvents` call. */ isUsingControl(i...
No issues found.
} else if (input === 'Release Ladder') { this._releaseLadderKey = true; } } /**. * @param input The control to be tested [Left,Right,Up,Down,Ladder,Jump,Release,Release Ladder]. * @returns true if the key was used since the last `doStepPreEvents` call. */ isUsingControl(i...
@@ -23,7 +23,6 @@ namespace gdjs { interface JumpingStateNetworkSyncData { cjs: number; tscjs: number; - jkhsjs: boolean; jfd: boolean; } @@ -57,6 +56,7 @@ namespace gdjs { juk: boolean; rpk: boolean; rlk: boolean; + jkhsjs: boolean; sn: string; ssd: StateNetworkSyn...
Extensions/PlatformBehavior/platformerobjectruntimebehavior.ts
0
TypeScript
1
none
16
51
51
true
[Platformer] Forbid repeated jumps while holding the jump key
7,648
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: TypeScript File: Extensions/PlatformBehavior/platformerobjectruntimebehavior.ts PR Title: [Platformer] Forbid repeated jumps while holding the jump key BEFORE CODE: } else if (input === 'Release Ladder') { this._releaseLadderKey = true; } } /**...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
threeObject3D.position.set( this._object.isFlippedX() ? pivotX : -pivotX, this._object.isFlippedY() ? pivotY : -pivotY, this._object.isFlippedZ() ? pivotZ : -pivotZ ); threeObject3D.position.applyEuler(threeObject3D.rotation); threeObject3D.position.x += this._object.get...
No issues found.
threeObject3D.position.set( this._object.isFlippedX() ? pivotX : -pivotX, this._object.isFlippedY() ? pivotY : -pivotY, this._object.isFlippedZ() ? pivotZ : -pivotZ ); threeObject3D.position.applyEuler(threeObject3D.rotation); threeObject3D.position.x += this._object.get...
@@ -44,10 +44,7 @@ namespace gdjs { ) { this._object = object; this._isContainerDirty = true; - const layer = parent.getLayer(''); - if (layer) { - layer.getRenderer().add3DRendererObject(this._threeGroup); - } + this._threeGroup.clear(); } _updateThreeGroup() {
Extensions/3D/CustomRuntimeObject3DRenderer.ts
0
TypeScript
1
none
16
51
51
true
Fix changing of variant not being applied at hot-reload
7,666
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: TypeScript File: Extensions/3D/CustomRuntimeObject3DRenderer.ts PR Title: Fix changing of variant not being applied at hot-reload BEFORE CODE: threeObject3D.position.set( this._object.isFlippedX() ? pivotX : -pivotX, this._object.isFlippedY() ? pivot...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
.addIncludeFile('Extensions/Multiplayer/multiplayerVariablesManager.js') .addIncludeFile('Extensions/Multiplayer/multiplayertools.js') .setFunctionName( 'gdjs.multiplayerMessageManager.getLatestPlayerWhoJustLeft' ); extension .addCondition( 'HasAnyPlayerJoined', ...
No issues found.
.addIncludeFile('Extensions/Multiplayer/multiplayerVariablesManager.js') .addIncludeFile('Extensions/Multiplayer/multiplayertools.js') .setFunctionName( 'gdjs.multiplayerMessageManager.getLatestPlayerWhoJustLeft' ); extension .addCondition( 'HasAnyPlayerJoined', ...
@@ -31,6 +31,73 @@ module.exports = { .addInstructionOrExpressionGroupMetadata(_('Multiplayer')) .setIcon('JsPlatform/Extensions/multiplayer.svg'); + extension + .addStrExpression( + 'CurrentLobbyID', + _('Current lobby ID'), + _('Returns current lobby ID.'), + _('Lob...
Extensions/Multiplayer/JsExtension.js
0
JavaScript
1
none
16
51
51
true
Added action "Join a specific lobby by its ID" and expression "Current lobby ID"
7,694
4ian/GDevelop
10,154
JavaScript
Jurfix
Review this pull request change. Language: JavaScript File: Extensions/Multiplayer/JsExtension.js PR Title: Added action "Join a specific lobby by its ID" and expression "Current lobby ID" BEFORE CODE: .addIncludeFile('Extensions/Multiplayer/multiplayerVariablesManager.js') .addIncludeFile('Extensions/M...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
target: 'object', }); // Events based object children: const eventsBasedObject = project.hasEventsBasedObject( objectConfiguration.getType() ) ? project.getEventsBasedObject(objectConfiguration.getType()) : null; const customObjectConfiguration = eventsBasedObject ? gd.asCustomObjectConfi...
No issues found.
target: 'object', }); // Events based object children: const eventsBasedObject = project.hasEventsBasedObject( objectConfiguration.getType() ) ? project.getEventsBasedObject(objectConfiguration.getType()) : null; const customObjectConfiguration = eventsBasedObject ? gd.asCustomObjectConfi...
@@ -53,6 +53,7 @@ import Window from '../../Utils/Window'; import CompactTextField from '../../UI/CompactTextField'; import { textEllipsisStyle } from '../../UI/TextEllipsis'; import Link from '../../UI/Link'; +import { getVariantName } from '../Editors/CustomObjectPropertiesEditor'; const gd: libGDevelop = globa...
newIDE/app/src/ObjectEditor/CompactObjectPropertiesEditor/index.js
0
JavaScript
1
none
16
51
51
true
Various fixes for variants
7,739
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/ObjectEditor/CompactObjectPropertiesEditor/index.js PR Title: Various fixes for variants BEFORE CODE: target: 'object', }); // Events based object children: const eventsBasedObject = project.hasEventsBasedObject( objectConfigu...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (conditionInverted) predicate = GenerateNegatedPredicate(predicate); // Generate whole condition code conditionCode += "for (var i = 0, k = 0, l = " + GetObjectListName(objectName, context) + ".length;i<l;++i) {\n"; conditionCode += " if ( " + predicate + " ) {\n"; conditionCode += " ...
No issues found.
if (conditionInverted) predicate = GenerateNegatedPredicate(predicate); // Generate whole condition code conditionCode += "for (var i = 0, k = 0, l = " + GetObjectListName(objectName, context) + ".length;i<l;++i) {\n"; conditionCode += " if ( " + predicate + " ) {\n"; conditionCode += " ...
@@ -1228,14 +1228,11 @@ gd::String EventsCodeGenerator::GenerateParameterCodes( // Code only parameter type else if (metadata.GetType() == "objectsContext") { argOutput = - "(typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext " - ": runtimeScene)"; + HasProjectAndLayout...
GDJS/GDJS/Events/CodeGeneration/EventsCodeGenerator.cpp
0
C++
1
none
16
51
51
true
Optimize event-function calls
7,758
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: C++ File: GDJS/GDJS/Events/CodeGeneration/EventsCodeGenerator.cpp PR Title: Optimize event-function calls BEFORE CODE: if (conditionInverted) predicate = GenerateNegatedPredicate(predicate); // Generate whole condition code conditionCode += "for (var i = 0, k ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} /** * Get the font size of the characters of the object. */ getCharacterSize(): number { return this._characterSize; } /** * Set the font size for characters of the object. * @param newSize The new font size for the text. */ setCharacterSize(newSize: number): v...
No issues found.
} /** * Get the font size of the characters of the object. */ getCharacterSize(): number { return this._characterSize; } /** * Set the font size for characters of the object. * @param newSize The new font size for the text. */ setCharacterSize(newSize: number): v...
@@ -602,16 +602,10 @@ namespace gdjs { /** * Change the text color. - * @param colorString color as a "R;G;B" string, for example: "255;0;0" + * @param rgbOrHexColor color as a "R;G;B" string, for example: "255;0;0" */ - setColor(colorString: string): void { - const color = colorStrin...
Extensions/TextObject/textruntimeobject.ts
0
TypeScript
1
none
16
51
51
true
Fix the tint action of Sprite to handle floating point color components
7,772
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: TypeScript File: Extensions/TextObject/textruntimeobject.ts PR Title: Fix the tint action of Sprite to handle floating point color components BEFORE CODE: } /** * Get the font size of the characters of the object. */ getCharacterSize(): number { ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/** * Return a PIXI texture which can be used as a placeholder when no * suitable texture can be found. */ getInvalidPIXITexture() { return this._invalidTexture; } /** * Load the specified resources, so that textures are loaded and can then be * used by calling `getPIXITe...
No issues found.
/** * Return a PIXI texture which can be used as a placeholder when no * suitable texture can be found. */ getInvalidPIXITexture() { return this._invalidTexture; } /** * Load the specified resources, so that textures are loaded and can then be * used by calling `getPIXITe...
@@ -55,7 +55,7 @@ namespace gdjs { * Map associating a resource name to the loaded Three.js texture. */ private _loadedThreeTextures: Hashtable<THREE.Texture>; - private _loadedThreeMaterials: Hashtable<THREE.Material>; + private _loadedThreeMaterials = new ThreeMaterialCache(); private _d...
GDJS/Runtime/pixi-renderers/pixi-image-manager.ts
0
TypeScript
1
none
16
51
51
true
Fix cached materials not being cleared when unloading resources
7,780
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: TypeScript File: GDJS/Runtime/pixi-renderers/pixi-image-manager.ts PR Title: Fix cached materials not being cleared when unloading resources BEFORE CODE: /** * Return a PIXI texture which can be used as a placeholder when no * suitable texture can be found. ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
extensionShortHeader ); installedOrImportedExtensionName = wasExtensionInstalledOrImported ? extensionShortHeader.name : null; } else { installedOrImportedExtensionName = await importExtension( i18n, eventsFunctionsExtensionsState, ...
No issues found.
extensionShortHeader ); installedOrImportedExtensionName = wasExtensionInstalledOrImported ? extensionShortHeader.name : null; } else { installedOrImportedExtensionName = await importExtension( i18n, eventsFunctionsExtensionsState, ...
@@ -20,6 +20,7 @@ import { useResponsiveWindowSize } from '../../UI/Responsive/ResponsiveWindowMea import Download from '../../UI/CustomSvgIcons/Download'; import Add from '../../UI/CustomSvgIcons/Add'; import ErrorBoundary from '../../UI/ErrorBoundary'; +import useAlertDialog from '../../UI/Alert/useAlertDialog'; ...
newIDE/app/src/AssetStore/ExtensionStore/ExtensionsSearchDialog.js
0
JavaScript
1
none
16
51
51
true
Forbid to import an extension which has the same name as a built-in one
7,822
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/AssetStore/ExtensionStore/ExtensionsSearchDialog.js PR Title: Forbid to import an extension which has the same name as a built-in one BEFORE CODE: extensionShortHeader ); installedOrImportedExtensionName = wasExtens...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
<span> <Column> <DragHandleIcon /> </Column> </span> )} <Respons...
No issues found.
<span> <Column> <DragHandleIcon /> </Column> </span> )} <Respons...
@@ -15,7 +15,7 @@ import ElementWithMenu from '../UI/Menu/ElementWithMenu'; import SemiControlledTextField from '../UI/SemiControlledTextField'; import newNameGenerator from '../Utils/NewNameGenerator'; import { ResponsiveLineStackLayout, ColumnStackLayout } from '../UI/Layout'; -import StringArrayEditor from '../St...
newIDE/app/src/EventsBasedBehaviorEditor/EventsBasedBehaviorPropertiesEditor.js
0
JavaScript
1
none
16
51
51
true
Allow extensions to define labels for properties with string selectors
7,825
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/EventsBasedBehaviorEditor/EventsBasedBehaviorPropertiesEditor.js PR Title: Allow extensions to define labels for properties with string selectors BEFORE CODE: <span> <...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
'\n' + (extension.getHelpPath() ? `\n[Read more...](${helpPageUrl})\n` : ``) + '\n' + `!!! tip Learn [how to install new extensions](/gdevelop5/extensions/search) by following a step-by-step guide.` + '\n', }; }; /** @returns {RawText} */ const generateExtensionFooterText = ({ exten...
No issues found.
'\n' + (extension.getHelpPath() ? `\n[Read more...](${helpPageUrl})\n` : ``) + '\n' + `!!! tip Learn [how to install new extensions](/gdevelop5/extensions/search) by following a step-by-step guide.` + '\n', }; }; /** @returns {RawText} */ const generateExtensionFooterText = ({ exten...
@@ -26,7 +26,7 @@ const { mapVector, mapFor } = require('./lib/MapFor'); /** @typedef {import("./lib/ExtensionReferenceGenerator.js").RawText} RawText */ -/** @typedef {{ tier: 'community' | 'reviewed', shortDescription: string, authorIds: Array<string>, authors?: Array<{id: string, username: string}>, extensionNa...
newIDE/app/scripts/extract-extensions-document.js
0
JavaScript
1
none
16
51
51
true
Rename "community" extensions as "experimental" extensions
7,828
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/scripts/extract-extensions-document.js PR Title: Rename "community" extensions as "experimental" extensions BEFORE CODE: '\n' + (extension.getHelpPath() ? `\n[Read more...](${helpPageUrl})\n` : ``) + '\n' + `!!! tip L...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
#include "GDCore/Tools/Log.h" namespace gd { VariablesContainer EventsVariableInstructionTypeSwitcher::nullVariablesContainer; bool EventsVariableInstructionTypeSwitcher::DoVisitInstruction(gd::Instruction& instruction, bool isCondition) { const auto& metadata = isCo...
No issues found.
#include "GDCore/Tools/Log.h" namespace gd { VariablesContainer EventsVariableInstructionTypeSwitcher::nullVariablesContainer; bool EventsVariableInstructionTypeSwitcher::DoVisitInstruction(gd::Instruction& instruction, bool isCondition) { const auto& metadata = isCo...
@@ -42,18 +42,16 @@ bool EventsVariableInstructionTypeSwitcher::DoVisitInstruction(gd::Instruction& platform, instruction.GetType()); gd::ParameterMetadataTools::IterateOverParametersWithIndex( - instruction.GetParameters(), - metadata.GetParameters(), - [&](const...
Core/GDCore/IDE/Events/EventsVariableInstructionTypeSwitcher.cpp
0
C++
1
none
16
51
51
true
Fix a crash at runtime when behaviors are missing in functions
7,830
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: C++ File: Core/GDCore/IDE/Events/EventsVariableInstructionTypeSwitcher.cpp PR Title: Fix a crash at runtime when behaviors are missing in functions BEFORE CODE: #include "GDCore/Tools/Log.h" namespace gd { VariablesContainer EventsVariableInstructionTypeSwitcher::nullVar...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (resourceName === '') { return this._invalidTexture; } const resource = this._getImageResource(resourceName); if (!resource) { logger.warn( 'Unable to find video texture for resource "' + resourceName + '".' ); return this._invalidTexture; } ...
No issues found.
if (resourceName === '') { return this._invalidTexture; } const resource = this._getImageResource(resourceName); if (!resource) { logger.warn( 'Unable to find video texture for resource "' + resourceName + '".' ); return this._invalidTexture; } ...
@@ -56,6 +56,11 @@ namespace gdjs { */ private _loadedThreeTextures: Hashtable<THREE.Texture>; private _loadedThreeMaterials = new ThreeMaterialCache(); + private _loadedThreeCubeTextures = new Map<string, THREE.CubeTexture>(); + private _loadedThreeCubeTextureKeysByResourceName = new ArrayMap< + ...
GDJS/Runtime/pixi-renderers/pixi-image-manager.ts
0
TypeScript
1
none
16
51
51
true
Add a skybox filter
7,843
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: TypeScript File: GDJS/Runtime/pixi-renderers/pixi-image-manager.ts PR Title: Add a skybox filter BEFORE CODE: if (resourceName === '') { return this._invalidTexture; } const resource = this._getImageResource(resourceName); if (!resource) { ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
setSelectedBundleListingData, ] = React.useState<?BundleListingData>(null); const { courses, getCourseCompletion } = useCourses(); const { bundleListingDatas } = React.useContext(BundleStoreContext); React.useEffect( () => { const bundleCategory = routeArguments['bundle-category']; if (!bund...
No issues found.
setSelectedBundleListingData, ] = React.useState<?BundleListingData>(null); const { courses, getCourseCompletion } = useCourses(); const { bundleListingDatas } = React.useContext(BundleStoreContext); React.useEffect( () => { const bundleCategory = routeArguments['bundle-category']; if (!bund...
@@ -0,0 +1,120 @@ +// @flow +import { Trans } from '@lingui/macro'; + +import React from 'react'; +import Dialog from '../UI/Dialog'; +import PlaceholderLoader from '../UI/PlaceholderLoader'; +import ErrorBoundary from '../UI/ErrorBoundary'; +import RouterContext from './RouterContext'; +import { BundleStoreContext } f...
newIDE/app/src/MainFrame/StandAloneDialog.js
0
JavaScript
1
none
16
51
51
true
Create a standalone page that can be used for bundles
7,861
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/MainFrame/StandAloneDialog.js PR Title: Create a standalone page that can be used for bundles BEFORE CODE: setSelectedBundleListingData, ] = React.useState<?BundleListingData>(null); const { courses, getCourseCompletion } = useCourse...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
gridOffsetX: number, gridOffsetY: number, gridColor: number, gridAlpha: number, /** Is snap to grid activated? */ snap: boolean, /** The zoom of the editor, 1 by default. */ zoomFactor: number, /** Is the window mask shown? */ windowMask: boolean, /** The name of the layer selected to place in...
No issues found.
gridOffsetX: number, gridOffsetY: number, gridColor: number, gridAlpha: number, /** Is snap to grid activated? */ snap: boolean, /** The zoom of the editor, 1 by default. */ zoomFactor: number, /** Is the window mask shown? */ windowMask: boolean, /** The name of the layer selected to place in...
@@ -20,6 +20,9 @@ export type InstancesEditorSettings = {| /** Is the window mask shown? */ windowMask: boolean, + + /** The name of the layer selected to place instances on. */ + selectedLayer: string, |}; export const getRecommendedInitialZoomFactor = ( @@ -54,6 +57,7 @@ export const prepareInstancesEdi...
newIDE/app/src/InstancesEditor/InstancesEditorSettings.js
0
JavaScript
1
none
16
51
51
true
fix(instances-editor): persist selected layer across sessions
7,879
4ian/GDevelop
10,154
JavaScript
Digvijay-x1
Review this pull request change. Language: JavaScript File: newIDE/app/src/InstancesEditor/InstancesEditorSettings.js PR Title: fix(instances-editor): persist selected layer across sessions BEFORE CODE: gridOffsetX: number, gridOffsetY: number, gridColor: number, gridAlpha: number, /** Is snap to grid ac...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
isVisible(): boolean { return !this.hidden; } /** * Return true if the object is hidden. * @return true if the object is hidden. */ isHidden(): boolean { return this.hidden; } /** * Set the width of the object, if applicable. * @param width The new width in...
No issues found.
isVisible(): boolean { return !this.hidden; } /** * Return true if the object is hidden. * @return true if the object is hidden. */ isHidden(): boolean { return this.hidden; } /** * Set the width of the object, if applicable. * @param width The new width in...
@@ -842,6 +842,12 @@ namespace gdjs { return this.getY(); } + /** + * Rotate the object towards another object position. + * @param x The target x position + * @param y The target y position + * @param speed The rotation speed. 0 for an immediate rotation to the target position. + *...
GDJS/Runtime/runtimeobject.ts
0
TypeScript
1
none
16
51
51
true
Add "Pick Nearest" and "Rotate toward object" action
7,883
4ian/GDevelop
10,154
JavaScript
4ian
Review this pull request change. Language: TypeScript File: GDJS/Runtime/runtimeobject.ts PR Title: Add "Pick Nearest" and "Rotate toward object" action BEFORE CODE: isVisible(): boolean { return !this.hidden; } /** * Return true if the object is hidden. * @return true if the object is ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
); const onOpenHistory = React.useCallback(() => { setIsHistoryOpen(true); }, []); const onCloseHistory = React.useCallback(() => { setIsHistoryOpen(false); }, []); const { aiRequestStorage, editorFunctionCallResultsStorage, getAiSettings, ...
No issues found.
); const onOpenHistory = React.useCallback(() => { setIsHistoryOpen(true); }, []); const onCloseHistory = React.useCallback(() => { setIsHistoryOpen(false); }, []); const { aiRequestStorage, editorFunctionCallResultsStorage, getAiSettings, ...
@@ -692,7 +692,7 @@ export const AskAiEditor = React.memo<Props>( fileMetadata, storageProviderName, mode, - toolsVersion: 'v3', + toolsVersion: 'v4', aiConfiguration: { presetId: aiConfigurationPresetId...
newIDE/app/src/AiGeneration/AskAiEditorContainer.js
0
JavaScript
1
none
16
51
51
true
Adapt editor function to duplicate object
7,889
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/AiGeneration/AskAiEditorContainer.js PR Title: Adapt editor function to duplicate object BEFORE CODE: ); const onOpenHistory = React.useCallback(() => { setIsHistoryOpen(true); }, []); const onCloseHistory =...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
}, [setSelectedAiRequestId] ); const onOpenHistory = React.useCallback(() => { setIsHistoryOpen(true); }, []); const onCloseHistory = React.useCallback(() => { setIsHistoryOpen(false); }, []); const { aiRequestStorage, editorFunction...
No issues found.
}, [setSelectedAiRequestId] ); const onOpenHistory = React.useCallback(() => { setIsHistoryOpen(true); }, []); const onCloseHistory = React.useCallback(() => { setIsHistoryOpen(false); }, []); const { aiRequestStorage, editorFunction...
@@ -6,6 +6,8 @@ import { type RenderEditorContainerPropsWithRef, type SceneEventsOutsideEditorChanges, type InstancesOutsideEditorChanges, + type ObjectsOutsideEditorChanges, + type ObjectGroupsOutsideEditorChanges, } from '../MainFrame/EditorContainers/BaseEditor'; import { type ObjectWithContext } from '...
newIDE/app/src/AiGeneration/AskAiEditorContainer.js
0
JavaScript
1
none
16
51
51
true
New Editor function to update scene groups
7,910
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/AiGeneration/AskAiEditorContainer.js PR Title: New Editor function to update scene groups BEFORE CODE: }, [setSelectedAiRequestId] ); const onOpenHistory = React.useCallback(() => { setIsHistoryOpen(true)...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
pixiContainer: PIXI.Container, pixiResourcesLoader: Class<PixiResourcesLoader> ) { super( project, instance, //$FlowFixMe It's ok because RenderedUnknownInstance don't use it. associatedObjectConfiguration, pixiContainer, pixiResourcesLoader ); //This renderer ...
No issues found.
pixiContainer: PIXI.Container, pixiResourcesLoader: Class<PixiResourcesLoader> ) { super( project, instance, //$FlowFixMe It's ok because RenderedUnknownInstance don't use it. associatedObjectConfiguration, pixiContainer, pixiResourcesLoader ); //This renderer ...
@@ -11,20 +11,23 @@ export default class RenderedUnknownInstance extends RenderedInstance { constructor( project: gdProject, instance: gdInitialInstance, - associatedObjectConfiguration: gdObjectConfiguration, + associatedObjectConfiguration: gdObjectConfiguration | null, pixiContainer: PIXI.Con...
newIDE/app/src/ObjectsRendering/Renderers/RenderedUnknownInstance.js
0
JavaScript
1
none
16
51
51
true
Display a placeholder for instances with unknown objects in the editor
7,933
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/ObjectsRendering/Renderers/RenderedUnknownInstance.js PR Title: Display a placeholder for instances with unknown objects in the editor BEFORE CODE: pixiContainer: PIXI.Container, pixiResourcesLoader: Class<PixiResourcesLoader> ) { ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
project: ?gdProject, resourceManagementProps: ResourceManagementProps, onExtensionInstalled: (extensionNames: Array<string>) => void, |}) => { const { profile, getAuthorizationHeader } = React.useContext( AuthenticatedUserContext ); const installAsset = useInstallAsset({ project, resourceManagem...
No issues found.
project: ?gdProject, resourceManagementProps: ResourceManagementProps, onExtensionInstalled: (extensionNames: Array<string>) => void, |}) => { const { profile, getAuthorizationHeader } = React.useContext( AuthenticatedUserContext ); const installAsset = useInstallAsset({ project, resourceManagem...
@@ -34,7 +34,7 @@ export const useSearchAndInstallAsset = ({ return { searchAndInstallAsset: React.useCallback( async ({ - scene, + objectsContainer, objectName, ...assetSearchOptions }: AssetSearchAndInstallOptions): Promise<AssetSearchAndInstallResult> => { @@ -63...
newIDE/app/src/AiGeneration/UseSearchAndInstallAsset.js
0
JavaScript
1
none
16
51
51
true
Object Editor Functions handle global scope
7,959
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/AiGeneration/UseSearchAndInstallAsset.js PR Title: Object Editor Functions handle global scope BEFORE CODE: project: ?gdProject, resourceManagementProps: ResourceManagementProps, onExtensionInstalled: (extensionNames: Array<string>) =>...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// TODO Remove the ternary when all parameter declarations use // 'number' instead of 'expression'. const parameterType: string = parameterMetadata.getType() === 'expression' ? 'number' : parameterMetadata.getType(); let expressionIsValid =...
No issues found.
// TODO Remove the ternary when all parameter declarations use // 'number' instead of 'expression'. const parameterType: string = parameterMetadata.getType() === 'expression' ? 'number' : parameterMetadata.getType(); let expressionIsValid =...
@@ -45,10 +45,7 @@ import { import { enumerateParametersUsableInExpressions } from '../ParameterFields/EnumerateFunctionParameters'; import { getFunctionNameFromType } from '../../EventsFunctionsExtensionsLoader'; import { ExtensionStoreContext } from '../../AssetStore/ExtensionStore/ExtensionStoreContext'; -import ...
newIDE/app/src/EventsSheet/EventsTree/Instruction.js
0
JavaScript
1
none
16
51
51
true
Show object parameters in red if any behavior parameter is wrongly filled
7,997
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/EventsSheet/EventsTree/Instruction.js PR Title: Show object parameters in red if any behavior parameter is wrongly filled BEFORE CODE: // TODO Remove the ternary when all parameter declarations use // 'number' instead of ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
); const duplicateAndEditVariant = React.useCallback( (i18n: I18nType, newName: string) => { duplicateVariant( newName, customObjectConfiguration, customObjectEventsBasedObject, customObjectExtension, project, i18n ); setDuplicateAndEditVariantD...
No issues found.
); const duplicateAndEditVariant = React.useCallback( (i18n: I18nType, newName: string) => { duplicateVariant( newName, customObjectConfiguration, customObjectEventsBasedObject, customObjectExtension, project, i18n ); setDuplicateAndEditVariantD...
@@ -25,7 +25,9 @@ import { type ResourceManagementProps } from '../../ResourcesList/ResourceSource import Paper from '../../UI/Paper'; import { ColumnStackLayout, LineStackLayout } from '../../UI/Layout'; import { IconContainer } from '../../UI/IconContainer'; -import Remove from '../../UI/CustomSvgIcons/Remove'; +i...
newIDE/app/src/ObjectEditor/CompactObjectPropertiesEditor/index.js
0
JavaScript
1
none
16
51
51
true
Allow to set effects as initially disabled
8,002
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/ObjectEditor/CompactObjectPropertiesEditor/index.js PR Title: Allow to set effects as initially disabled BEFORE CODE: ); const duplicateAndEditVariant = React.useCallback( (i18n: I18nType, newName: string) => { duplicateVarian...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
extensionShortHeader ) ) { // Allow to reinstall the extension even if the versions match. requiredExtensionInstallation.missingExtensionShortHeaders.push( extensionShortHeader ); } const wasExtensionInstalled = aw...
No issues found.
extensionShortHeader ) ) { // Allow to reinstall the extension even if the versions match. requiredExtensionInstallation.missingExtensionShortHeaders.push( extensionShortHeader ); } const wasExtensionInstalled = aw...
@@ -93,6 +93,16 @@ const ExtensionsSearchDialog = ({ extensionShortHeadersByName, } ); + if ( + !requiredExtensionInstallation.missingExtensionShortHeaders.includes( + extensionShortHeader + ) + ) { + // Allow to rein...
newIDE/app/src/AssetStore/ExtensionStore/ExtensionsSearchDialog.js
0
JavaScript
1
none
16
51
51
true
Fix extension reinstall wasn't doing anything
8,017
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/AssetStore/ExtensionStore/ExtensionsSearchDialog.js PR Title: Fix extension reinstall wasn't doing anything BEFORE CODE: extensionShortHeader ) ) { // Allow to reinstall the extension even if t...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
}: Props) => { const [ shouldShowDeprecatedProperties, setShouldShowDeprecatedProperties, ] = React.useState<boolean>(false); const basicPropertiesSchema = React.useMemo( () => propertiesMapToSchema( propertiesValues, behavior => behavior.getProperties(), (behavior, name...
No issues found.
}: Props) => { const [ shouldShowDeprecatedProperties, setShouldShowDeprecatedProperties, ] = React.useState<boolean>(false); const basicPropertiesSchema = React.useMemo( () => propertiesMapToSchema( propertiesValues, behavior => behavior.getProperties(), (behavior, name...
@@ -0,0 +1,220 @@ +// @flow +import { Trans } from '@lingui/macro'; + +import * as React from 'react'; +import PropertiesEditor, { + type Schema, + type Instances, +} from '../PropertiesEditor'; +import propertiesMapToSchema from '../PropertiesEditor/PropertiesMapToSchema'; +import EmptyMessage from '../UI/EmptyMessa...
newIDE/app/src/PropertiesEditor/PropertiesEditorByVisibility.js
0
JavaScript
1
none
16
51
51
true
Collapse advanced properties in the object editor
8,028
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/PropertiesEditor/PropertiesEditorByVisibility.js PR Title: Collapse advanced properties in the object editor BEFORE CODE: }: Props) => { const [ shouldShowDeprecatedProperties, setShouldShowDeprecatedProperties, ] = React.useStat...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (!remote) return; return remote.getCurrentWindow().on('focus', cb); } static onBlur(cb: () => void) { if (!remote) return; return remote.getCurrentWindow().on('blur', cb); } static onClose(cb: () => void) { if (!remote) return; return remote.getCurrentWindow().on('close', cb); ...
No issues found.
if (!remote) return; return remote.getCurrentWindow().on('focus', cb); } static onBlur(cb: () => void) { if (!remote) return; return remote.getCurrentWindow().on('blur', cb); } static onClose(cb: () => void) { if (!remote) return; return remote.getCurrentWindow().on('close', cb); ...
@@ -406,4 +406,10 @@ export default class Window { const browserWindow = remote.getCurrentWindow(); return browserWindow.isFullScreen(); } + + static toggleMaximize() { + if (!ipcRenderer) return; + + ipcRenderer.invoke('window-maximize-toggle'); + } }
newIDE/app/src/Utils/Window.js
0
JavaScript
1
none
16
51
51
true
feat: Add "window-maximize-toggle" for macOS
8,053
4ian/GDevelop
10,154
JavaScript
ViktorVovk
Review this pull request change. Language: JavaScript File: newIDE/app/src/Utils/Window.js PR Title: feat: Add "window-maximize-toggle" for macOS BEFORE CODE: if (!remote) return; return remote.getCurrentWindow().on('focus', cb); } static onBlur(cb: () => void) { if (!remote) return; return r...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
(await onProgress(loadedCount, sceneState.resourceNames.length)); } ); sceneState.status = 'loaded'; } private async _loadResource(resource: ResourceData): Promise<void> { const resourceManager = this._resourceManagersMap.get(resource.kind); if (!resourceManager) { ...
No issues found.
(await onProgress(loadedCount, sceneState.resourceNames.length)); } ); sceneState.status = 'loaded'; } private async _loadResource(resource: ResourceData): Promise<void> { const resourceManager = this._resourceManagersMap.get(resource.kind); if (!resourceManager) { ...
@@ -28,10 +28,6 @@ namespace gdjs { ); }; - const maxForegroundConcurrency = 20; - const maxBackgroundConcurrency = 5; - const maxAttempt = 3; - /** * A task of pre-loading resources used by a scene. * @@ -104,10 +100,21 @@ namespace gdjs { } } + type PromiseError<T> = { item: T; erro...
GDJS/Runtime/ResourceLoader.ts
0
TypeScript
1
none
16
51
51
true
Fix throw error from load resource in managers for support retries logic
8,060
4ian/GDevelop
10,154
JavaScript
ViktorVovk
Review this pull request change. Language: TypeScript File: GDJS/Runtime/ResourceLoader.ts PR Title: Fix throw error from load resource in managers for support retries logic BEFORE CODE: (await onProgress(loadedCount, sceneState.resourceNames.length)); } ); sceneState.status = 'loade...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return ensureIsArray({ data: response.data, endpointName: '/subscription-plan-pricing-system of Usage API', }); } return ensureIsArray({ data: (await apiClient.get('/subscription-plan-pricing-system', { params, })).data, endpointName: '/subscription-plan-pricing-system of Usag...
No issues found.
return ensureIsArray({ data: response.data, endpointName: '/subscription-plan-pricing-system of Usage API', }); } return ensureIsArray({ data: (await apiClient.get('/subscription-plan-pricing-system', { params, })).data, endpointName: '/subscription-plan-pricing-system of Usag...
@@ -514,17 +514,6 @@ export const changeUserSubscription = async ( }); }; -export const canSeamlesslyChangeSubscription = ( - subscription: Subscription, - planId: string -) => { - // Bringing prices with different currencies prevents subscriptions to be changed seamlessly - // on Stripe. - // TODO: When the...
newIDE/app/src/Utils/GDevelopServices/Usage.js
0
JavaScript
1
none
16
51
51
true
Make clearer warning when stopping subscription with a redemption code
8,070
4ian/GDevelop
10,154
JavaScript
4ian
Review this pull request change. Language: JavaScript File: newIDE/app/src/Utils/GDevelopServices/Usage.js PR Title: Make clearer warning when stopping subscription with a redemption code BEFORE CODE: return ensureIsArray({ data: response.data, endpointName: '/subscription-plan-pricing-system of Usa...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
(hasUnsavedChanges && currentCheckedOutVersionStatus.status === 'unsavedChanges') ) { return currentCheckedOutVersionStatus; } return { version: currentCheckedOutVersionStatus.version, status: 'unsavedChanges', }; }); }, ...
No issues found.
(hasUnsavedChanges && currentCheckedOutVersionStatus.status === 'unsavedChanges') ) { return currentCheckedOutVersionStatus; } return { version: currentCheckedOutVersionStatus.version, status: 'unsavedChanges', }; }); }, ...
@@ -13,7 +13,7 @@ import { } from '../Utils/GDevelopServices/Project'; import type { FileMetadata, StorageProvider } from '../ProjectsStorage'; import AuthenticatedUserContext from '../Profile/AuthenticatedUserContext'; -import { canUseCloudProjectHistory } from '../Utils/GDevelopServices/Usage'; +import { getCloudP...
newIDE/app/src/VersionHistory/UseVersionHistory.js
0
JavaScript
1
none
16
51
51
true
New limits for cloud projects history
8,077
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/VersionHistory/UseVersionHistory.js PR Title: New limits for cloud projects history BEFORE CODE: (hasUnsavedChanges && currentCheckedOutVersionStatus.status === 'unsavedChanges') ) { return currentChec...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return property; } static extractBooleanProperty( anything: any, propertyName: string ): boolean | null { const object = this.extractObject(anything); if (!object) return null; const property = anything[propertyName]; if (typeof property !== 'boolean') return null; return prope...
No issues found.
return property; } static extractBooleanProperty( anything: any, propertyName: string ): boolean | null { const object = this.extractObject(anything); if (!object) return null; const property = anything[propertyName]; if (typeof property !== 'boolean') return null; return prope...
@@ -97,4 +97,24 @@ export class SafeExtractor { return anything; } + + static extractNumberOrStringOrBooleanProperty( + anything: any, + propertyName: string + ): number | string | boolean | null { + const object = this.extractObject(anything); + if (!object) return null; + + const property =...
newIDE/app/src/Utils/SafeExtractor.js
0
JavaScript
1
none
16
51
51
true
feat: Project-specific Editor Settings
8,101
4ian/GDevelop
10,154
JavaScript
malec-palec
Review this pull request change. Language: JavaScript File: newIDE/app/src/Utils/SafeExtractor.js PR Title: feat: Project-specific Editor Settings BEFORE CODE: return property; } static extractBooleanProperty( anything: any, propertyName: string ): boolean | null { const object = this.extract...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return badResource; } const Resource &ResourcesContainer::GetResourceAt(std::size_t index) const { if (index < resources.size()) return *resources[index]; return badResource; } void ResourcesContainer::MoveResource(std::size_t oldIndex, std::size_t newIndex) { if (o...
No issues found.
return badResource; } const Resource &ResourcesContainer::GetResourceAt(std::size_t index) const { if (index < resources.size()) return *resources[index]; return badResource; } void ResourcesContainer::MoveResource(std::size_t oldIndex, std::size_t newIndex) { if (o...
@@ -311,6 +311,20 @@ ResourcesContainer::GetResourcePosition(const gd::String &name) const { return gd::String::npos; } +Resource &ResourcesContainer::GetResourceAt(std::size_t index) { + if (index < resources.size()) + return *resources[index]; + + return badResource; +} + +const Resource &ResourcesContaine...
Core/GDCore/Project/ResourcesContainer.cpp
0
C++
1
none
16
51
51
true
QoL Resource tab with shortcuts
8,115
4ian/GDevelop
10,154
JavaScript
Bouh
Review this pull request change. Language: C++ File: Core/GDCore/Project/ResourcesContainer.cpp PR Title: QoL Resource tab with shortcuts BEFORE CODE: return badResource; } const Resource &ResourcesContainer::GetResourceAt(std::size_t index) const { if (index < resources.size()) return *resources[index]; ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
}, }; this._isAnimationComplete = false; this._rendererObject.state.addListener(onCompleteListener); this._rendererObject.state.setAnimation(0, animation, loop); this._rendererObject.update(0); } } getAnimationDuration(sourceAnimationName: string) { ...
No issues found.
}, }; this._isAnimationComplete = false; this._rendererObject.state.addListener(onCompleteListener); this._rendererObject.state.setAnimation(0, animation, loop); this._rendererObject.update(0); } } getAnimationDuration(sourceAnimationName: string) { ...
@@ -12,6 +12,13 @@ namespace gdjs { computeWorldRotation(bone: pixi_spine.IBone): number; } + interface IExtendedBone extends pixi_spine.IBone { + scaleX: number; + scaleY: number; + rotation: number; + parent: IExtendedBone | null; + } + const isPointAttachment = ( attachment: pixi_spin...
Extensions/Spine/spineruntimeobject-pixi-renderer.ts
0
TypeScript
1
none
16
51
51
true
Add point attachment rotation and scale expression for spine
8,125
4ian/GDevelop
10,154
JavaScript
ViktorVovk
Review this pull request change. Language: TypeScript File: Extensions/Spine/spineruntimeobject-pixi-renderer.ts PR Title: Add point attachment rotation and scale expression for spine BEFORE CODE: }, }; this._isAnimationComplete = false; this._rendererObject.state.addListener(onCo...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
}} value={getFieldValue({ instances, field })} floatingLabelText={getFieldLabel({ instances, field })} floatingLabelFixed helperMarkdownText={getFieldDescription(field)} multiline style={styles.field} /> ); } els...
No issues found.
}} value={getFieldValue({ instances, field })} floatingLabelText={getFieldLabel({ instances, field })} floatingLabelFixed helperMarkdownText={getFieldDescription(field)} multiline style={styles.field} /> ); } els...
@@ -33,6 +33,7 @@ import { type ValueField, type ActionButton, type SectionTitle, + type Title, type ResourceField, type LeaderboardIdField, type Instances, @@ -92,39 +93,68 @@ const getDisabled = ({ : false; }; +export const hasMixedValues = ({ + instances, + field, +}: {| + instances: In...
newIDE/app/src/PropertiesEditor/index.js
0
JavaScript
1
none
16
51
51
true
Add a button to reset properties to their default values
8,163
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/PropertiesEditor/index.js PR Title: Add a button to reset properties to their default values BEFORE CODE: }} value={getFieldValue({ instances, field })} floatingLabelText={getFieldLabel({ instances, field ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} else { this._sendHotReloadLayers(); } }; _onLayersVisibilityInEditorChanged = () => { this._sendHotReloadLayers(); }; _onChooseLayer = (layerName: string) => { this.setState({ chosenLayer: layerName, }); const { previewDebuggerServer } = this.props; if (previewDebugg...
No issues found.
} else { this._sendHotReloadLayers(); } }; _onLayersVisibilityInEditorChanged = () => { this._sendHotReloadLayers(); }; _onChooseLayer = (layerName: string) => { this.setState({ chosenLayer: layerName, }); const { previewDebuggerServer } = this.props; if (previewDebugg...
@@ -359,6 +359,16 @@ export default class SceneEditor extends React.Component<Props, State> { } componentDidMount() { + // Sync the saved gameEditorMode from instancesEditorSettings to MainFrame. + if ( + this.props.isActive && + this.state.instancesEditorSettings.gameEditorMode + ) { + ...
newIDE/app/src/SceneEditor/index.js
0
JavaScript
1
none
16
51
51
true
Save Editor Mode (2D/3D) per scene instead of globally
8,169
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/SceneEditor/index.js PR Title: Save Editor Mode (2D/3D) per scene instead of globally BEFORE CODE: } else { this._sendHotReloadLayers(); } }; _onLayersVisibilityInEditorChanged = () => { this._sendHotReloadLayers(); ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
gd::WholeProjectRefactorer::RenameParameter( project, projectScopedContainers, eventsFunction, parametersObjectsContainer, "MyObject", "MyRenamedObject"); REQUIRE(instruction.GetParameter(0).GetPlainString() == "MyRenamedObject"); REQUIRE(instruction2.GetParameter(0).GetPlainStr...
No issues found.
gd::WholeProjectRefactorer::RenameParameter( project, projectScopedContainers, eventsFunction, parametersObjectsContainer, "MyObject", "MyRenamedObject"); REQUIRE(instruction.GetParameter(0).GetPlainString() == "MyRenamedObject"); REQUIRE(instruction2.GetParameter(0).GetPlainStr...
@@ -1053,16 +1053,19 @@ SetupProjectWithEventsFunctionExtension(gd::Project &project) { // Add a property: eventsBasedBehavior.GetPropertyDescriptors() .InsertNew("MyProperty", 0) - .SetType("Number"); + .SetType("Number") + .SetValue("0"); // Add a shared property: eve...
Core/tests/WholeProjectRefactorer.cpp
0
C++
1
none
16
51
51
true
Fix property value loss when renaming a property in the extension editor
8,211
4ian/GDevelop
10,154
JavaScript
D8H
Review this pull request change. Language: C++ File: Core/tests/WholeProjectRefactorer.cpp PR Title: Fix property value loss when renaming a property in the extension editor BEFORE CODE: gd::WholeProjectRefactorer::RenameParameter( project, projectScopedContainers, eventsFunction, parametersObje...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
setIsPlaying(false); }, []); const onError = React.useCallback( () => { if (onSoundError) onSoundError(); }, [onSoundError] ); React.useEffect( () => { if (!waveSurferRef.current && !mobileAudioRef.current) return; if (isPlaying) { if (wa...
No issues found.
setIsPlaying(false); }, []); const onError = React.useCallback( () => { if (onSoundError) onSoundError(); }, [onSoundError] ); React.useEffect( () => { if (!waveSurferRef.current && !mobileAudioRef.current) return; if (isPlaying) { if (wa...
@@ -52,6 +52,7 @@ type Props = {| title: string | null, subtitle: React.Node, onSoundLoaded: () => void, + onSoundError?: () => void, onSkipForward?: () => void, onSkipBack?: () => void, |}; @@ -62,7 +63,15 @@ export type SoundPlayerInterface = {| const SoundPlayer = React.forwardRef<Props, SoundPla...
newIDE/app/src/UI/SoundPlayer/index.js
0
JavaScript
1
none
16
51
51
true
Add audio preview in resources
8,219
4ian/GDevelop
10,154
JavaScript
Bouh
Review this pull request change. Language: JavaScript File: newIDE/app/src/UI/SoundPlayer/index.js PR Title: Add audio preview in resources BEFORE CODE: setIsPlaying(false); }, []); const onError = React.useCallback( () => { if (onSoundError) onSoundError(); }, [onSoundError...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} edit(): void { this.props.onEditLayer(this.layer); this.props.onSelectLayer(null); } _isVisible(): boolean { return this.layer.getVisibility(); } _isLocked(): boolean { return this.layer.isLocked(); } _setVisibility(visible: boolean): void { this.layer.setVisibility(visible); ...
No issues found.
} edit(): void { this.props.onEditLayer(this.layer); this.props.onSelectLayer(null); } _isVisible(): boolean { return this.layer.getVisibility(); } _isLocked(): boolean { return this.layer.isLocked(); } _setVisibility(visible: boolean): void { this.layer.setVisibility(visible); ...
@@ -148,7 +148,7 @@ export class LayerTreeViewItemContent implements TreeViewItemContent { return [ { label: i18n._(t`Rename`), - click: () => this.props.editName(this.getId()), + click: () => this.props.editName(this.layer.getName()), accelerator: 'F2', enabled: !th...
newIDE/app/src/LayersList/LayerTreeViewItemContent.js
0
JavaScript
1
none
16
51
51
true
Avoid crash when renaming with F2 to edit "Base layer"
8,222
4ian/GDevelop
10,154
JavaScript
Bouh
Review this pull request change. Language: JavaScript File: newIDE/app/src/LayersList/LayerTreeViewItemContent.js PR Title: Avoid crash when renaming with F2 to edit "Base layer" BEFORE CODE: } edit(): void { this.props.onEditLayer(this.layer); this.props.onSelectLayer(null); } _isVisible(): boole...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/** * You can optionally add sanity tests that will check the basic working * of your extension behaviors/objects by instantiating behaviors/objects * and setting the property to a given value. * * If you don't have any tests, you can simply return an empty array. * * But it is recommended to cr...
No issues found.
/** * You can optionally add sanity tests that will check the basic working * of your extension behaviors/objects by instantiating behaviors/objects * and setting the property to a given value. * * If you don't have any tests, you can simply return an empty array. * * But it is recommended to cr...
@@ -214,6 +214,37 @@ module.exports = { .useStandardParameters('number', gd.ParameterOptions.makeNewOptions()) .setFunctionName('getPointAttachmentRotationLocal'); + object + .addExpressionAndCondition( + 'string', + 'getSkin', + _('Get skin name'), + _('the skin of t...
Extensions/Spine/JsExtension.js
0
JavaScript
1
none
16
51
51
true
feat: Add support for skin management in Spine objects
8,229
4ian/GDevelop
10,154
JavaScript
ViktorVovk
Review this pull request change. Language: JavaScript File: Extensions/Spine/JsExtension.js PR Title: feat: Add support for skin management in Spine objects BEFORE CODE: /** * You can optionally add sanity tests that will check the basic working * of your extension behaviors/objects by instantiating behavi...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
this.props.onRenameLayer(oldName, newName); } edit(): void { this.props.onEditLayer(this.layer); this.props.onSelectLayer(null); } _isVisible(): boolean { return this.layer.getVisibility(); } _isLocked(): boolean { return this.layer.isLocked(); } _setVisibility(visible: boolean):...
No issues found.
this.props.onRenameLayer(oldName, newName); } edit(): void { this.props.onEditLayer(this.layer); this.props.onSelectLayer(null); } _isVisible(): boolean { return this.layer.getVisibility(); } _isLocked(): boolean { return this.layer.isLocked(); } _setVisibility(visible: boolean):...
@@ -149,7 +149,7 @@ export class LayerTreeViewItemContent implements TreeViewItemContent { return [ { label: i18n._(t`Rename`), - click: () => this.props.editName(this.layer.getName()), + click: () => this.props.editName(this.getId()), accelerator: 'F2', enabled: !th...
newIDE/app/src/LayersList/LayerTreeViewItemContent.js
0
JavaScript
1
none
16
51
51
true
Fix being able to rename a layer with shortcut
8,309
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/LayersList/LayerTreeViewItemContent.js PR Title: Fix being able to rename a layer with shortcut BEFORE CODE: this.props.onRenameLayer(oldName, newName); } edit(): void { this.props.onEditLayer(this.layer); this.props.onSelec...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
project, 'Sprite', 'MySpriteEmpty', objects.getObjectsCount() ); // No animations added — getAnimationsCount() === 0 expect( getObjectSizeAndOriginInfo(object, project, fakeAssetShortHeader1) ).toBeNull(); }); }); describe('TiledSpriteObject::Til...
No issues found.
project, 'Sprite', 'MySpriteEmpty', objects.getObjectsCount() ); // No animations added — getAnimationsCount() === 0 expect( getObjectSizeAndOriginInfo(object, project, fakeAssetShortHeader1) ).toBeNull(); }); }); describe('TiledSpriteObject::Til...
@@ -0,0 +1,250 @@ +// @flow +import { fakeAssetShortHeader1 } from '../fixtures/GDevelopServicesTestData'; +import { getObjectSizeAndOriginInfo } from './Utils'; + +const gd: libGDevelop = global.gd; + +describe('getObjectSizeAndOriginInfo', () => { + let project: gdProject; + + beforeEach(() => { + // $FlowFixMe[...
newIDE/app/src/EditorFunctions/Utils.spec.js
0
JavaScript
1
none
16
51
51
true
Improve details of center/origin when a common object is created by the AI
8,322
4ian/GDevelop
10,154
JavaScript
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/EditorFunctions/Utils.spec.js PR Title: Improve details of center/origin when a common object is created by the AI BEFORE CODE: project, 'Sprite', 'MySpriteEmpty', objects.getObjectsCount() ); // N...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Alamofire.swift // // Copyright (c) 2014 Alamofire (http://alamofire.org) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights...
This looks a little more succinct: ``` swift dispatch_async(queue ?? dispatch_get_main_queue(), { completionHandler(self.request, self.response, responseObject, error) }) ```
// Alamofire.swift // // Copyright (c) 2014 Alamofire (http://alamofire.org) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights...
@@ -467,7 +467,7 @@ public struct Alamofire { dispatch_async(dispatch_get_global_queue(priority, 0), { let (responseObject: AnyObject?, error: NSError?) = serializer(self.request, self.response, self.delegate.data, self.delegate.error) - dispatch_async(queue ? ...
Source/Alamofire.swift
0
Swift
0.857
suggestion
178
967
967
false
Update to support the Xcode 6 Beta5 changes to Swift
24
Alamofire/Alamofire
41,690
Swift
camjknight
troypayne
Review this pull request change. Language: Swift File: Source/Alamofire.swift PR Title: Update to support the Xcode 6 Beta5 changes to Swift BEFORE CODE: // Alamofire.swift // // Copyright (c) 2014 Alamofire (http://alamofire.org) // // Permission is hereby granted, free of charge, to any person obtaining a copy //...
This looks a little more succinct: ``` swift dispatch_async(queue ?? dispatch_get_main_queue(), { completionHandler(self.request, self.response, responseObject, error) }) ```
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
I'd get more descriptive with the name.
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
@@ -97,27 +97,41 @@ class DownloadResponseTestCase: BaseTestCase { } } - func testDownloadRequestWithProgress() { + func testDownloadRequestWithProgress2() {
Tests/DownloadTests.swift
0
Swift
0.071
suggestion
40
177
177
false
Created more robust data, upload and download progress tests
494
Alamofire/Alamofire
41,690
Swift
kcharwood
cnoon
Review this pull request change. Language: Swift File: Tests/DownloadTests.swift PR Title: Created more robust data, upload and download progress tests BEFORE CODE: // DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of ...
I'd get more descriptive with the name.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
I'd actually like to hear everyone's testing philosophy here. I've always tried to follow the "test individual things" approach, and have a test for each specific thing you are testing (don't combine asserts for different things in the same test). I dont always end up with tests built that way, but I'm trying. I've al...
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
@@ -97,27 +97,41 @@ class DownloadResponseTestCase: BaseTestCase { } } - func testDownloadRequestWithProgress() { + func testDownloadRequestWithProgress2() {
Tests/DownloadTests.swift
0
Swift
0.5
question
466
177
177
false
Created more robust data, upload and download progress tests
494
Alamofire/Alamofire
41,690
Swift
kcharwood
cnoon
Review this pull request change. Language: Swift File: Tests/DownloadTests.swift PR Title: Created more robust data, upload and download progress tests BEFORE CODE: // DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of ...
I'd actually like to hear everyone's testing philosophy here. I've always tried to follow the "test individual things" approach, and have a test for each specific thing you are testing (don't combine asserts for different things in the same test). I dont always end up with tests built that way, but I'm trying. I've al...
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
@kcharwood My testing philosophy is to have tests setup situations that precisely emulate feature usage and assert as much as possible about the conditions that follow. Assertions themselves should be atomic (i.e. not testing compound conditions). Having the same assertions over and over across different tests is great...
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
@@ -97,27 +97,41 @@ class DownloadResponseTestCase: BaseTestCase { } } - func testDownloadRequestWithProgress() { + func testDownloadRequestWithProgress2() {
Tests/DownloadTests.swift
0
Swift
0.5
refactor
446
177
177
false
Created more robust data, upload and download progress tests
494
Alamofire/Alamofire
41,690
Swift
mattt
cnoon
Review this pull request change. Language: Swift File: Tests/DownloadTests.swift PR Title: Created more robust data, upload and download progress tests BEFORE CODE: // DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of ...
@kcharwood My testing philosophy is to have tests setup situations that precisely emulate feature usage and assert as much as possible about the conditions that follow. Assertions themselves should be atomic (i.e. not testing compound conditions). Having the same assertions over and over across different tests is great...
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
But as far as test names go, they should be descriptive. If there's a name conflict—again, that's a smell of duplication and a candidate for consolidation.
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
@@ -97,27 +97,41 @@ class DownloadResponseTestCase: BaseTestCase { } } - func testDownloadRequestWithProgress() { + func testDownloadRequestWithProgress2() {
Tests/DownloadTests.swift
0
Swift
0.429
suggestion
156
177
177
false
Created more robust data, upload and download progress tests
494
Alamofire/Alamofire
41,690
Swift
mattt
cnoon
Review this pull request change. Language: Swift File: Tests/DownloadTests.swift PR Title: Created more robust data, upload and download progress tests BEFORE CODE: // DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of ...
But as far as test names go, they should be descriptive. If there's a name conflict—again, that's a smell of duplication and a candidate for consolidation.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
#### Name Change I'm on it...good catch! #### Repeating Yourself in Tests I agree. I don't think there's any issue with repeating yourself in tests. I think it's advantageous to use a small amount of inheritance for simple things, but otherwise just repeat the logic so the majority of the code resides directly in th...
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
@@ -97,27 +97,41 @@ class DownloadResponseTestCase: BaseTestCase { } } - func testDownloadRequestWithProgress() { + func testDownloadRequestWithProgress2() {
Tests/DownloadTests.swift
0
Swift
0.643
bug
4,419
177
177
false
Created more robust data, upload and download progress tests
494
Alamofire/Alamofire
41,690
Swift
cnoon
cnoon
Review this pull request change. Language: Swift File: Tests/DownloadTests.swift PR Title: Created more robust data, upload and download progress tests BEFORE CODE: // DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of ...
#### Name Change I'm on it...good catch! #### Repeating Yourself in Tests I agree. I don't think there's any issue with repeating yourself in tests. I think it's advantageous to use a small amount of inheritance for simple things, but otherwise just repeat the logic so the majority of the code resides directly in th...
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
Method name has been fixed and force pushed.
// DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
@@ -97,27 +97,41 @@ class DownloadResponseTestCase: BaseTestCase { } } - func testDownloadRequestWithProgress() { + func testDownloadRequestWithProgress2() {
Tests/DownloadTests.swift
0
Swift
0.071
suggestion
45
177
177
false
Created more robust data, upload and download progress tests
494
Alamofire/Alamofire
41,690
Swift
cnoon
cnoon
Review this pull request change. Language: Swift File: Tests/DownloadTests.swift PR Title: Created more robust data, upload and download progress tests BEFORE CODE: // DownloadTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of ...
Method name has been fixed and force pushed.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
Is it worth having the comment there about dropping? May just want to add it to the release notes.
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
@@ -151,7 +151,11 @@ public enum ParameterEncoding { } func escape(string: String) -> String { - let legalURLCharactersToBeEscaped: CFStringRef = ":&=;+!@#$()',*" + let generalDelimiters = ":#[]@" // dropping "?" and "/" due to RFC 3986 - Section 3.4
Source/ParameterEncoding.swift
0
Swift
0.214
suggestion
99
162
194
false
Added parameter encoding characters along with additional documentation
504
Alamofire/Alamofire
41,690
Swift
kcharwood
cnoon
Review this pull request change. Language: Swift File: Source/ParameterEncoding.swift PR Title: Added parameter encoding characters along with additional documentation BEFORE CODE: // Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby grant...
Is it worth having the comment there about dropping? May just want to add it to the release notes.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
Also, is it worth adding any specific tests for the square brackets?
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
@@ -151,7 +151,11 @@ public enum ParameterEncoding { } func escape(string: String) -> String { - let legalURLCharactersToBeEscaped: CFStringRef = ":&=;+!@#$()',*" + let generalDelimiters = ":#[]@" // dropping "?" and "/" due to RFC 3986 - Section 3.4
Source/ParameterEncoding.swift
0
Swift
0.214
question
69
162
194
false
Added parameter encoding characters along with additional documentation
504
Alamofire/Alamofire
41,690
Swift
kcharwood
cnoon
Review this pull request change. Language: Swift File: Source/ParameterEncoding.swift PR Title: Added parameter encoding characters along with additional documentation BEFORE CODE: // Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby grant...
Also, is it worth adding any specific tests for the square brackets?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
We already have a bunch of tests around the square brackets cases, so we should be good there. As for removing the comment, I'm cool with taking it out if you think it's not great to have it in there. I want to make sure we have it documented why we shouldn't have the "?" and "/" listed as general delimiters. I'm afrai...
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
@@ -151,7 +151,11 @@ public enum ParameterEncoding { } func escape(string: String) -> String { - let legalURLCharactersToBeEscaped: CFStringRef = ":&=;+!@#$()',*" + let generalDelimiters = ":#[]@" // dropping "?" and "/" due to RFC 3986 - Section 3.4
Source/ParameterEncoding.swift
0
Swift
0.5
suggestion
399
162
194
false
Added parameter encoding characters along with additional documentation
504
Alamofire/Alamofire
41,690
Swift
cnoon
cnoon
Review this pull request change. Language: Swift File: Source/ParameterEncoding.swift PR Title: Added parameter encoding characters along with additional documentation BEFORE CODE: // Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby grant...
We already have a bunch of tests around the square brackets cases, so we should be good there. As for removing the comment, I'm cool with taking it out if you think it's not great to have it in there. I want to make sure we have it documented why we shouldn't have the "?" and "/" listed as general delimiters. I'm afrai...
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
Ya makes sense. May be better to document why those aren't there, rather than saying "we're dropping them". "We're dropping them sounds more like a temp comment, rather than documentation expected to live there for a long time. Make sense? And does that mean the square bracket tests were failing before this PR?
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
@@ -151,7 +151,11 @@ public enum ParameterEncoding { } func escape(string: String) -> String { - let legalURLCharactersToBeEscaped: CFStringRef = ":&=;+!@#$()',*" + let generalDelimiters = ":#[]@" // dropping "?" and "/" due to RFC 3986 - Section 3.4
Source/ParameterEncoding.swift
0
Swift
0.5
bug
314
162
194
false
Added parameter encoding characters along with additional documentation
504
Alamofire/Alamofire
41,690
Swift
kcharwood
cnoon
Review this pull request change. Language: Swift File: Source/ParameterEncoding.swift PR Title: Added parameter encoding characters along with additional documentation BEFORE CODE: // Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby grant...
Ya makes sense. May be better to document why those aren't there, rather than saying "we're dropping them". "We're dropping them sounds more like a temp comment, rather than documentation expected to live there for a long time. Make sense? And does that mean the square bracket tests were failing before this PR?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// CacheTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wi...
Can you explain the difference between OS X and iOS?
// CacheTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wi...
@@ -0,0 +1,333 @@ +// CacheTests.swift +// +// Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without ...
Tests/CacheTests.swift
0
Swift
0.214
question
53
334
322
false
Tests all implemented cache policies against common Cache-Control headers
505
Alamofire/Alamofire
41,690
Swift
kcharwood
cnoon
Review this pull request change. Language: Swift File: Tests/CacheTests.swift PR Title: Tests all implemented cache policies against common Cache-Control headers BEFORE CODE: // CacheTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, f...
Can you explain the difference between OS X and iOS?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// CacheTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wi...
I can now that I've gotten to the bottom of it! 😛 It appears that there was a bug in the iOS 8.2 simulator which I was using when I wrote the tests. Switching over to the iOS 8.3 simulator fixed the issues and we're now seeing the same behavior between iOS and OS X. Thankfully both are producing the "expected" behavi...
// CacheTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wi...
@@ -0,0 +1,333 @@ +// CacheTests.swift +// +// Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without ...
Tests/CacheTests.swift
0
Swift
0.786
bug
1,268
334
322
false
Tests all implemented cache policies against common Cache-Control headers
505
Alamofire/Alamofire
41,690
Swift
cnoon
cnoon
Review this pull request change. Language: Swift File: Tests/CacheTests.swift PR Title: Tests all implemented cache policies against common Cache-Control headers BEFORE CODE: // CacheTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, f...
I can now that I've gotten to the bottom of it! 😛 It appears that there was a bug in the iOS 8.2 simulator which I was using when I wrote the tests. Switching over to the iOS 8.3 simulator fixed the issues and we're now seeing the same behavior between iOS and OS X. Thankfully both are producing the "expected" behavi...
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
In all the places where you are replacing force unwrapping with optional binding, could you use the following format instead? ``` swift if let downloadTaskDidFinishDownloadingToURL = self. downloadTaskDidFinishDownloadingToURL { let destination = downloadTaskDidFinishDownloadingToURL(session, downloadTask, locatio...
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
@@ -150,8 +150,8 @@ extension Request { // MARK: Delegate Methods func URLSession(session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didFinishDownloadingToURL location: NSURL) { - if downloadTaskDidFinishDownloadingToURL != nil { - let destination = downloadTask...
Source/Download.swift
0
Swift
0.857
suggestion
491
186
186
false
[Refactoring] Replace many of force unwrapping usages with optional binding and where clause
557
Alamofire/Alamofire
41,690
Swift
cnoon
ikesyo
Review this pull request change. Language: Swift File: Source/Download.swift PR Title: [Refactoring] Replace many of force unwrapping usages with optional binding and where clause BEFORE CODE: // Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is ...
In all the places where you are replacing force unwrapping with optional binding, could you use the following format instead? ``` swift if let downloadTaskDidFinishDownloadingToURL = self. downloadTaskDidFinishDownloadingToURL { let destination = downloadTaskDidFinishDownloadingToURL(session, downloadTask, locatio...
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
I'm curious, why can't you just pass `completionHandler` directly here?
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
@@ -22,9 +22,100 @@ import Foundation -// MARK: String +// MARK: - ResponseSerializer + +/** + The type in which all response serializers must conform to in order to serialize a response. +*/ +public protocol ResponseSerializer { + /// The type of serialized object to be created by this `ResponseSerializer`....
Source/ResponseSerialization.swift
0
Swift
0.5
question
73
260
249
false
Feature - Response Serializer Generics
593
Alamofire/Alamofire
41,690
Swift
jqsilver
cnoon
Review this pull request change. Language: Swift File: Source/ResponseSerialization.swift PR Title: Feature - Response Serializer Generics BEFORE CODE: // Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any pe...
I'm curious, why can't you just pass `completionHandler` directly here?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} /** Adds a handler to be called once the request has finished. :param: completionHandler The code to be executed once the request has finished. :returns: The request. */ public func response(completionHandler: (NSURLRequest, NSHTTPURLResponse?, NSData?, NSError?) -> Void) ->...
Why cant it be a class method?
} /** Adds a handler to be called once the request has finished. :param: completionHandler The code to be executed once the request has finished. :returns: The request. */ public func response(completionHandler: (NSURLRequest, NSHTTPURLResponse?, NSData?, NSError?) -> Void) ->...
@@ -32,8 +123,8 @@ extension Request { :returns: A string response serializer. */ - public class func stringResponseSerializer(var encoding: NSStringEncoding? = nil) -> Serializer { - return { _, response, data in + public static func stringResponseSerializer(var encoding: NSStringEncoding?...
Source/ResponseSerialization.swift
26
Swift
0.071
question
31
51
51
false
Feature - Response Serializer Generics
593
Alamofire/Alamofire
41,690
Swift
NicholasTD07
cnoon
Review this pull request change. Language: Swift File: Source/ResponseSerialization.swift PR Title: Feature - Response Serializer Generics BEFORE CODE: } /** Adds a handler to be called once the request has finished. :param: completionHandler The code to be executed once the request has fi...
Why cant it be a class method?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
Great catch guys! It was previously necessary and I didn't catch that it could be removed. Addressed in ed752d39.
// Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including wit...
@@ -22,9 +22,100 @@ import Foundation -// MARK: String +// MARK: - ResponseSerializer + +/** + The type in which all response serializers must conform to in order to serialize a response. +*/ +public protocol ResponseSerializer { + /// The type of serialized object to be created by this `ResponseSerializer`....
Source/ResponseSerialization.swift
0
Swift
0.429
suggestion
114
260
249
false
Feature - Response Serializer Generics
593
Alamofire/Alamofire
41,690
Swift
cnoon
cnoon
Review this pull request change. Language: Swift File: Source/ResponseSerialization.swift PR Title: Feature - Response Serializer Generics BEFORE CODE: // Alamofire.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any pe...
Great catch guys! It was previously necessary and I didn't catch that it could be removed. Addressed in ed752d39.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} /** Adds a handler to be called once the request has finished. :param: completionHandler The code to be executed once the request has finished. :returns: The request. */ public func response(completionHandler: (NSURLRequest, NSHTTPURLResponse?, NSData?, NSError?) -> Void) ->...
So it certainly could be, but my thought was that it shouldn't be. Here are a couple questions that I think will help us find the right balance: - Does it really make sense to subclass the `data`, `string`, `JSON` or `propertyList` response serializers? - Does it even make sense to subclass `Request` at all? > IMO th...
} /** Adds a handler to be called once the request has finished. :param: completionHandler The code to be executed once the request has finished. :returns: The request. */ public func response(completionHandler: (NSURLRequest, NSHTTPURLResponse?, NSData?, NSError?) -> Void) ->...
@@ -32,8 +123,8 @@ extension Request { :returns: A string response serializer. */ - public class func stringResponseSerializer(var encoding: NSStringEncoding? = nil) -> Serializer { - return { _, response, data in + public static func stringResponseSerializer(var encoding: NSStringEncoding?...
Source/ResponseSerialization.swift
26
Swift
0.786
question
1,026
51
51
false
Feature - Response Serializer Generics
593
Alamofire/Alamofire
41,690
Swift
cnoon
cnoon
Review this pull request change. Language: Swift File: Source/ResponseSerialization.swift PR Title: Feature - Response Serializer Generics BEFORE CODE: } /** Adds a handler to be called once the request has finished. :param: completionHandler The code to be executed once the request has fi...
So it certainly could be, but my thought was that it shouldn't be. Here are a couple questions that I think will help us find the right balance: - Does it really make sense to subclass the `data`, `string`, `JSON` or `propertyList` response serializers? - Does it even make sense to subclass `Request` at all? > IMO th...
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
let expectation = expectationWithDescription("Download should be cancelled") var request: NSURLRequest? var response: NSHTTPURLResponse? var data: AnyObject? var error: NSError? // When let download = Alamofire.download(.GET, self.URLString, destination: self.de...
Should this not also assert that resumeData is nil?
let expectation = expectationWithDescription("Download should be cancelled") var request: NSURLRequest? var response: NSHTTPURLResponse? var data: AnyObject? var error: NSError? // When let download = Alamofire.download(.GET, self.URLString, destination: self.de...
@@ -216,3 +212,123 @@ class DownloadResponseTestCase: BaseTestCase { XCTAssertNil(removalError, "removal error should be nil") } } + +// MARK: - + +class DownloadResumeDataTestCase: BaseTestCase { + let URLString = "https://upload.wikimedia.org/wikipedia/commons/6/69/NASA-HS201427a-HubbleUltraDeepFiel...
Tests/DownloadTests.swift
26
Swift
0.286
question
52
51
51
false
Feature - Download Resume Data
595
Alamofire/Alamofire
41,690
Swift
kylef
cnoon
Review this pull request change. Language: Swift File: Tests/DownloadTests.swift PR Title: Feature - Download Resume Data BEFORE CODE: let expectation = expectationWithDescription("Download should be cancelled") var request: NSURLRequest? var response: NSHTTPURLResponse? var data: A...
Should this not also assert that resumeData is nil?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
let expectation = expectationWithDescription("Download should be cancelled") var request: NSURLRequest? var response: NSHTTPURLResponse? var data: AnyObject? var error: NSError? // When let download = Alamofire.download(.GET, self.URLString, destination: self.de...
Yes it ABSOLUTELY should. Will fix.
let expectation = expectationWithDescription("Download should be cancelled") var request: NSURLRequest? var response: NSHTTPURLResponse? var data: AnyObject? var error: NSError? // When let download = Alamofire.download(.GET, self.URLString, destination: self.de...
@@ -216,3 +212,123 @@ class DownloadResponseTestCase: BaseTestCase { XCTAssertNil(removalError, "removal error should be nil") } } + +// MARK: - + +class DownloadResumeDataTestCase: BaseTestCase { + let URLString = "https://upload.wikimedia.org/wikipedia/commons/6/69/NASA-HS201427a-HubbleUltraDeepFiel...
Tests/DownloadTests.swift
26
Swift
0.143
suggestion
36
51
51
false
Feature - Download Resume Data
595
Alamofire/Alamofire
41,690
Swift
cnoon
cnoon
Review this pull request change. Language: Swift File: Tests/DownloadTests.swift PR Title: Feature - Download Resume Data BEFORE CODE: let expectation = expectationWithDescription("Download should be cancelled") var request: NSURLRequest? var response: NSHTTPURLResponse? var data: A...
Yes it ABSOLUTELY should. Will fix.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, i...
Could you kill this extra newline?
// ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, i...
@@ -106,11 +106,14 @@ extension Request { -> Self { delegate.queue.addOperationWithBlock { - var result = responseSerializer.serializeResponse(self.request, self.response, self.delegate.data) - - if let error = self.delegate.error { - result = .Failure(self.de...
Source/ResponseSerialization.swift
0
Swift
0.143
question
35
333
332
false
Update ResponseSerialization.swift
716
Alamofire/Alamofire
41,690
Swift
cnoon
brocoo
Review this pull request change. Language: Swift File: Source/ResponseSerialization.swift PR Title: Update ResponseSerialization.swift BEFORE CODE: // ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, t...
Could you kill this extra newline?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// ResponseSerializationTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restricti...
Can't we use the constant for [`NSCocoaErrorDomain`](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/index.html#//apple_ref/doc/c_ref/NSCocoaErrorDomain)?
// ResponseSerializationTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restricti...
@@ -266,8 +348,8 @@ class ResponseSerializationTestCase: BaseTestCase { XCTAssertNotNil(result.error, "result error should not be nil") if let error = result.error { - XCTAssertEqual(error.domain, Error.Domain, "error domain should match expected value") - XCTAssertEqual(error....
Tests/ResponseSerializationTests.swift
0
Swift
0.786
question
223
592
592
false
Feature - Added 204 Support to Response Serializers
889
Alamofire/Alamofire
41,690
Swift
kylef
cnoon
Review this pull request change. Language: Swift File: Tests/ResponseSerializationTests.swift PR Title: Feature - Added 204 Support to Response Serializers BEFORE CODE: // ResponseSerializationTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby ...
Can't we use the constant for [`NSCocoaErrorDomain`](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/index.html#//apple_ref/doc/c_ref/NSCocoaErrorDomain)?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// ResponseSerializationTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restricti...
Isn't this `NSPropertyListReadCorruptError`? Seems like a Foundation bug raising a property list error for JSON.
// ResponseSerializationTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restricti...
@@ -266,8 +348,8 @@ class ResponseSerializationTestCase: BaseTestCase { XCTAssertNotNil(result.error, "result error should not be nil") if let error = result.error { - XCTAssertEqual(error.domain, Error.Domain, "error domain should match expected value") - XCTAssertEqual(error....
Tests/ResponseSerializationTests.swift
0
Swift
0.643
bug
113
592
592
false
Feature - Added 204 Support to Response Serializers
889
Alamofire/Alamofire
41,690
Swift
kylef
cnoon
Review this pull request change. Language: Swift File: Tests/ResponseSerializationTests.swift PR Title: Feature - Added 204 Support to Response Serializers BEFORE CODE: // ResponseSerializationTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby ...
Isn't this `NSPropertyListReadCorruptError`? Seems like a Foundation bug raising a property list error for JSON.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// ResponseSerializationTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restricti...
Yeah it definitely is an `NSPropertyListReadCorruptError`. Looks like they used the same errors for JSON as they did plists rather than redefining special error codes for JSON. With that said, should we keep the `data.length > 0` check to instead through an actual Alamofire JSON error instead? I think it would make sen...
// ResponseSerializationTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restricti...
@@ -266,8 +348,8 @@ class ResponseSerializationTestCase: BaseTestCase { XCTAssertNotNil(result.error, "result error should not be nil") if let error = result.error { - XCTAssertEqual(error.domain, Error.Domain, "error domain should match expected value") - XCTAssertEqual(error....
Tests/ResponseSerializationTests.swift
0
Swift
0.786
question
382
592
592
false
Feature - Added 204 Support to Response Serializers
889
Alamofire/Alamofire
41,690
Swift
cnoon
cnoon
Review this pull request change. Language: Swift File: Tests/ResponseSerializationTests.swift PR Title: Feature - Added 204 Support to Response Serializers BEFORE CODE: // ResponseSerializationTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby ...
Yeah it definitely is an `NSPropertyListReadCorruptError`. Looks like they used the same errors for JSON as they did plists rather than redefining special error codes for JSON. With that said, should we keep the `data.length > 0` check to instead through an actual Alamofire JSON error instead? I think it would make sen...
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, i...
How do you feel about: ``` swift guard let response = response where response.statusCode != 204 else { return .Success(NSData()) } ``` It makes more sense to me than coalescing into a -1.
// ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, i...
@@ -145,11 +145,13 @@ extension Request { - returns: A data response serializer. */ public static func dataResponseSerializer() -> ResponseSerializer<NSData, NSError> { - return ResponseSerializer { _, _, data, error in + return ResponseSerializer { _, response, data, error in ...
Source/ResponseSerialization.swift
0
Swift
0.714
suggestion
190
356
356
false
Feature - Added 204 Support to Response Serializers
889
Alamofire/Alamofire
41,690
Swift
jshier
cnoon
Review this pull request change. Language: Swift File: Source/ResponseSerialization.swift PR Title: Feature - Added 204 Support to Response Serializers BEFORE CODE: // ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, ...
How do you feel about: ``` swift guard let response = response where response.statusCode != 204 else { return .Success(NSData()) } ``` It makes more sense to me than coalescing into a -1.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, i...
Yup...make way more sense to me too! 😉🍻 Will change.
// ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, i...
@@ -145,11 +145,13 @@ extension Request { - returns: A data response serializer. */ public static func dataResponseSerializer() -> ResponseSerializer<NSData, NSError> { - return ResponseSerializer { _, _, data, error in + return ResponseSerializer { _, response, data, error in ...
Source/ResponseSerialization.swift
0
Swift
0.286
suggestion
53
356
356
false
Feature - Added 204 Support to Response Serializers
889
Alamofire/Alamofire
41,690
Swift
cnoon
cnoon
Review this pull request change. Language: Swift File: Source/ResponseSerialization.swift PR Title: Feature - Added 204 Support to Response Serializers BEFORE CODE: // ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, ...
Yup...make way more sense to me too! 😉🍻 Will change.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, i...
Yeah now I remember why I didn't do this...if response is nil then the `guard` will fail and it will return a `.Success` case which is definitely not what we want. I don't see an cleaner way to do it than I already have. Open to suggestions...
// ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, i...
@@ -145,11 +145,13 @@ extension Request { - returns: A data response serializer. */ public static func dataResponseSerializer() -> ResponseSerializer<NSData, NSError> { - return ResponseSerializer { _, _, data, error in + return ResponseSerializer { _, response, data, error in ...
Source/ResponseSerialization.swift
0
Swift
0.571
bug
244
356
356
false
Feature - Added 204 Support to Response Serializers
889
Alamofire/Alamofire
41,690
Swift
cnoon
cnoon
Review this pull request change. Language: Swift File: Source/ResponseSerialization.swift PR Title: Feature - Added 204 Support to Response Serializers BEFORE CODE: // ResponseSerialization.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, ...
Yeah now I remember why I didn't do this...if response is nil then the `guard` will fail and it will return a `.Success` case which is definitely not what we want. I don't see an cleaner way to do it than I already have. Open to suggestions...
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.