Skip to content

Commit

Permalink
Update Twig and update changelog for release (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
matdave authored May 12, 2023
1 parent b251ac2 commit 76c2bec
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 45 deletions.
2 changes: 1 addition & 1 deletion _build/gpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"lowCaseName": "fred",
"description": "Frontend Editor",
"author": "John Peca",
"version": "2.0.3-pl",
"version": "2.1.0-pl",
"menus": [
{
"text": "fred.menu.fred",
Expand Down
2 changes: 1 addition & 1 deletion core/components/fred/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"twig/twig": "^1.0",
"twig/twig": "^3.6",
"wa72/htmlpagedom": "^1.3",
"ramsey/uuid": "^3.0",
"moontoast/math": "^1.1",
Expand Down
29 changes: 11 additions & 18 deletions core/components/fred/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion core/components/fred/docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Tweaks to the rebuild processor for more consistent results
- Various stability fixes (now 40% less likely to fall off your desk)
- Update Twig to 3.x
- Update elFinder to use yarn and composer instead of manual insertion
- Update JWT token for security
- Adjust how elements are parsed during rebuild and manager saves
- Fix blueprint categories in manager
- Remove some lingering MODX Revo 2.x references
99 changes: 80 additions & 19 deletions core/components/fred/docs/readme.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,87 @@
---------------------------------------
Fred
---------------------------------------
Version: 1.2.1
Author: John Peca <[email protected]>
---------------------------------------
Fred is a visual drag-and-drop front-end editor for MODX Revolution.
# Fred

Documentation: https://modxcms.github.io/fred
Full documentation for Fred: https://modxcms.github.io/fred/

Fred Extras, including ready-to-use Themes: https://modx.com/extras/browse/?search=fred
Fred is a visual drag-and-drop **fr**ont-end **ed**itor for [MODX CMS](https://modx.com). It empowers ordinary people to create exceptional content without knowing how to code or needing to learn complex interfaces.

To create content with Fred you merely drag Elements from a sidebar and drop them where you wish content to appear. Select the copy you wish to change or click an image you want to update, edit directly in your browser, and click a green checkmark to save.

UPGRADE NOTES
=======================================
Fred uses familiar visual controls like sliders, toggles and color pickers. Further, these controls can pass specific parameters developers want end users to adjust to backend code or an API. This results in a bulletproof and powerful content creation solution.

In short, Fred makes constructing beautiful and complex pages simple for even the most non-technical of users.

## What does Fred do for developers and site builders?

Fred offers theme builders a great entrance into the MODX ecosystem. It is easy to port existing themes to Fred and export them for submission to the [MODX Extras](https://modx.com/extras/).

For existing MODX developers, Fred brings an option to create more flexible and intuitive editing experiences for site owners. Fred can power designs that would otherwise require dozens of TVs, a complex Manager UI, or tricky Manager customization.

The changelog for the current version of Fred is located at https://github.com/modxcms/fred/blob/master/core/components/fred/docs/changelog.txt.

## How is Fred different from other visual content builders?

Fred adheres to MODX’s core tenet of Creative Freedom. It doesn’t force you into someone else’s preferred front-end framework or way of building things. If you can imagine or prototype it, Fred can power it—without compromise.

Developers and designers can realize pixel-perfect websites and confidently turn over content creation duties without fear of things breaking.

So whether a site is made by customizing a free starter theme, or handcrafted 100% from scratch, Fred can help everyone build websites faster, more consistently and with better results.

## What Else Can Fred Do?

The following is a sample of Fred’s capabilities that make it a compelling visual content building platform:

- Transform static Design Libraries into a live content creating tool that strictly adheres to brand standards, and that is easily understood and used by non-technical team members across your entire organization
- Use optional conditional/looping Twig template logic to create robust Elements limited only by your imagination
- Create and organize collections of Elements as building blocks for pages
- Blueprints provide boilerplate full- or partial-page templates
- Multiple dropzones for complete control of every page layout
- Configure content using a variety of controls including toggles, text inputs, date pickers, select inputs, sliders, Resource pickers, and color pickers
- Supports MODX code Snippets with live Ajax rendering of changes
- Visual Font Awesome 5 icon picker—developers can create other icon pickers, too
- Simple content formatting with a curated default TinyMCE rich text editor
- Rearrange and re-order page content via drag-and-drop
- Quickly duplicate existing Elements to build up galleries and sliders
- Fred content renders down to cachable output for blazing-fast page speed
- Complete set of production-ready Bootstrap 4 Elements to slash the time needed for theme builders to get startedThe friendly front-end editor … documentation at https://modxcms.github.io/fred/

## Upgrade Notes
If you are upgrading from a previous release to the following versions, please note the important changes:

------------
-> rc1
------------
Make sure all Themes are named uniquely, and any Elements, Blueprints, Element categories, or Blueprint categories within a Themes likewise have unique names. You can share names across Themes, except for the Theme name itself.
### -> rc1
Make sure all Themes are named uniquely, and any Elements, Blueprints, Element categories, or Blueprint categories within Themes likewise have unique names. You can have duplicate category and Element names across different Themes.

### -> beta7
If you defined Media Sources in Option Sets, in Element markup, or Options Override, you need to adjust these from using the Media Source ID to the Media Source name.


## Folder structure
Fred installs the following into your MODX webroot directory:

- `_build/assets/js` - source code for the front-end
- `_build/assets/sass` - source code for front-end styles
- `assets/components/fred/mgr` - Backend Manager page (“3PC”)
- `assets/components/fred/web` - Assets used in the front-end
- `assets/components/fred/web/endpoints` - XHR endpoints for asyncronous calls
- `core/components/fred/model/fred/src` - Autoloaded directory for the Fred namespace
- `core/components/fred/model/fred/src/Endpoint` - Implementation for the XHR endpoints

## Prerequisites for developing for Fred
- MODX Revolution
- GPM
- Composer
- Yarn
- Ruby Sass

### Developing Fred
First, set up the project inside your MODX webroot:

1. `yarn install` from web root
2. change directories to `core/components/fred/model`
3. `composer install`
4. install fred with GPM

### Build
Set up watchers to update the code for changes:

------------
-> beta7
------------
If you defined a Media Sources in Option Sets, in Element markup, or an Options Override, you need to adjust these from using the Media Source ID to the Media Source name.
1. Start watchers from webroot: `yarn dev`
2. Minify CSS and JS and prepare code for production: `yarn build`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"mousetrap": "^1.6.3",
"nouislider": "^11.1.0",
"promise-cancel": "^2.0.1",
"twig": "^1.15.2"
"twig": "^1.16.0"
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5094,10 +5094,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=

twig@^1.15.2:
version "1.15.2"
resolved "https://registry.yarnpkg.com/twig/-/twig-1.15.2.tgz#8600182f9cf12cfd5f5b365146c5b9914bfa1c10"
integrity sha512-n7w76E8gzguhcLyKcjlT3sYWGdBTgZY2DO/frcbZ5Fk7LwMRoTathvWMFxZyJ2HYRJ+rEzccw6nu3fsy7ceGGQ==
twig@^1.16.0:
version "1.16.0"
resolved "https://registry.yarnpkg.com/twig/-/twig-1.16.0.tgz#cd42e962e0ee3645226effb831514bab049e8bc9"
integrity sha512-NYGBERQUEfK5PNQYjeK0XRktksrzgu8b5cU4YEMSrq3rvJ/obnDWLAG4/VyMFgXdS1+IvCfvnvi6aeN6mGZ0dQ==
dependencies:
"@babel/runtime" "^7.8.4"
locutus "^2.0.11"
Expand Down

0 comments on commit 76c2bec

Please sign in to comment.