-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Allow editing "root" blueprints from the UI #3963
Allow editing "root" blueprints from the UI #3963
Conversation
Hey dude, nice PR! However, I actually sent in a pretty similar PR a couple months back (see #3015) and it was closed by the Core Team. There's some feedback on there.. Basically the takeaway was that we can register a 'blueprint section/group' for addons etc for non-content blueprints. Sorry to be the bearer of bad news... 🙂 |
hey @duncanmcclean thanks for taking the time and replying to me. Those are actually good news because i could implement my custom blueprints with a new blueprint section. Is there already a PR for this? |
Not yet. I've thought of doing one but I just haven't had the time (and probably won't for a couple weeks at least). Feel free to incorporate that into this PR (or another one). |
Ok, so following the ideas stated in #3015 and the conversation in statamic/ideas#408 i refactored this to allow external code (see Addons / Service provider) to register custom groups of blueprints, by giving a title and a namespace where to look for blueprints. The registration is done by calling the \Statamic\Facade\Blueprint::registerBlueprintGroup('namespace', 'Title of the Group'); This new group, and all of the contained blueprints, are then shown in the blueprint list in the CP: Let me know if this solves the idea you guys had ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this PR - I have a use case for this in one of my addons so I can't wait until this is merged and released.
There's just one little thing I noticed while giving it a go.
I'll take a look and see if I can update this to allow addons to "register" blueprints like the (almost) can fieldsets: #3717 |
Thanks for everyone's comment, i pushed the changes your requested. Love the way this has been handled, thanks! |
One little tiny thing - you may want to fix the issues Style CI has highlighted, this won't be merged without those 🙂 |
Should've fixed it. |
Hey! Is there anything else i can do for this PR? :) |
I think everything looks good. It just takes a while sometimes for PR's to be reviewed & merged. |
Yeah, no issue with that, i was just checking if the PR needed some more work. |
Sorry I've been out of town (still am) so things have been a little slow here. This PR looks okay but I'll need to give it a more thorough review when I'm back. 👍 |
Thanks :) i've added a couple of small things in the meantime |
Hey there. We really appreciate the work that went into this and it's always difficult to close these down, but we're going to close it for now because it needs some more features added to it. I've explained it over on statamic/ideas#644 if you want to chime in over there. I don't want to ask you to implement them yourself. (Of course, you can if you want.) When we implement it, we will give you co-author credit. Thanks for understanding! |
Hi Jason, is there a place for this in the 3.3 roadmap or has it become a
“in the future” idea?
I know several addons providers are waiting for this
Thanks!
Il giorno mer 8 set 2021 alle 23:10 Jason Varga ***@***.***>
ha scritto:
Closed #3963 <#3963>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3963 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAINRU2EXIPSYUVQP42MEXLUA7GLTANCNFSM476HVZ5A>
.
--
Daniele Rosario
CTO
Weble.it <http://weble.it/>
Via Enrico Fermi 265
36100 Vicenza
+39 0444 130094 <+390444130094>
+39 328 3017134 <+393283017134>
|
It's not 3.3 - it could be done earlier in 3.2.x.
Can you list them? Then we can make sure all their use cases are covered. |
I'm waiting on it - loads of users of my Runway addon have asked for blueprint editing for 'Reaource' blueprints. |
Yeah you're the one I know about. 😄 |
Me, our "template" add-on would like to provide blueprints to our own sites, so we don't have to publish them and potentially overwrite any customizations |
@edalzell But do you need to provide a blueprint? Where would the blueprint be used? In entries? If we go with the implementation outlined in the ideas issue, you'll be able to add custom blueprints, but not blueprints that'll go into |
Hi, this is my first PR to statamic, so if i'm doing anything wrong, just let me know!
The idea behind this PR is that in the statamic docs, and several guides / blog posts i read is suggested that any non-collection driven blueprint that may be required for customization to the statamic site, such as database-releated blueprints, custom blueprints for other resources, etc, should be placed within the root directory of the
blueprints
folder, much like the user blueprint is.This is very cool and useful, but i found out that those blueprints do not appear in the CP when added, and there needs to be edited directly from YAML.
This PR is an attempt to add this functionality to the CP. The code itself is pretty easy and straightforward, since most of it is already abstracted into the
ManagesBlueprint
trait.Let me now what do you think!
Thanks