-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add self-contained-blocks #597
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-Authored-By: Quentin Renard <[email protected]>
Our issue does not seem to be a Travis issue but more likely a Testbench one related to the fact that we copy files in the Laravel project it uses. It seems like added files are not being picked up on first run. To reproduce locally, rm -rf vendor/orchestra/testbench-core && composer install.
See 1bf93ad. Login has its own test so we do not need to check the status of the login request on every test. It appears that on a first run the Testbench created Laravel app does not pick up the admin.php file resulting in a route missing when being redirected to the dashboard after login.
…ng the whole configuration file
…uplicating the whole configuration file" This reverts commit d338140.
This reverts commit a329ee4.
Will be removed in Twill 3.0 in favor of twill:make:module
… users of Twill default blocks - Favor @twillBlockProperty syntax for clarity and to preserve syntax highlighting - Support new @twillBlockCompiled and @twillBlockCompoment for custom Vue compiled blocks which are not inlined in the response but in the build - Restore default compiled text and image blocks when a developer did not create any blocks yet and uses the block_editor form fields without specifying a blocks list or a group - Use new text snd image block fields when generating a new block using them as template
ifox
approved these changes
Jun 29, 2020
Merged in 1e95b0a, thank you so much @antonioribeiro! During my review I made a few changes:
See https://github.com/area17/twill/blob/2.x/CHANGELOG.md#added, for more! |
FYI this broke settings forms, see #701 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The idea is to be able to create blocks without having to configure them on the
twill.php
, allowing developers to add blocks (and repeaters) using a new twill:make:block, and, also to have a library of AREA 17's opinionated blocks, to be used by Twill's Community.This should also allow people to contribute with blocks and, in the future, even create new packages to automatically add blocks to Twill.
This PR has
Artisan twill:list:icons command
To list icons, that must be used while creating new blocks. Currently it lists icons from Twill's frontend dir, but that must be changed and icons will have to be reviewed.
Execute
To get things like:
If you are using iTerm or PuTTY, you can probably CTRL/CMD click the preview URL to see the actual icon on your browser.
Artisan twill:list:blocks
This command list all available blocks (Twill's and user's) and give as much information as possible about blocks. The list has a filter and some flags (--twill, --app, --custom, --repeater) to allow people to find what they need easily.
Some examples:
To get something like:
Artisan twill:make:block
The main purpose of this change. When executing:
It should tell something like this:
And you now just need to refresh your Twill admin page to see the block already working on the block editor.
Blocks are self-contained files
Here's a block example:
And the repeater:
Automatic repeater generation
If the block you are generating is using one or more repeaters, it will try to recreate the same structure to provide a new block and new repeaters, if possible.
No BC break
If you have lots of blocks in your
twill.php
, it will use them and merge with the new ones, from Twill's and App's libraries.Don't create new blocks if you don't need
If a block from Twill's gallery is enough (i.e. "image"), just use it. No need to generate a new block, they are all and always available.
Configurable
All directories used by it are configurable and you can have as many directories (libraries of blocks) as you want, and even disable Twill's one, if needed.
Artisan twill:make:module (changed to a new :make namespace)
This is a small change introduced to use the same namespace for all "make" commands Twill may have in the future.
twill:module
will be deprecated in Twill 3.0.