Skip to content

Commit 1a1a3cd

Browse files
authored
Merge pull request #86 from justlevine/v0.4.0
Merge v0.4.0
2 parents 793bd15 + 933ce78 commit 1a1a3cd

File tree

259 files changed

+12826
-5530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+12826
-5530
lines changed

.gitattributes

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
/tests export-ignore
44
/docker export-ignore
55
/docs export-ignore
6-
/.travis.yml
6+
/codeception.yml export-ignore
7+
/phpstan.neon.dist export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/.travis.yml export-ignore
710
/.phpcs.xml.dist export-ignore
811
/.github export-ignore
912
/.coveralls export-ignore

CHANGELOG.md

Lines changed: 118 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,127 @@
11
# Changelog
22

3+
## v0.4.0 - A Simpler Form Submission Flow!
4+
5+
** :warning: This release contains multiple breaking changes. **
6+
7+
This release adds the `submitGravityFormsForm` mutation that submit forms without needing to use the existing `createGravityFormsDraftEntry` -> `updateDraftEntry{fieldType}Value` -> `submitGravityFormsDraftEntry` flow.
8+
9+
Similarly, we've added support for updating entries and draft entries with a single mutation each, and added support for using form and entry IDs in queries - without needing to convert them to a global ID first. We also deprecated `fields` in favor of `formFields`, so there's less confusion between GF fields and GraphQL fields.
10+
11+
Also, we made several (breaking) changes to streamline queries and mutations: many GraphQL properties have been changed to `Enum` types, and `formFields` (and the now-deprecated `fields`) are now an interface. This should make your queries and mutations less error-prone and (a bit) more concise. We're also now using native Gravity Forms functions wherever possible, which should help ensure consistency going forward.
12+
13+
Beyond that, we've squashed some bugs, deprecated some confusing and unnecessary fields, and refactored a huge portion of the codebase that should speed up development and improve code quality in the long term.
14+
15+
### New features
16+
17+
- Added `submitGravityFormsForm` mutation to bypass the existing draft entry flow. See [README.MD](https://github.com/harness-software/wp-graphql-gravity-forms/README.md#documentation-submit-form-mutation) for usage.
18+
- Added `updateGravityFormsEntry` and `updateGravityFormsDraftEntry` mutations that follow the same pattern.
19+
- Added `idType` to `GravityFormsForm` and `GravityFormsEntry`, so you can now query them using the database ID, instead of generating a global id first.
20+
- Added `id` property to `FieldErrors`, so you know which failed validation.
21+
- Deprecated the `fields` property on `GravityFormsForm` and `GravityFormsEntry` in favor of `formFields`.
22+
- Support cloning an existing entry when using `createGravityFormsDraftEntry` using the `fromEntryId` input property.
23+
- Converted all Gravity Forms `formFields` (and the now-deprecated `fields`) to a GraphQL Interface type. That means your queries can now look like this:
24+
25+
```graphql
26+
query {
27+
gravityFormsForms {
28+
nodes {
29+
formFields {
30+
nodes {
31+
formId
32+
type
33+
id
34+
... on AddressField {
35+
inputs {
36+
defaultValue
37+
}
38+
}
39+
... on TextField {
40+
defaultValue
41+
}
42+
}
43+
}
44+
}
45+
}
46+
}
47+
```
48+
49+
- Switched many field types from `String` to `Enum`:
50+
- `AddressField.addressType`
51+
- `Button.type`
52+
- `CaptchaField.captchaTheme`
53+
- `CaptchaField.captchaType`
54+
- `CaptchaField.simpleCaptchaSize`
55+
- `ChainedSelectField.chainedSelectsAlignment`
56+
- `ConditionalLogic.actionType`
57+
- `ConditionalLogic.logicType`
58+
- `ConditionalLogicRule.operator`
59+
- `DateField.calendarIconType`
60+
- `DateField.dateFormat`
61+
- `DateField.dateType`
62+
- `EntriesFieldFilterInput.operator`
63+
- `EntriesSortingInput.direction`
64+
- `Form.descriptionPlacement`
65+
- `Form.labelPlacement`
66+
- `Form.limitEntriesPeriod`
67+
- `Form.subLabelPlacement`
68+
- `FormConfirmation.type`
69+
- `FormNotification.toType`
70+
- `FormNotificationRouting.operator`
71+
- `FormPagination.style`
72+
- `FormPagination.type`
73+
- `GravityFormsEntry.fieldFiltersNode`
74+
- `GravityFormsEntry.status`
75+
- `NumberField.numberFormat`
76+
- `PasswordField.minPasswordStrength`
77+
- `PhoneField.phoneFormat`
78+
- `RootQueryToGravityFormsFormConnection.status`
79+
- `SignatureField.borderStyle`
80+
- `SignatureField.borderWidth`
81+
- `TimeField.timeFormat`
82+
- `visibilityProperty`
83+
- FieldProperty: `descriptionPlacement`
84+
- FieldProperty: `labelPlacement`
85+
- FieldProperty: `sizeProperty`
86+
87+
### Bugfixes
88+
89+
- `SaveAndContinue` now uses `buttonText` instead of the `Button` type.
90+
- `lastPageButton` now uses its own GraphQL type with the relevant fields.
91+
- The `resumeToken` input field on the `deleteGravityFormsDraftEntry`, `SubmitGravityFormsDraftEntry`, and all the `updateDraftEntry{fieldType}Value` mutations is now a non-nullable `String!`.
92+
- When querying entries, we check that `createdByID` is set before trying to fetch the uerdata.
93+
- Where possible, mutations and queries now try to return an `errors` object instead of throwing an Exception.
94+
- We've added more descriptive `Exception` messages across the plugin, to help you figure out what went wrong.
95+
- We fixed a type conflict with `ConsentFieldValue`. `value` now returns a `String` with the consent message, or `null` if false.
96+
- Deprecated `url` in favor of `value` on `FileUploadFieldValue` and `SignatureFieldValue`.
97+
- Deprecated `cssClassList` in favor of `cssClass`.
98+
- The `resumeToken` input field on the `deleteGravityFormsDraftEntry`, `SubmitGravityFormsDraftEntry`, and all the `updateDraftEntry{fieldType}Value` mutations is now a non-nullable `String!`.
99+
100+
### Under the hood
101+
102+
- Refactored Fields, FieldValues, and Mutations, removing over 500 lines of code and improving consistency across classes.
103+
- Switch to using `GFAPI::submit_form()` instead of local implementations for submitting forms and draft entries.
104+
- Implemented phpstan linting.
105+
- Migrated unit tests to Codeception, and started backfilling missing tests.
106+
- Updated composer dependencies.
107+
3108
## v0.3.1 - Bugfixes
4-
- Removes `abstract` class definition from FieldProperty classes. (#79)
5-
- `ConsentFieldValue`: The `value` field was a conflicting type `Boolean`. Now it correctly returns a `String` with the consent message. ( #80 )
6-
- `FormNotificationRouting`: The `fieldId` now correctly returns an `Int` instead of a `String`. (#81)
7-
- When checking for missing `GravityFormsForm` values, `limitEntriesCount`, `scheduleEndHour` and `scheduleEndMinute` now correctly return as type `Int` (#83)
109+
110+
- Removes `abstract` class definition from FieldProperty classes. (#79)
111+
- `ConsentFieldValue`: The `value` field was a conflicting type `Boolean`. Now it correctly returns a `String` with the consent message. ( #80 )
112+
- `FormNotificationRouting`: The `fieldId` now correctly returns an `Int` instead of a `String`. (#81)
113+
- When checking for missing `GravityFormsForm` values, `limitEntriesCount`, `scheduleEndHour` and `scheduleEndMinute` now correctly return as type `Int` (#83)
114+
8115
## v0.3.0 - Add Missing Mutations, the Consent Field, and more!
9116

10117
This release focuses on adding in missing mutations for existing form field - including those needed for Post Creation. We also added support for the Consent field, and squashed some bugs.
11118

12119
### New Field Support: Consent
120+
13121
- Added `consentField` and `updateDraftEntryConsentFieldValue`.
14122

15123
### New Field Mutations
124+
16125
- Added `updateDraftEntryChainedSelectFieldValue` mutation.
17126
- Added `updateDraftEntryHiddenFieldValue` mutation.
18127
- Added `updateDraftEntryPostCategoryFieldValue` mutation.
@@ -22,15 +131,18 @@ This release focuses on adding in missing mutations for existing form field - in
22131
- Added `updateDraftEntryPostTitleFieldValue` mutation.
23132

24133
### Added Field Properties
25-
- Added the `isHidden` property to `PasswordInput`.
134+
135+
- Added the `isHidden` property to `PasswordInput`.
26136

27137
### Bugfixes
138+
28139
- Changed the way we were saving the `listField` values for both single- and multi-column setups, so GF can read them correctly.
29-
- Fix a bug where a PHP Notice would be thrown when no `listField` value was submitted - even if the field was not required.
140+
- Fix a bug where a PHP Notice would be thrown when no `listField` value was submitted - even if the field was not required.
30141
- Fixed a bug that was preventing unused draft signature images from getting deleted.
31142
- Updated how we retrieve the signature url so we're no longer using deprecated functions.
32143

33144
### Misc.
145+
34146
- Renamed `ListInput` and `ListFieldValue` properties to something more sensical. `input.value.values` is now `input.value.rowValues`, and `fieldValue.listValues.value` is now `fieldValue.listValues.values`. The old property names will continue to work until further notice.
35147
- Updated composer dependencies.
36148

0 commit comments

Comments
 (0)