Git Product home page Git Product logo

revision-notes's Introduction

Welcome to my GitHub

revision-notes's People

Contributors

aaronjorbin avatar helen avatar kenshino 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

Watchers

 avatar  avatar  avatar  avatar

revision-notes's Issues

Consider front-end functionality

Hey @helen, in the interest of transparant publishing, I'd love it if there was a flag for revision notes that said "public", and a template tag to output them on the frontend.

Consider comment support

Comments don't actually have revisions, which is its own problem, but in the meantime it seems like storing a note when saving changes to a comment could be quite useful. In particular, I am thinking about Make/Core, where our general practice is to edit objectionable comments instead of delete them, but don't really have a central way to store what the content used to be and why it was changed.

Block editor integration with state doesn't support undo and continues to save the old revision note on new revisions if not edited

This seems to be related to using state (possibly related: WordPress/gutenberg#18755), which is being done primarily to avoid the unsaved changes warning being shown when the user hasn't done anything except load the page, because the field value does need to be cleared out on load (and post-save) but if that's dispatched to meta immediately it's considered a "save". However, this does come with a bug, in that if you don't end up changing the revision note I believe it will still save the old one underneath.

I think there are two paths here, both of which start with getting rid of state and going back to dispatching the change to the editor data directly in onChange:

  1. Figure out how to ignore a given piece of data from whatever it is that tracks the "dirty"/edited state in the block editor, and dispatch to meta.
  2. Use register_rest_field() with an empty string for the get_callback and updating the post meta in update_callback, dispatching the change to said REST field. The existing routine will catch it for the revision. I believe @TimothyBJacobs mentioned something along these lines yesterday that I didn't quite fully grasp at the time, and @johnwatkins0 revived today.

Revisions without content changes are wonky :)

Checked two situations of attempting to leave a note with no other changes:

  1. Post with no revisions
  2. Post with existing revisions

With no revisions, upon save, nothing in the UI changed. No revisions listed (makes sense). Once making any change to content and saving, the original revision note was applied to the initial revision, so that seemingly worked, though perhaps expected the revision UI to appear.

With existing revisions, it seemingly didn't work. I tried to leave a note with no changes, then changed something. The UI reflected each revision correctly with the no-update note seemingly lost.

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.