Skip to content
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

Feature: add support to the Visual Form Builder #65

Merged
merged 22 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
11cdc1f
feature: add initial support to form builder
glaubersilva Mar 15, 2024
376a421
feature: add sample block
glaubersilva Mar 22, 2024
1e04312
feature: add ConvertDonationFormBlocksToFieldsApi class
glaubersilva Mar 22, 2024
a8e032e
feature: add add-on settings in the form builder interface
glaubersilva Mar 23, 2024
fd508bd
feature: add sample options to the add-on settings page
glaubersilva Mar 29, 2024
84e7d18
refactor: rename color option type
glaubersilva Mar 29, 2024
5d54a4f
refactor: rename color option type
glaubersilva Mar 29, 2024
4726777
chore: update yoast polyfills
glaubersilva Apr 12, 2024
a6abb8d
doc: update unreleased tags
glaubersilva Apr 12, 2024
54df761
chore: add comments related to the compiled assets files
glaubersilva Apr 12, 2024
4959039
refactor: add notice about limitations related to the form settings e…
glaubersilva Apr 12, 2024
00f5f7b
refactor: change sample block icon
glaubersilva Apr 12, 2024
56ac8f3
refactor: replace strings
glaubersilva Apr 12, 2024
534bb7f
refactor: replace give-addon with ADDON_TEXTDOMAIN
glaubersilva Apr 12, 2024
5f7b498
refactor: remove test folder
glaubersilva Apr 12, 2024
37d52c4
feature: rename new files using namespace
glaubersilva Apr 12, 2024
2543788
fix: wrong paths
glaubersilva Apr 12, 2024
a9ea626
refactor: rename and remove old strings
glaubersilva Apr 12, 2024
7b0b2ef
doc: update Asset Compilation section
glaubersilva Apr 12, 2024
295d00c
chore: ignore full language folder
glaubersilva May 24, 2024
00a74ab
chore: update form builder library
glaubersilva May 24, 2024
44bc0f7
doc: fix tag name
glaubersilva May 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ cache
node_modules
public
.storybook-static
build

# Composer
vendor

# Assert directory
# Assets directory
assets/dist

# POT File
languages
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ plugin for WordPress.

### Asset Compilation
To compile your CSS & JS assets, run one of the following:
- `npm run dev` — Compiles all assets for development one time
- `npm run watch` — Compiles all assets for development one time and then watches for changes, supporting [BrowserSync](https://laravel-mix.com/docs/5.0/browsersync)
- `npm run hot` — Compiles all assets for development one time and then watches for [hot replacement](https://laravel-mix.com/docs/5.0/hot-module-replacement)
- `npm run dev` — Compiles all assets for production one time

- `npm run dev` — Compiles all assets (except Form Extension assets) for development one time
- `npm run watch` — Compiles all assets (except Form Extension assets) for development one time and then watches for
changes, supporting [BrowserSync](https://laravel-mix.com/docs/5.0/browsersync)
- `npm run dev:form-extension` — Compiles Form Extension assets for development one time
- `npm run watch:form-extension` — Compiles Form Extension assets for development one time and then watches for changes,
supporting [BrowserSync](https://laravel-mix.com/docs/5.0/browsersync)
- `npm run start` — Compiles all assets for development one time and then watches for changes

## Concepts

Expand Down Expand Up @@ -53,8 +57,11 @@ No domain code should reference (and therefore depend on) the `src/Addon` direct
keeps the dependency unidirectional.

#### Note for developers
If running `npm run dev` throws an error then check whether the `images` folder exists in your addon directory under `src/Addon/resources`.
1. If the `images` folder does not exist then create one.

If running `npm run dev` throws an error then check whether the `images` folder exists in your addon directory
under `src/Addon/resources`.

1. If the `images` folder does not exist then create one.
2. If the `images` folder isn't required then remove the code from `webpack.config.js`.

---
Expand Down
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

15 changes: 15 additions & 0 deletions build.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,21 @@
__DIR__ . "/tests/Unit/$domain"
);

rename(
__DIR__ . '/src/FormExtension/FormBuilder/ViewModels/GiveAddonViewModel.php',
__DIR__ . "/src/FormExtension/FormBuilder/ViewModels/{$namespace}ViewModel.php"
);

rename(
__DIR__ . '/src/FormExtension/FormBuilder/resources/js/types/GiveAddonSettingsProps.ts',
__DIR__ . "/src/FormExtension/FormBuilder/resources/js/types/{$namespace}SettingsProps.ts"
);

rename(
__DIR__ . '/src/FormExtension/FormBuilder/resources/js/interfaces/IGiveAddonFormBuilder.ts',
__DIR__ . "/src/FormExtension/FormBuilder/resources/js/interfaces/I{$namespace}FormBuilder.ts"
);

unlink(__FILE__);

echo(PHP_EOL . PHP_EOL . 'All set!');
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"require-dev": {
"kjohnson/since-unreleased": "^1.0.0",
"phpunit/phpunit": "^5",
"yoast/phpunit-polyfills": "^1.0",
"yoast/phpunit-polyfills": "^1.1.0",
"squizlabs/php_codesniffer": "^3.5",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"wp-coding-standards/wpcs": "^2.3",
Expand Down
96 changes: 68 additions & 28 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions give-addon-boilerplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use GiveAddon\Addon\Activation;
use GiveAddon\Addon\Environment;
use GiveAddon\Domain\AddonServiceProvider;
use GiveAddon\FormExtension\FormExtensionServiceProvider;

/**
* Plugin Name: ADDON_NAME
Expand Down Expand Up @@ -50,6 +51,7 @@ function () {
// Check Give min required version.
if (Environment::giveMinRequiredVersionCheck()) {
give()->registerServiceProvider(AddonServiceProvider::class);
give()->registerServiceProvider(FormExtensionServiceProvider::class);
}
}
);
Expand Down
1 change: 1 addition & 0 deletions globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
declare module '*.svg';
declare module '*.module.css';
declare module '*.module.scss';
declare var wp: any;
Loading
Loading