Coder Social home page Coder Social logo

lazy-blocks-custom-control-template's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lazy-blocks-custom-control-template's Issues

Template build is throughing an exception

When following the instructions on https://lazyblocks.com/documentation/examples/create-custom-control/ and running the build, the following error pops up:

Syntax error: unexpected token in jsx file

I had to update the babel-loader config like this:

{
    test: /(\.jsx|\.js)$/,
    loader: 'babel-loader',
    exclude: /node_modules/,
    query: {
        presets: ['@babel/react'],
    }
}

and use new babel versions

    "@babel/core": "7.11.6",
    "@babel/cli": "7.11.6",
    "@babel/preset-react": "7.10.4",
    "babel-loader": "8.1.0",

To make the build work

Applying filter_control_value on custom controls.

In the base plugin I've noticed that a new method has been added for controls called filter_control_value that can be used to transform output of that control to streamline and replace some of the existing output transformation filters. I'm noticing that when I declare this in the custom control in the same way it's declared in the control classes in the base plugin, it doesn't seem to be running this function. I also tried to add_filter for filter_control_value in the __construct method of the custom control similar to how it is in _base and also did not observe the function influencing the output. Can custom controls use filter_control_value?

Minified script and style

The file script under assets/js/CONTROL-NAME.min.js is minified and i do not understand what is for.
Does it should be always added? Is it required?

I notice inside the vars

  • CONTROL_NAME_custom_attribute
  • CONTROL_NAME

and the text class NAMESPACE-lzb-control_CONTROL_NAME.
So i presume that those names should be replaced, like into the css file assets/css/CONTROL-NAME.min.css.
Can you please include the non-minified version of those files also, please?

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.