Giter VIP home page Giter VIP logo

customize-plus-builder's Introduction

Customize Plus Builder by KnitKode

GitHub release code style: prettier

Building Theme options for the WordPress Customizer has never been easier.

Free vs Premium

Customize Plus Builder comes in two versions:

The two versions have the same functionalities in regards to building a customizer tree and are always updated at the same time. Their difference is that only with the WordPress plugin you can save, edit and manage your customizer trees in the WordPress installation of your choice. This gives you the freedom and comfortableness of build and tweak, update and release your customizer trees step by step.

Bugs

If you find an issue, please let us know here, thanks!

Support

This is a developer's portal and should not be used for support but only for development. Please visit the support page to see other options.

You can also try to see if someone is in our chat room:

Gitter Chat

Contribute

Anyone is welcome to contribute, there are various ways you can do it:

  1. Raise an issue on GitHub
  2. Provide feedback and suggestions on enhancements

Donate

Liberapay

Development

customize-plus as a local dependency

To include customize-plus in dev environment you can link the local repo. To do so: cd to customize-plus root project folder and run yarn-link, then cd in this project root folder and run yarn link @knitkode/customize-plus, then you might need to change these two npm scripts in the root package.json:

"prewatch": "yarn link @knitkode/customize-plus",
"init": "git submodule add [email protected]:kuus/dev-lib config/dev-lib && cd packages/app && yarn link @knitkode/customize-plus",

You might want to do the same for the package @knitkode/dashicons.

Components hierarchy

  • Each CustomizerComponent class defines its schema of args.
  • Each CustomizerComponent has its own Editor${ComponentType}.js whic
Editor
|_EditorPanel // redux update model happens here
| |_...EditorPanelArg (main)
|   |_...EditorArg (ArgString | ArgArray | ArgColor | etc.)
| |_EditorArgsGroup (advanced)
|  |_...EditorPanelArg
|     |_...EditorArg (ArgString | ArgArray | ArgColor | etc.)
|_EditorSection // redux update model happens here
| |_...EditorSectionArg (main)
|   |_...EditorArg (ArgString | ArgArray | ArgColor | etc.)
| |_EditorArgsGroup (advanced)
|  |_..._EditorSectionArg
|     |_...EditorArg (ArgString | ArgArray | ArgColor | etc.)
|_EditorField // redux update model happens here
  |_EditorControl
  | |_EditorArgsGroup (main)
  | | |_...EditorFieldArg || ControlSpecifcArg
  | |   |_...EditorArg (ArgString | ArgArray | ArgColor | etc.)
  | |_EditorArgsGroup (basic)
  | | |_...EditorFieldArg
  | |   |_...EditorArg (ArgString | ArgArray | ArgColor | etc.)
  | |_EditorArgsGroup (specific)
  |   |_...EditorFieldArg
  |     |_...EditorArg (ArgString | ArgArray | ArgColor | etc.)
  |_EditorSetting
  | |_SettingDefaultArg || EditorFieldArg (default)
  | | |_Arg
  | |_EditorArgsGroup (basic)
  | | |_...EditorFieldArg
  | |   |_...EditorArg (ArgString | ArgArray | ArgColor | etc.)
  | |_EditorArgsGroup (advanced)
  |   |_...EditorFieldArg
  |     |_...EditorArg (ArgString | ArgArray | ArgColor | etc.)

Validation

Validation is used to validate a tree client side. The goal is to make it almost impossible for the user to save or export an invalid Customizer Tree. It is performed in two times:

  1. on change of any model value of the currently editing Customizer Component (panel/section/field(control/setting));
  2. on saving and on export, applying to all the Customizer Tree, preventing those actions to succeed in case of validation failure.

The validation process occours at two levels:

  1. at the schema definition, each arg can specify an array of validator functions (e.v. isId, isFloat, ecc.) and of validator error messages respectively in the properties $builderValidators and $builderErrors of each arg
  2. at the customize component model level, that is in each Customizer Component model class (e.g. controls/color/index.js), here are managed validation logics that take in account the relationship between various args set on the model instance. Each model class can override the method $builderValidate where to

TODO

  • Tree validation client side
  • Tree validation server side

License

License KnitKode


®️ KnitKode 2018 | knitkode.com | [email protected]

customize-plus-builder's People

Contributors

knitkode avatar kuus avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.