Adds a widget and REST endpoint for the purpose of displaying post revisions inline on the frontend.

Overview

Post History

This widget allows visitors to easily diff posts against their earlier revisions, displaying diffs of HTML inline.

It should be plug and play: Just add the widget to a sidebar that will appear on a page or post. It will detect everything it needs. If you have more complex needs, the code is heavily documented and includes many filters to modify behavior. If the widget's design doesn't suit your purposes, its class is easily extendable, with methods for generating all of the necessary HTML.

Comments
  • 530: Bug - Update The Revisions Widget

    530: Bug - Update The Revisions Widget

    Issue Number

    Issue humanmade/hm-playbook-theme#530

    Description

    This change updates the Revisions Widget style bugs and date format.

    | Default Style | Hover & Focus | Selected Revision | | ----------- | ----------- | ----------- | | Screen Shot 2022-12-23 at 2 28 04 PM | Screen Shot 2022-12-23 at 2 28 18 PM |Screen Shot 2022-12-23 at 2 28 39 PM |

    Steps to Test

    1. Navigate to a page with a Revision widget.
    2. Test the "Load Revision" button and make sure it displays with a border and color background on focus and hover.
    3. Check that the date is displayed in YYYY-MM-DD format.

    Acceptance Criteria

    • [x] The widget uses YYYY-MM-DD to align with dates formats in the rest of the Playbook
    • [x] ~The widget does not include the time of the revision~ Clean up the styling for this to make it more readable
    • [x] There is appropriate spacing between the last revision event and the Load Revisions CTA within the widget.
    • [x] Has this been tested in multiple browsers
    • [x] Has it been accessibility tested
    • [x] Have all linters and PHPCS checks been run
    • [x] Does the README.md and the Wiki need updating to reflect these changes
    • [x] Do any articles on how to update the Playbook in https://playbook.hmn.md/category/updating-the-playbook/ need updating to reflect these changes.
    opened by ajvillegas 1
  • Add development branch workflow

    Add development branch workflow

    The current build workflow only supports version number-tagged production releases, which makes it difficult to test things on a development instance. To enable better usage on our test instance, this PR implements a GH action to build to a develop-built branch upon merge to this repository's develop branch.

    opened by kadamwhite 0
  • Properly load scripts and styles

    Properly load scripts and styles

    The path to the asset manifest is incorrect following my work in #3,

    Asset_Loader\enqueue_asset(
    	HM_POST_HISTORY_DIR . 'assets/build/asset-manifest.json',
    	'frontend.js',
    	// ...
    

    since the file is production-asset-manifest.json, and asset-manifest.json does not exist, Asset Loader silently defaults to trying to load the asset as

    {path where it expected manifest to be}/{handle you provided}
    HM_POST_HISTORY_DIR . 'assets/build/' . 'frontend.js'
    

    However, since the JS and CSS are built with a hashed filename, that file doesn't exist either—and causes a 404.

    Fixes #8

    opened by kadamwhite 0
  • Possible asset loading issue in built version

    Possible asset loading issue in built version

    Errors observed in production:

    E_USER_NOTICEStyle hm-post-history error [altis.security.browser.file_not_exists]: File for hm-post-history does not exist
    /usr/src/app/vendor/altis/browser-security/inc/namespace.php:122
    E_USER_NOTICEScript hm-post-history error [altis.security.browser.file_not_exists]: File for hm-post-history does not exist
    /usr/src/app/vendor/altis/browser-security/inc/namespace.php:144
    E_USER_NOTICEScript hm-post-history error [altis.security.browser.file_not_exists]: File for hm-post-history does not exist
    /usr/src/app/vendor/altis/browser-security/inc/namespace.php:144
    

    Xray trace

    Built tag 1.4.2 is in use in prod

    opened by kadamwhite 0
  • Move to static eslintrc instead of HM package, and Node 16

    Move to static eslintrc instead of HM package, and Node 16

    This PR updates the build process for this plugin to match that of humanmade/datavis-block, where we used a manual fully-specified .eslintrc.js to work around the circular dependency issues in the HM coding standards. Until we fix those upstream, this is stable, matches our standards, passes lint on this repo, and should unblock automated build deploys.

    • Avoids a recursive dependency error that breaks the release action
    • Will not be hard to switch back to HM coding standards package if needed
    • Only difference is () around arrow functions which I am mandating as a dictatorial package maintainer
    opened by kadamwhite 0
  • Don't track rendered assets

    Don't track rendered assets

    I'd accidentally tracked rendered assets, which is not something I want to do. Without an established release-generation system (which seems like overkill for such a small plugin) it's far too easy for these assets to get out out sync--the developer making changes must always remember to clear out dev assets, generate new prod assets, commit them, etc. In this case, it seems like the better solution is to rely on sites using this plugin (which, at the moment, is only one of our internal sites) to build the assets on deploy.

    This PR removes the erroneously-committed assets and adds a note to the README about building assets on deploy.

    opened by alwaysblank 0
  • Remove unnecessary margins on Load More button

    Remove unnecessary margins on Load More button

    image

    The margins from v1 of this widget are not needed in the newer design and cause the load more button to appear out of alignment

    Relates to humanmade/hm-playbook-theme#530

    On Develop 
    opened by kadamwhite 0
Releases(v1.4.3)
Owner
Human Made
Human Made
Easily set up a sync endpoint to support Watermelon DB in your Laravel projects.

Laravel Watermelon This package provides a Watermelon DB backend sync implementation for Laravel. Watermelon DB is a robust local database synchroniza

Nathan Heffley 18 Dec 21, 2022
Create inline partials in your Blade templates with ease

Create inline partials in your Blade templates with ease. This package introduces a new @capture directive that allows you to capture small parts of y

Ryan Chandler 27 Dec 8, 2022
Blade Snip allows you to use parts of a blade template multiple times. Basically partials, but inline.

Blade Snip Blade Snip allows you to use parts of a blade template multiple times. Basically partials, but inline: <div class="products"> @snip('pr

Jack Sleight 18 Dec 4, 2022
A package that helps to group methods that mostly use for the view presentation purpose.

A package that helps to group methods that mostly use for the view presentation purpose form models to a dedicated presenter class.

Touhidur Rahman 9 Apr 26, 2022
Add a general-purpose tools page to your Filament project. 🛠

Add a general-purpose tools page to your Filament project. Installation You can install the package via Composer: composer require ryangjchandler/fila

Ryan Chandler 24 Dec 6, 2022
A general-purpose parser for Laravel's Blade templating engine.

A general-purpose parser for Laravel's Blade templating engine. This is where your description should go. Try and limit it to a paragraph or two. Cons

Ryan Chandler 6 Feb 18, 2022
The Most Popular JavaScript Calendar as a Filament Widget 💛

The Most Popular JavaScript Calendar as a Filament Widget ?? Features Accepts all configurations from FullCalendar Event click and drop events Upcomin

Guilherme Saade 62 Dec 31, 2022
Rede social com laravel que possui as seguintes funcionalidades: Adicionar ao amigos, Criação de Grupo, Perfil, Criação de post, Comentários entre outros... Além de possuir um design

Social Network Sobre o Projeto Fala Devs! Estou trazendo aqui uma rede social com laravel que possui as seguintes funcionalidades: Adicionar ao amigos

Raissadev 4 Aug 1, 2022
Simple MyBB 1.8 plugin to force moderation of first user post.

MyBB-Moderate-First-Post Simple MyBB 1.8 plugin to force moderation of first user post. Installation: unzip package copy content from "UPLOAD" folder

Sven 3 Jan 2, 2023
Source for "Getting Started with TALL stack" post

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Kim Hallberg 2 Sep 16, 2022
Web application with Laravel in Backend and VueJS in Frontend

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Benjdia Saad 1 Oct 12, 2021
PcTools is a proyect developed using {JavaScript,HTML5,CSS} for frontend and {PHP => Mysql} for backend.

PcTools-Proyect PcTools is a proyect developed using {JavaScript,HTML5,CSS} for frontend and {PHP => Mysql} for backend. Future Improvements # Replace

Ihab Fallahy 1 Feb 5, 2022
Control frontend access to properties/methods in Livewire using PHP 8 attributes.

This package adds PHP 8.0 attribute support to Livewire. In specific, the attributes are used for flagging component properties and methods as frontend-accessible.

ARCHTECH 83 Dec 17, 2022
A Laravel 8 Project Implement with GraphQL With Sanctum APIs Authentications Which utilized in Any Frontend or Any Mobile Application Programs.

A Laravel 8 Project Implement with GraphQL With Sanctum APIs Authentications Which utilized in Any Frontend or Any Mobile Application Programs.

Vikas Ukani 3 Jan 6, 2022
Laravel Backend API for the tutorial (Granular permissions with Laravel APIs & React frontend)

Laravel Granular Permissions Backend Getting Started Clone the repository. Install the dependencies composer install Update .env database credentials

Munaf Aqeel Mahdi 4 May 10, 2022
📦 Adds Laravel Packages Support to Lumen and Vendor Publish Artisan Command.

Laravel Package Support for Lumen: Makes Lumen compatible with Laravel Packages. You can use any Laravel Packages in Lumen by installing Larasupport Package.

Irfaq Syed 127 Dec 17, 2022
Adds a way to write php and run it directly in Laravels' Artisan Tinker.

Adds a way to write php in PhpStorm/IDEA and run it directly as if through laravel artisan tinker - allowing you to quickly run a piece of code with a

Robbin 120 Jan 2, 2023
Adds a service worker to Magento2 to enable PWA features

Monsoon PWA Adds icons, a web manifest file and a service-worker file to make magento 2 a PWA. Main Features Supports Magento Blank and Luma as well a

Monsoon Consulting 20 Nov 17, 2022
A Laravel package that adds a simple image functionality to any Laravel model

Laraimage A Laravel package that adds a simple image functionality to any Laravel model Introduction Laraimage served four use cases when using images

Hussein Feras 52 Jul 17, 2022