Coder Social home page Coder Social logo

pixelgrade / nova-blocks Goto Github PK

View Code? Open in Web Editor NEW
63.0 7.0 4.0 56.39 MB

A collection of design-driven WordPress editor blocks committed to making your site shine like a newborn star 💫

Home Page: https://pixelgrade.com/plugins/nova-blocks/

License: GNU General Public License v3.0

JavaScript 55.28% PHP 32.30% SCSS 12.42%
gutenberg gutenberg-blocks wordpress-plugin wordpress block-editor design-system color-system font-styles

nova-blocks's Introduction

nova-icon

Nova Blocks for Gutenberg Space

Nova Blocks is a collection of distinctive Gutenberg blocks, committed to making your site shine like a newborn star. It is taking a design-driven approach to help you made the right decisions and showcase your content in the best shape.

Download for Free

Positioning

Clear and obvious, exciting and not afraid to take risks, distinctive, forward thinking.

  1. Obvious not confusing
  2. Exciting not dull
  3. Distinctive not common

Principles

  1. Decisions not options.
  2. Purpose-driven
  3. Distinctive
  4. Cross-themes oriented

FAQs:

Can I use the Nova blocks with my own theme?

Yes! Nova Blocks are built to inherit your theme style as much as possible.

Is Nova Blocks free?

Yes! Nova Blocks' core features are free to use.

Installation

  1. Log in to your WordPress dashboard and navigate to the Plugins menu, and click “Add New.”
  2. In the search field type “Nova Blocks,” then click “Search Plugins.”
  3. Once you’ve found the plugin, click “Install Now,” and then click “Activate”.
  4. Do the same steps for the “Gutenberg” plugin and install the latest version of the Editor.
  5. Start using the new blocks on your pages by searching and/or selecting them from the Nova Blocks section of the Gutenberg Editor.

Completely compatible with the following WordPress themes:

Contributing

The essence of open source is that by freely sharing the code, you have the freedom to use it for any purpose, study how it works and adapt it to your needs, improve the program and share your improvements with the community so that we all benefit. 🙏

It's great if you're willing to use your skills, knowledge, and experience to help further refine this project with your own improvements. We really appreciate it and you're 💯 welcome to submit an issue or pull request on any topic.

How can you help?

  • 🐛 Discovered an issue? Please report it here and help us fix it.
  • 🛠 Fixed a bug? That’s fantastic! Send a pull request and we will look over it.
  • 🙋 Need a feature? Please take a moment to find out whether your idea fit the wider scope of this theme and provide as much detail and context as possible. Then propose it here.
  • 💎 Have you made something great? Share it with us.

Contributors

A manually curated list that include all the valuable people that have contributed to this project with code, user testing, feedback, or mockups. Thank you!

Local Environment Setup Pointers

You need to be careful since we require certain Node.js (v14) and PHP (v7.4) versions.

For ease of development, it is best to use nvm for node version management and automatic node version switching on shell navigation. For the zsh shell the easiest way is to use oh-my-zsh with the nvm plugin activated.

We use the following oh-my-zsh plugins: plugins=(composer git nvm npm) configured in ~/.zshrc. For automatic node version switching, place this line in ~/.zshrc just below the plugins line: NVM_AUTOLOAD=1. Now whenever you enter a directory through the shell, if it finds a .nvmrc file, it will switch to the specified node version.

License

Nova Blocks source code is released under the GNU GPL v3 license or later. This is so you have the freedom to create something beautiful and share it back with us.

2019-2022 © Pixelgrade.

nova-blocks's People

Contributors

acosmin avatar dependabot[bot] avatar georgeolaru avatar loxk avatar madalingorbanescu avatar pixelgradebot avatar razwan avatar vladolaru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nova-blocks's Issues

Add Block: Map

Here is a proposal for an initial set of options for the Map Block.

From my research, the Jetpack Map Block have the best UX currently, while many others simply have thrown all the possible options.

We're looking for something very simple in terms of options, single location and minimal styling (let the theme or Style Manager enhance its appearance).

Document (Dropbox)

image


⚠️ I will prepare some mockups for the onboarding flow to make it clear about how it works.

withParalax isn't triggering update after the block is moved

