Code Monkey home page Code Monkey logo

editorial-flow's Introduction

Editorial Flow

Like Edit Flow, but clearly better ๐Ÿ˜œ.

Disclaimer: This is a test project, not ready for use on production sites.

Module: Editorial Comments

Editorial comments help you cut down on email overload and keep the conversation close to where it matters: your content. Threaded commenting in the admin, similar to what you find at the end of a blog post, allows writers and editors to privately leave feedback and discuss what needs to be changed before publication.

To utilize this module, head over to your nearest (testing) WordPress site and install/activate the plugin. Then in the block editor for a new post, head over to the sidebar's plugin list and select "Editorial Flow". View a quick demo video.

Extensibility: Adding Custom Modules

Adding a custom module:

class My_Custom_Module extends Editorial_Flow\Modules() {};

// Register the module.
$module = new My_Custom_Module();
Editorial_Flow()->register_module( $module );

Quickly adding a panel to the EF sidebar in the Block Editor:

var el = wp.element.createElement;

wp.hooks.addFilter( 'editorialFlowSidebarContent', 'efNotificationsPanel', function( content ) {
	content.push( NotificationsPanel() );
	return content;
}, 20 );

function NotificationsPanel() {
	return el( wp.components.Panel, {},
		el( wp.components.PanelBody, {
				title: 'Notifications',
				icon: 'megaphone',
				initialOpen: false
			},
			el( wp.components.PanelRow, {}, 'Example Content' )
		)
	);
}

Contributing

Editing JavaScript files:

  1. npm install
  2. npm run dev to watch for changes and rebuild automatically.
  3. npm run build to compile your changes into the minified files ready for release.

Running PHPUnit Tests:

  1. Install PHPUnit: https://phpunit.de/getting-started/phpunit-7.html
  2. Intialize the testing environment.

Example:

cd path/to/editorial-flow/
bash tests/bin/install-wp-tests.sh wordpress_test root '' localhost latest
  1. Run phpunit

editorial-flow's People

Contributors

wpprodigy avatar

Watchers

 avatar  avatar

editorial-flow's Issues

Future TODOs

Just noting some additional items that would need to be done:

  • Support pagination on the frontend.
  • Localize the JS text strings.
  • More robust error handling.
  • Cleaner loading/processing states.
  • Animations for newly added comments / shifting down the reply box.

And some other various ideas:

  • Revisit the idea of threading, maybe like how Slack does it.
  • Could display the current user's comments differently, like a texting conversation would.
  • Maybe allow comments to be linked to specific blocks / sections?
  • Highlight the icon if there are unread comments for the current user.

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.