-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Introduce PluginManager class #19485
base: trunk
Are you sure you want to change the base?
Conversation
@youknowriad would you be able to review and give feedback here on the approach, please? |
This PR was discussed in Core Editor chat today. See Slack log. |
Ryan and I chatted about this PR yesterday. My personal observations are:
Maybe we can channel the current attention drawn to this PR and to #16384 and attempt to solve a broader problem? It's harder, but it pays off. :) |
In the past, we discussed using |
I took a gander at this today. Thanks Ryan for taking the time to write this pull and contribute the code. Here's some thoughts I have on this. I also have some thoughts on #16834 which I'll leave as a comment there. As for this pull, I'm in alignment with what @mcsf has already commented:
Until there is demonstrable need and it is seen as a valid solution for that need, I don't think we should add filters (or actions). It's nice to think of potential future uses but it is premature to add something that establishes a contract for behaviour which might not be maintainable/ideal in the future.
Generally I like the idea of using an explicit named class/object for registering the plugin against for a couple reasons:
With that said, I agree with @mcsf here that in this case there's no clear benefit for introducing this intermediary class. Functionally it isn't any different than what's in place now. Yes to abstractions, but no to abstractions that have no clear benefit or value over what is present currently. As @mcsf pointed out:
I think you need to identify what is the broader problem that having a PluginManager class solves? I know "semantics" , "precursor to changes in the API", and "allows for future/updates changes more easily" are some rationale given for the introduction of this class but it still seems a bit vague to me.
I like this idea pointed out by @gziolo , because as pointed out there's a bit or prior art in what is done with managing blocks and formatting controls. It also would be utilizing an established api for interacting with that data. But I think even before implementing something like this, we still should think through identified problems like that raised in #16384 and how we might address them in something like a custom store. |
@nerrad thank you for your comments/insight! I'll remove the filter, it was not required for this PR to function and I agree with the argument of only added it when needed. To this point:
This PR is a direct result of the work done for #16384. Specifically this comment. The idea of the API not being semantic enough has been raised a couple of times in Slack in regards to #16384. This PR is an attempt to address that. As you can imagine, it's starting to feel like we're going in circles a little bit between the two PRs. |
…nberg into try/plugins-api-manager
I don't know what's happened but my comment has disappeared from this pull it looks like. Also there's still a lot of changes in the changeset for this pull that don't seem related to the pull itself (there's 258 files changed for my view of this pull). What merge strategy is being used? Maybe there's just something awry with github at the time of me posting this. It's unfortunate I can't see what I originally wrote in here :( To address your response to the question I had about what problem this pull solves:
I think what I'm trying to point out by my question is that while I understand the inspiration for this pull, I'm not clear on how this specifically addresses what was raised by the comment in #16384. In part, it's likely because it's unclear exactly what @youknowriad is wanting to see. It appears that in this pull, you feel by moving the plain object into a named class
To address this pull specifically. I think there's value on pausing the discussion on gets implemented here until:
|
It looks like #16384 is close to land. @ryanwelcher, if that happens, do you think we still need this proposal? |
Description
This PR introduces a new PluginManager class that is meant to disconnect the plugin API function calls from direct access to the low-level datatype.
This intermediary makes the API more semantic, allows for future changes/updates more easily and is meant to address @youknowriad 's concerns about the API not being fully semantic.
This PR would be a precursor to changes to the API such as #16384.
As a nice-to-have, I have introduced a new filter to allow the PluginManager class to be filtered. This will allow for ease of testing new API features and underlying data types but is not the main purpose of this PR and is easily removed.
How has this been tested?
This has been tested locally.
Checklist: