-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Refactor FormField registration #273
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
justlevine
added
type: enhancement ⚡
Improves on an existing feature
status: in progress 🚧
Work on this has begun
labels
Jul 7, 2022
4 tasks
justlevine
force-pushed
the
feat/form-field-actions
branch
2 times, most recently
from
July 12, 2022 19:33
4b053a0
to
da953f2
Compare
justlevine
force-pushed
the
feat/form-field-actions
branch
from
July 13, 2022 07:37
da953f2
to
c5f3b23
Compare
justlevine
force-pushed
the
feat/form-field-actions
branch
2 times, most recently
from
July 21, 2022 11:25
032fbb7
to
f4c550b
Compare
justlevine
force-pushed
the
feat/form-field-actions
branch
from
July 27, 2022 21:54
177d209
to
c9d461c
Compare
justlevine
force-pushed
the
feat/form-field-actions
branch
from
July 28, 2022 01:17
94d8287
to
9c807b1
Compare
justlevine
added a commit
that referenced
this pull request
Aug 12, 2022
* feat!: refactor form field settings to use interfaces * feat!: refactor form field choice and inputs to use interfaces * chore: cleanup * chore: rename types * chore: cleanup filters * docs: add new actions/filters * chore: update composer deps
justlevine
added a commit
to justlevine/wp-graphql-gravity-forms
that referenced
this pull request
Aug 17, 2022
* feat!: refactor form field settings to use interfaces * feat!: refactor form field choice and inputs to use interfaces * chore: cleanup * chore: rename types * chore: cleanup filters * docs: add new actions/filters * chore: update composer deps
justlevine
added a commit
that referenced
this pull request
Aug 17, 2022
* dev!: Register GraphQL types individually (#276) * chore: restore Hookable interface * chore!: use register_hooks() for type registration * Feat: Refactor FormField registration (#273) * feat!: refactor form field settings to use interfaces * feat!: refactor form field choice and inputs to use interfaces * chore: cleanup * chore: rename types * chore: cleanup filters * docs: add new actions/filters * chore: update composer deps * dev: add get_type_name() to input and choice registry * feat: add connected input/choice to checkbox field value * chore: add var tag
justlevine
added a commit
to justlevine/wp-graphql-gravity-forms
that referenced
this pull request
Aug 17, 2022
* feat!: refactor form field settings to use interfaces * feat!: refactor form field choice and inputs to use interfaces * chore: cleanup * chore: rename types * chore: cleanup filters * docs: add new actions/filters * chore: update composer deps
justlevine
added a commit
to justlevine/wp-graphql-gravity-forms
that referenced
this pull request
Aug 19, 2022
* feat!: refactor form field settings to use interfaces * feat!: refactor form field choice and inputs to use interfaces * chore: cleanup * chore: rename types * chore: cleanup filters * docs: add new actions/filters * chore: update composer deps
justlevine
added a commit
to justlevine/wp-graphql-gravity-forms
that referenced
this pull request
Aug 28, 2022
* feat!: refactor form field settings to use interfaces * feat!: refactor form field choice and inputs to use interfaces * chore: cleanup * chore: rename types * chore: cleanup filters * docs: add new actions/filters * chore: update composer deps
justlevine
added a commit
to justlevine/wp-graphql-gravity-forms
that referenced
this pull request
Aug 29, 2022
* feat!: refactor form field settings to use interfaces * feat!: refactor form field choice and inputs to use interfaces * chore: cleanup * chore: rename types * chore: cleanup filters * docs: add new actions/filters * chore: update composer deps
justlevine
added a commit
that referenced
this pull request
Aug 30, 2022
* Feat: Refactor FormField registration (#273) * feat!: refactor form field settings to use interfaces * feat!: refactor form field choice and inputs to use interfaces * chore: cleanup * chore: rename types * chore: cleanup filters * docs: add new actions/filters * chore: update composer deps * fix: remove duplicate $ignored_field values. * fix: use the correct GF_Field for child types with their own classes * chore: order value methods alphabetically * feat: graduate product Field (query) * feat: gradiuate `option`, `price`, `quantity`, `shipping`, and `total` fields (query * fix: set fallback product quantity to 1 * fix: change quantity GraphQL type to float * chore: fix composer deps post rebase * feat: add Product mutation support * feat: add price and formattedPrice to QuantitySelectFieldChoice * tests: quantity field tests * fix: docblock headers * test: reset $_gf_state by setting to empty array * fix: option choice type name should resolve to OptionFieldChoice * test: option field tests * test: shipping field tests * fix: use updated entry when preparing values for save * feat: add support for total field * test: lint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This PR refactors the way that individual
FormField
objects are registered to WPGraphQL.The goal is to:
FormField
settings.choices
,inputs
, andfieldValues
.Why
How
GfFormField
to use interfaces.PropertyMapper
,ChoiceMapper
,InputMapper
, andFieldProperties
classes. in favor of theFormFieldRegistry
,FieldInputRegistry
andFieldChoiceRegistry
classes.TypeRegistry
classes toWPGraphQL\GF\Registry
namespace.$type_registry
param fromRegistrable::register()
interface method.$type_registry
param from thegraphql_gf_after_register_types
andgraphql_gf_before_register_types
actions.graphql_gf_after_register_form_field
,graphql_gf_after_register_form_field_object
,graphql_gf_after_register_form_field_choices
,graphql_gf_after_register_form_field_inputs
.graphql_gf_form_field_setting_choice_fields
,graphql_gf_form_field_setting_input_fields
,graphql_gf_registered_form_field_setting_classes
,graphql_gf_registered_form_field_setting_choice_classes
,graphql_gf_registered_form_field_setting_input_classes
.graphql_gf_form_field_setting_properties
filter in favor ofgraphql_gf_form_field_setting_fields
.graphql_gf_form_field_value_properties
filter in favor ofgraphql_gf_form_field_value_fields
Testing Instructions
There are no breaking schema changes.
Additional Info
Checklist: