Coder Social home page Coder Social logo

p2-resolved-posts's People

Contributors

danielbachhuber avatar dd32 avatar evansolomon avatar jkudish avatar kilohertz77 avatar matthusby avatar nickmomrik avatar willmot avatar xknown 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

Watchers

 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  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

p2-resolved-posts's Issues

Show admin notice when a theme other than P2 is activated

Currently, the plugin only works with P2, which is intended, and will kick out of everything if P2 isn't active. We don't show any sort of notice though and this could be confusing. Let's show an admin notice when P2 isn't active but you've activated the plugin.

Audit log for those flagging the post

When a user flags a post as a given state, let's log the state they changed it to, the timestamp, who did it and then make that information visible on the post. Transparency in action.

optimize javascript

there are some minor Javascript optimizations that can be done for readability and performance

Helper functions for registering arbitrary states

To make the states of P2 Resolved Posts easy to customize, we should offer helper functions. I'm thinking there should be two, one to register a new state, and one to remove a new state.

The basic model for a state looks like this:

$states[] = (object)array(
                        'slug'          => 'totally-resolved',
                        'name'          => __( 'Totally resolved', 'p2-resolved' ),
                        'link_text'     => __( 'Totally resolved', 'p2-resolve' ),
                        'next_action'   => __( 'Remove resolved flag', 'p2-resolve' ),
                    );

The 'slug' and 'name' should be required arguments, and 'link_text' and 'next_action' can be optional. If they aren't included, they'll be derived from the required arguments.

A bonus is that you'd be able to insert this state either 'before' or 'after' a given state (e.g. an additional parameter, and then you'd get the array key of the index state).

Restrict who can change a post's state

Currently, anyone whether they're logged in or not can change the state of a post. We should allow the admin to restrict to logged in users, or restrict to specific users.

add keyword support

support for !resolved, !unresolved and !reset when creating a post or making a comment which should change the state of the post

Add a checkbox to mark the post as resolved when commenting on it

It would be nice to simplify the process of marking a post as resolved when commenting on it. Currently, I have to write a comment then mark it as resolved. Instead, I'd like to have a checkbox to mark the post as resolved that I can check as I comment on the post,

Comments are closed when a thread is resolved

When you resolve a thread, the comments should then be closed. It would be nice if you could then "pin" a comment to the top of the thread as the resolution and/or open a new thread as a spin-off of this existing thread

Clean-up/reorganize code

With just over 1000 lines of code, it's becoming difficult to find things within the plugin and general readability is affected. I'd like to clean-up the plugin by doing the following:

  • Refactor a few functions that are either very long, repetitive or duplicate code from other function(s).
  • Move the widgets to an external file
  • Move css to an external file
  • Re-order functions for a more logical flow

Add a checkbox to mark the post as unresolved when creating it

It would be nice to simplify the process of marking a post as unresolved when creating it. Currently, I have to write the post and then mark it as unresolved. Instead, I'd like to have a checkbox to mark the post as unresolved that I can check as I create the post,

Support for arbitrary states

It would be nice if you could register arbitrary states, and have those states reflexed in various parts of the user experience.

Screenshots

It would be lovely to package screenshots of the plugin in the wild.

Load textdomain, generate .pot file

  • The plugin needs to load_plugin_textdomain( 'p2-resolve', false, dirname( plugin_basename( FILE ) ) ); on init
  • A p2-resolve.pot file needs to be generated to a directory ('langs' or 'languages'), so that translators can localize

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.