Describe the bug
WP 5.3 adds an "animation" when you click the move block up/down buttons. It's actually a css transform without a transition or a set duration (react-spring). When you move a block it will only update the position when the animation starts, not when it ends. This results in a black space above or below the image. transitioned event doesn't work because it's not a transition. MutationObserver works in this case...

Screenshots
https://imgur.com/ekzUsCJ

#1 User Testing Enhancements

Media Card Block

  • Add tooltips labels to "Position" buttons from Toolbar
  • Add "Swap Media" button in the Toolbar
  • Clicking on the image unintentionally opens the Media Library upload modal (a separate button might help)
  • "Emphasis Levels" options for Content and Block are troublesome to understand but it helps that changes are reflected live
  • Thinking to add a "Focus" option for Media images when they are cropped

Hero Block

  • Minimum height "Full" option is confusing. Change it to "Full Screen" (or something similar)
  • "Color Settings" option from Toolbar is causing an "unexpected error" when clicked
  • change "Height" section options from Select to Radio buttons
  • Add a "Focus" option for media background

Slideshow Block: Enhance Gallery Behaviour

  • Make sure that the Media Library behavior is similar to the default Gallery block. A few times I encountered a strange response (random order upon editing the gallery or even missing images):
    👉 https://cl.ly/26093f

  • Once there are images inside the gallery, it would be nice to replace the two buttons with a single "Edit Gallery" one (keep the description though):
    image

Reference: Mockup (Figma)

Notice: Undefined index error

A few Rosa 2 cutomers noticed warning on their websites:

Notice: Undefined index: source in /var/www/wp-content/plugins/nova-blocks/lib/extras.php on line 353.

Undefined index: source in lib/extras.php on line 353

Describe the bug
Notice error on 1.1.5

Notice: Undefined index: source in [redacted]/plugins/nova-blocks/lib/extras.php on line 353

Looking at the code there is:

