vigetlabs / craft-viget-base

http://code.viget.com/craft-viget-base/
7 stars 3 forks source link

[#72] Support new parts kit UI #73

Closed joshuapease closed 10 months ago

joshuapease commented 10 months ago

Overview

This PR replaces the old parts kit CSS, JS and template files and instead exposes a JSON endpoint for our new parts kit UI to consume.

New: PartsKit::getNav() now parses an infinite level of directories instead of the previous versions 2.

Removed: Previously, the parts kit's styles and JS were loaded from an assetbundle. Now the external parts kit UI handles all styling and logic.

This let me remove the asset bundle entirely. The only other styles were for the "Edit Entry" button. I figured we could simplify our codebase a fair bit by just inlining those styles with the edit button.

Testing Notes

If you'd like to test this out on an existing Craft project, run the following commands.

composer require viget/craft-viget-base:dev-jp/72-new-parts-kit-ui-support

You may also need to run the following

composer config minimum-stability dev
composer config prefer-stable true