before_code
stringlengths
14
465k
reviewer_comment
stringlengths
16
64.5k
after_code
stringlengths
9
467k
diff_context
stringlengths
0
97k
file_path
stringlengths
5
226
comment_line
int32
0
26
language
stringclasses
37 values
quality_score
float32
0.07
1
comment_type
stringclasses
9 values
comment_length
int32
16
64.5k
before_lines
int32
1
17.2k
after_lines
int32
1
12.1k
is_negative
bool
2 classes
pr_title
stringlengths
1
308
pr_number
int32
1
299k
repo_name
stringclasses
533 values
repo_stars
int64
321
419k
repo_language
stringclasses
27 values
reviewer_username
stringlengths
0
39
author_username
stringlengths
2
39
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
(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
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
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
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
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
.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
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
.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
} _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
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
} 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
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
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
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
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
// 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
); 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
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
* * 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
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
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
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
) { 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
// 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
// @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
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
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
// 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
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
_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
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
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
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
(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
} 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
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
.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
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
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
} /** * 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
/** * 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
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
<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
'\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
#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
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
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
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
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
); 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
}, [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
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
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
// 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
); 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
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
}: 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
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
(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
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
(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
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
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
}, }; 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
}} 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
} 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
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
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
} 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
/** * 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
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
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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
} /** 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
// 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
} /** 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
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
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
// 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
// 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
// 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
// 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
// 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
// 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
// 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