Expose the project browser as a render element

Created on 6 August 2024, 8 months ago
Updated 4 September 2024, 7 months ago

Problem/Motivation

It's looking like โœจ Create a "mini-browser" UI Postponed: needs info 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.

๐Ÿ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @phenaproxima
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia yash.rode pune

    yash.rode โ†’ made their first commit to this issueโ€™s fork.

  • Merge request !561Resolve #3466307 "Expose the project" โ†’ (Merged) created by yash.rode
  • Assigned to yash.rode
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia yash.rode pune
  • Pipeline finished with Failed
    8 months ago
    Total: 727s
    #246635
  • Pipeline finished with Failed
    8 months ago
    Total: 413s
    #246647
  • Pipeline finished with Failed
    8 months ago
    #246651
  • Pipeline finished with Failed
    8 months ago
    Total: 401s
    #246762
  • Pipeline finished with Failed
    8 months ago
    #246770
  • Pipeline finished with Failed
    8 months ago
    Total: 363s
    #247490
  • Pipeline finished with Failed
    8 months ago
    Total: 4571s
    #247551
  • Pipeline finished with Failed
    8 months ago
    Total: 5606s
    #247655
  • Pipeline finished with Success
    8 months ago
    Total: 845s
    #248543
  • Pipeline finished with Failed
    8 months ago
    Total: 1457s
    #248826
  • Pipeline finished with Failed
    8 months ago
    Total: 663s
    #248864
  • Pipeline finished with Failed
    8 months ago
    Total: 787s
    #248898
  • Pipeline finished with Failed
    8 months ago
    Total: 1634s
    #248963
  • Pipeline finished with Failed
    8 months ago
    Total: 846s
    #249015
  • Pipeline finished with Failed
    8 months ago
    Total: 658s
    #249020
  • Pipeline finished with Failed
    8 months ago
    Total: 1008s
    #249014
  • Pipeline finished with Success
    8 months ago
    Total: 320s
    #249063
  • Pipeline finished with Failed
    8 months ago
    Total: 497s
    #249061
  • Pipeline finished with Success
    8 months ago
    Total: 310s
    #249072
  • Pipeline finished with Canceled
    8 months ago
    Total: 428s
    #249070
  • Pipeline finished with Failed
    8 months ago
    Total: 283s
    #249083
  • Pipeline finished with Failed
    8 months ago
    Total: 171s
    #249086
  • Pipeline finished with Success
    8 months ago
    Total: 307s
    #249090
  • Pipeline finished with Failed
    8 months ago
    Total: 664s
    #249098
  • Pipeline finished with Success
    8 months ago
    Total: 314s
    #249111
  • Issue was unassigned.
  • Status changed to Needs review 8 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia yash.rode pune
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia prashant.c Dharamshala

    @yash.rode
    Great work.

    Tried the element on a Custom Form

    $form['pb'] = [
          '#type' => 'project_browser',
    ];
    

    and it worked well.

    But I see there is another property #source I am assuming this is to restrict the list to the supplied source only like drupal_core or drupalorg_jsonapi source 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 #source and #id?

    Thanks

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia yash.rode pune

    Hi @Prashant.c as you can see the path /admin/modules/browse/{source}/{id}' when viewing the /admin/modules/browse page both $source and $id are null and for a details page like http://starshot.test/admin/modules/browse/recipes/drupal-core-core_recommended_admin_theme where source is recipes and id is drupal-core-core_recommended_admin_theme. In that case one can use the #source and #id to see the detail page of specific recipes/module.

  • Status changed to Needs work 8 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    Pretty close, just a few more points.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia prashant.c Dharamshala

    #7 ๐Ÿ“Œ Expose the project browser as a render element Needs work , thanks for the clarifications, as mentioned by @phenaproxima having the properties documented in the the doc comments would be helpful.

  • Pipeline finished with Failed
    8 months ago
    Total: 428s
    #252340
  • Pipeline finished with Success
    8 months ago
    Total: 3390s
    #252341
  • Pipeline finished with Failed
    8 months ago
    Total: 408s
    #252438
  • Pipeline finished with Failed
    8 months ago
    Total: 504s
    #252436
  • Pipeline finished with Failed
    8 months ago
    Total: 733s
    #252448
  • Pipeline finished with Success
    8 months ago
    Total: 438s
    #252479
  • Pipeline finished with Failed
    8 months ago
    Total: 1870s
    #252518
  • Pipeline finished with Failed
    8 months ago
    Total: 524s
    #253445
  • Pipeline finished with Failed
    8 months ago
    Total: 525s
    #253454
  • Pipeline finished with Failed
    8 months ago
    Total: 439s
    #253462
  • Pipeline finished with Failed
    8 months ago
    Total: 482s
    #253488
  • Pipeline finished with Failed
    8 months ago
    Total: 457s
    #253529
  • Pipeline finished with Canceled
    8 months ago
    Total: 190s
    #253600
  • Pipeline finished with Canceled
    8 months ago
    Total: 128s
    #253604
  • Pipeline finished with Failed
    8 months ago
    #253606
  • Pipeline finished with Success
    8 months ago
    Total: 468s
    #253633
  • Pipeline finished with Failed
    8 months ago
    Total: 303s
    #255900
  • Status changed to RTBC 8 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    @yash.rode pointed me to a very tricky bug, and I found the root cause -- but credit where credit is due, I wouldn't have been able to trace it if @yash.rode hadn't expertly isolated the problem. That's fixed now.

    Other than that, I think this MR looks great. Ship it!

  • Status changed to Needs work 8 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    Ugh, guess we need a little more work to get the tests passing. Poop.

  • Pipeline finished with Failed
    8 months ago
    Total: 193s
    #255910
  • Pipeline finished with Canceled
    8 months ago
    Total: 313s
    #255914
  • Pipeline finished with Success
    8 months ago
    Total: 804s
    #255917
  • Status changed to RTBC 8 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts
  • Pipeline finished with Failed
    8 months ago
    Total: 904s
    #258906
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia yash.rode pune

    The test failure is because of ๐Ÿ› Remove Modals after They're Closed Fixed which is merged in upstream.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia prashant.c Dharamshala

    It looks like this test failinghttps://git.drupalcode.org/project/project_browser/-/blob/2.0.x/tests/src/FunctionalJavascript/ProjectBrowserUiTest.php?ref_type=heads

  • First commit to issue fork.
  • Pipeline finished with Failed
    8 months ago
    Total: 1049s
    #260483
  • Pipeline finished with Success
    8 months ago
    Total: 761s
    #260508
  • Pipeline finished with Skipped
    8 months ago
    #260546
  • Status changed to Fixed 8 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States chrisfromredfin Portland, Maine

    Excellent behind-the-scenes work

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024