Giter Site home page Giter Site logo

colorful-tones / devrel-feedback Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 0.0 556 KB

A WordPress 'Feedback' block that uses the Interactivity API to submit feedback on single posts.

PHP 73.85% JavaScript 13.78% SCSS 11.95% CSS 0.43%
interactivity-api wordpress wordpress-block wordpress-blocks wordpress-plugin

devrel-feedback's Introduction

Feedback block

Fork it, or download the latest release, and make it your own!

This is an example block that utilizes the upcoming public Interactivity API that will be a part of the WordPress 6.5 release (March 26, 2024). Check out the original Make announcement for the full details.

Description

This block provides a simple form for users to submit a sentiment about a post: 'Love it', 'It is okay', 'Not great', 'Hate it'. The can also submit some feedback with their chosen sentiment.

Note

You must have WordPress 6.5 Release Candidate running on your site. You can use the WordPress Beta Tester plugin and Local to spin up a quick testing site on your own computer.

Installation

  1. Download the .zip release from this repo's Releases.
  2. Un-zip and add it to your WordPress site.
  3. Activate it.

The plugin uses Block Hooks to attach the Feedback block to a single post template's core/post-terms. A good way to test this is having the Twenty Twenty Four theme active, or a block theme that you're certain has the core/post-terms block on each individual post.

ToDo

  • Thorough accessibility testing - right now the markup was quick and fast. However, focus, tabbing and overall experience needs attention.
  • Clean up CSS - again, I was moving fast and likely that we can scope things better and even load in different contexts: front end, back end, etc.
  • Render something better in the site editor. Right now, the focus was on the final front end rendering (render.php), and little attention was paid to the block's edit.js.

Changelog

0.1.3 โ€“ 2024-04-12

  • Quick and fast release. Its working. ๐Ÿ˜€

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.