Giter Club home page Giter Club logo

maxi-blocks / maxi-blocks Goto Github PK

View Code? Open in Web Editor NEW
36.0 3.0 5.0 95.56 MB

We help website builders with a passion for design create professional websites and raise rates using our open source blocks and cloud library of fast-styling web templates.

Home Page: https://maxiblocks.com/

License: Other

PHP 18.48% JavaScript 76.29% SCSS 5.23%
iconsets nocode page-builder pagebuilder templates website-builder website-design website-template webtemplates wordpress

maxi-blocks's Issues

PanelColorSettings component error

Hello team,
working on ImageSettings components I've been experiencing some issues and finally seems they come from PanelColorSettings component. I'll explain here:

Problem

ImageSettings components works, as other does, with an object that is stringified and saved as string on props. Everything runs perfect, but each time I changed any option related with color, all the properties of the object returned to the last saved ones. For example, saved the block with the image with alignment 'left', changed to 'right', and after changed the background color: the alignment returns to 'left'.

What happens?

Seems like the scope of the PanelColorSettings is not catching the value send. Checking the object stringified, it gets to the component once and is not update, so it's returning the object always on its first schema.
The reason? I don't know. If you figure out why, please, let me know: I'll sleep better ๐Ÿ˜›

Solution

I create a cleaner solution for having a color component. I called it ColorControl, and also gives the opportunity to add an alpha value to the color.
Some of the advantages are:

  1. Returns a RGBA value, so it can have Alpha value (opacity)
  2. Can have GradientPicker component and activate it easily
  3. Would be cleaner on the code

Some disadvantages are:

  1. It would need to be implemented in all the existent components
  2. Needs new styling CSS, may can be reused from the old component.

You'll find more on wiki


You'll find the prototype on my branch. I would appreciate your opinion, suggestions or comments in order to keep working on it.
Thanks for your time ๐Ÿ˜„

Block Toolbar

Detected on Image Box Extra, but should be something to review in all the blocks:

Block Toolbar

BoxShadow target on ImageSettings

Problem

BoxShadow affects the <img> element, not the <figure>. So, if there's a element, this is not affected by the box-shadow

Image on backend:
On blue the <figure>
Caption is over the box-shadow
Box-shadow bug - backend


Image on frontend:
On black the <figure>
Caption is behind box-shadow
Box-shadow bug - frontend

Should the box-shadow affect the image or the figure?

Typography component

Bugs and improvements:

  • Bug: doesn't present style correctly
  • Bug: in case it needs to load more than one font, just loads the first
  • Bug: strange behavior on click reset
  • Show the properties that each font have. I.e: if 'Montserrat' font just have 100, 200, 300 and 400 for font-weight, don't show all the options; just the ones that this font accepts

ImageSettings component

Is known that ImageSettings component has, at least, one known bug:

  1. When changing any color of the options, rest of changes can dissapear
    Is related with #41 and needs its fix to move forward ๐Ÿ‘

Font Loading

Right now it's necessary to call for an init function to get and load from external the saved fonts on the block on the backend. Also, code is duplicate for both backend and frontend. I would like to do it automatically and without duplicating the code.
Done 80% of it, just need to finish some details

Responsive Style improvements

There are some minor fixes to consider on it:

PHP Notice in class-responsive-frontend-block-styles.php

Getting
[16-Mar-2020 12:37:10 UTC] PHP Notice: Undefined property: stdClass::$unit in /home/elzadj/Work/WordPress/wp-content/plugins/gutenberg-extra/src/includes/classes/class-responsive-frontend-block-styles.php on line 52

in /gutenberg-extra/src/includes/classes/class-responsive-frontend-block-styles.php

Fix it please.

PopoverControl icon

Adding icon by CSS pseudo-elements as ::before or ::after on Typography component limits the possibility to change the icon assuming different situations. Is the case of the novel ExternalLink component, that is not able to have another icon. I suggest to enhance PopoverControl component in order to have an icon options ๐Ÿ‘

ImageCrop loads cropped image on load

Problem

On choosing custom size image, ImageCrop component loads a cropped image if it has been cropped before or it's cropped in another post/block. So the image can be just cropped once.
It means that, saving on the same image object creates a conflict: when is loaded in another block and select custom size, it retrieves that size. So, it will be modified in all the blocks.

Solution

The solution could be to save the image as a post meta, and not in the image object.

Add Google Font Faces to our Gutenberg components

From Joshua: "Gutenberg doesn't match with the way Customizer loads the front as meta on the frontend, so I'll be implementing the native JS API FontFace for the GX Image Box, and ensuring with a polyfill that it would be able for all devices, even old ones. This API doesn't need installation or key, so it will be 100% integrate".

Fix bug with the Typography popover

Sometimes it opens automatically when you choose a GX block.

To reproduce:
Open GX Image Box block, click on 'Style' tab, click on 'Title Typography' icon and then save the post. After, reload the page, and click on the block. The block opening the Popover.

Default values on FontLevel cange

Problem

On changing the value on FontLevel, Typography component values are not being changed, and they are not affected

Solution

Make FontLevel component able to modify Typography values

Add positions for image on ImageSettings

Problem

On Image Box Extra block, if setting the image on a side, ImageSettings components don't allow to decide where the image should go in terms of Y-axis

Solution

Add up&down option. May need a new component that substitute AlignmentControl that let have 5 positions: top, right, bottom, left and center.

Typography and default font settings

Hello team,
in order to give default properties to elements subjected to Typography component, we need to face the next situation:

Problem

The script that is loading the fonts (as the rest of styles) is activate once is a change on some prop. It means that, in fonts case, if we put e.g. font-family: Roboto, Roboto font will be download from GFonts, but the property won't be added to the element until we do some change on the Typography control (as changing the size, for example).

Solution

As we have default settings, I thought a SCSS code that will take a global class that all the blocks should contain, and inside a reference to each of the different headings and paragraphs and other typo elements. Something like:

    .general-class-for-all-gx-blocks {
        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        p {
            font-family: Roboto
        }
        ...etc
    }

Let me know your ideas and ways to implement it. BTW, you'll find that all wikis have been updated with new default settings for Typography component ๐Ÿ‘

LinkedButton needs PSD

This is how it looks closed
LinkedButton - close


This is how it looks opened
LinkedButton - open


If needs options as target or rel:
LinkedButton - options
(it says: open in a new tab)

Dimension control improvements

Future improvements for Dimension Control:

  • - Border radius should have another label under the numbers
    Unit should affect just one device, not all
  • - Sometimes, on value input, the left 0 doesn't dissapear
  • - Should check CSS conflicts with themes as WP core themes
  • - Negative values

MiniSizeControl range value problem

Problem

When displaying some measures like 'width' or 'height', if it's selected 'px', doesn't allow to go further than 100. It doesn't allow negative values too.

Solution

Make the component able to have this options

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.