Problem/Motivation
It's looking like #3450629: Create a block that allows us to place project browser instances anywhere is going to take a substantial amount of work and refactoring. As part of that, we need to be able to consistently drop a Project Browser instance (and its associated settings, CSS, etc.) anywhere on a page. That would be accomplished most easily if there were an encapsulated render element for the project browser.
Proposed resolution
Create a project_browser render element that does pretty much all the same stuff as is done in BrowserController, and then change BrowserController to use that render element.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | project-browser-element.png | 608.13 KB | prashant.c |
Issue fork project_browser-3466307
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
yash.rode commentedComment #5
yash.rode commentedComment #6
prashant.c@yash.rode
Great work.
Tried the element on a Custom Form
and it worked well.
But I see there is another property
#sourceI am assuming this is to restrict the list to the supplied source only likedrupal_coreordrupalorg_jsonapisource etc. I tried this property but nothing happening. Both sources are already enabled.Could you please provide some details on how to use these properties
#sourceand#id?Thanks
Comment #7
yash.rode commentedHi @Prashant.c as you can see the path
/admin/modules/browse/{source}/{id}'when viewing the/admin/modules/browsepage both $source and $id are null and for a details page likehttp://starshot.test/admin/modules/browse/recipes/drupal-core-core_recommended_admin_themewheresourceisrecipesandidisdrupal-core-core_recommended_admin_theme. In that case one can use the#sourceand#idto see the detail page of specific recipes/module.Comment #8
phenaproximaPretty close, just a few more points.
Comment #9
prashant.c#7, thanks for the clarifications, as mentioned by @phenaproxima having the properties documented in the the doc comments would be helpful.
Comment #10
phenaproxima@yash.rode pointed me to a very tricky bug, and I found the root cause -- but credit where credit is due, because I would have had a much harder time tracing it if Yash hadn't expertly isolated the problem. It's fixed now - awesome teamwork!
Other than that, I think this MR looks great. Ship it!
Comment #11
phenaproximaUgh, guess we need a little more work to get the tests passing. Poop.
Comment #12
phenaproximaComment #13
yash.rode commentedThe test failure is because of #3458908: Remove Modals after They're Closed which is merged in upstream.
Comment #14
prashant.cIt looks like this test failing
https://git.drupalcode.org/project/project_browser/-/blob/2.0.x/tests/src/FunctionalJavascript/ProjectBrowserUiTest.php?ref_type=headsComment #17
chrisfromredfinExcellent behind-the-scenes work