if ( ! isset( $attributes[ $key ] ) ) {

	    	if ( $attributes_config[ $key ][ 'source' ] === 'meta' ) {

Because of first condition the second one cannot be met. If $attributes[ $key ] isn't set, $attributes[ $key ] ['source'] can never be equal to the string 'meta'

Toolbar options should not be duplicated in Sidebar

@madalingorbanescu recommends in #7 that we have to decide where do we want to keep the controls for the Hero Block ("Content alignment" and "Colors") as they are in both locations: Toolbar and Sidebar.


Considering that these are block-level controls and that they will stay outside of a (future) Style Manager system, I would suggest to keep them in the Toolbar even though they are needed more screen space than a few simple buttons.

Block Design best practices: https://developer.wordpress.org/block-editor/designers/block-design/

Anchor Links for Blocks to create One-Page Websites

Is your feature request related to a problem? Please describe.
I wanted to create a One-Page website but I can't add Anchor text for blocks.

Describe the solution you'd like
Add the possibility to insert anchor text in the "Advanced" area, just like there is one when selecting a heading -> https://cl.ly/d3da2f

Add Block: Headline

Create a block that allows us to create headings with complex styles similar to those present in Osteria and Rosa. It should output only one heading element for a proper document outline.

image

We could use the default blockquote as a reference

image


Document (Dropbox)

Load Image Placeholders from Unsplash

Each time we insert a block that has Media support inside (eg. image, gallery) and to have a feeling of how it looks, it would be great if we fill it with placeholder images.

I would suggest to look into Unsplash API and see how we can build a system to load an image and use it as a placeholder.

The images don't need to be uploaded to Media Library – we can use an external URL from Unsplash, as the image will be mostly used for preview.


Here are a few plugins that are using Unsplash API to insert images into the editor:

Experiment with Hover Preview on Options

Paste app has a surprisingly intuitive UX flow when previewing options which use the "hover" event instead of "click & try".

Screen Recording 2019-07-16 at 01 48 PM

I think the same approach could be applied to some of the options from a block and make user decision easier to take.

@razwan have a look and let's see how it feels in Gutenberg context.

Improve resize handling on mobile devices

Most mobile browsers hide the address bar when the user scrolls down which triggers a resize event. This causes the parallax library to reinitialise all of its elements which causes flickering every time the user changes the scroll direction.

Add Block: Food Menu

Create a block that allows us to create food menus similar to menus present in Rosa and Osteria.

My initial proposal will be a parent block ( Food Menu ), with settings for styles ( solid or dotted ) and layout ( list or grid ). Plus a child block ( Food Menu Item ) with settings for alignment and an option to make it featured ( example )

This block should output:

  • Menu Section Title
    • Menu Item Title
    • Menu Item Description
    • Menu Item Price

Document (Dropbox)

Add Block: Announcement Bar

Create a block that allows displaying a featured message through a banner across the top of your site.

Name: Announcement Bar
Description: Display a featured message through a banner across the top of your site.

image


Because the block should be available site-wide, I think it should be allowed only on a Block Area called “Promo Bar” (like the Logo/Menu is placed in Header).

Document (Dropbox)

Slideshow Block: Adding Core Options

Here is a proposal for an initial set of options for the Slideshow Block:

Document (Dropbox)

image

The differences from the Hero Block are related to:

  • defaults (alignment, colors)
  • the addition of the Gallery Style option
  • the slightly changed behavior of the Slideshow Height

Reference: Mockup (Figma)

IE Edge - withParallax component doesn't work

Hi! I was playing around with this component and noticed that blocks like Hero & Slideshow don't work in Edge. The problem is getBoundingClientRect() doesn't return the y position in this browser.

The solution would be to use top as they are the same.

const containerBox = this.container.getBoundingClientRect();
const progress = ( this.state.windowHeight - containerBox.y ) / ( this.state.windowHeight + this.container.offsetHeight );
const actualProgress = Math.max( Math.min( progress, 1 ), 0 );

You should change containerBox.y with something like positionTop = containerBox.y || containerBox.top

Hero Block: Some options are not working

  • 1. Content alignment from Toolbar is not working. When it's clicked we get this: https://cl.ly/147320bfcd82. Currently, there is already a Content Position control on Inspector ( https://cl.ly/a943c9e9e69b), and I don't think we need another one in Toolbar. We have to decide where do we want to keep it.
  • 2. Invert colors from Toolbar is not working. When it's clicked we get this: https://cl.ly/147320bfcd82. It's exactly the same situation as for Content Alignment. There is already a working Color settings control in Inspector ( https://cl.ly/da6ee34c8c21 ). We have to decide where do we want to keep it.
  • 3. Swap Media is currently not working, with the following error in console: setAttributes is not a function
  • 4. Position Indicator is currently not working, and maybe we should consider removing it as a default option for blocks.
  • 5. Parallax - even disabled, in the editor I'm still getting the effect.

For the first 2 issues, we have to decide where do we want to keep the controls. In my opinion, both of them should be on the right side panel ( Inspector ). See #10

Regarding the third issue, we have to choose what Icon and what text we are going to use in all blocks for that option, because currently in Media Block, the option is called Edit Media and is having another icon. See #9

@razwan @georgeolaru

Cut off Design Options across the Core Blocks

Let's seek a way to reinforce the Design System thinking across the core blocks and even add some limits to those options that move away the user from the Content Editing experience and morph into the Design Decisions space.

With the blocks built within Nova Blocks we already outline an example set of options that benefit from a set of design tokens (colors, fonts, spacing). They are provided by a design system put in place by a theme or another plugin like Customify.

But inside those blocks (eg. Hero or Media Card), we're using core blocks (eg. Headings, Buttons) and that's where the experience of laying out a page loses its consistency.

Use-case: Button block

The Button blocks have Styles created to match the Theme visual style (maybe they used the same source for the design tokens), but it also has options for Background Color, Text Color, and Border Radius which are just some of the few (low-level) values that can be used to style a button (there are also font sizes, padding, shadows and so on).

image

💭 In an envisioned future

we might be able to set the Button Styles right inside the Gutenberg editor. By accessing a separate panel we will use a CSS-like design interface connected to the colors, fonts and spacing tokens and we will be able to save the style globally and use them consistently across the website.

Exploring a solution

We need to build a system to move away the above-mentioned options from the user sight and leave only those options that convey an intent (eg. for the most important button in page, use the primary style).

We should take into consideration visually hiding those sections or remove them programmatically – whatever fits the scope of making them unavailable for the user.

Add Video Support to Hero Blocks

Let's explore the option to insert self-hosted video to create a looping visual element behind the content.

Currently, the block breaks once you select a video file in the Media Library:

This block has encountered an error and cannot be previewed.

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.