The project_browser.browse route has two route parameters:

  • source (required) -- the ID of the source plugin we're looking at
  • id (optional) -- the ID of a project, within the given source plugin, that we're examining on its own page

"Its own page", you say?

Now that project details are displayed in a modal, it's not at all clear that this route parameter needs to exist. If not, we should remove it outright, along with the ProjectBrowser render element's support for it.

Command icon 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

phenaproxima created an issue. See original summary.

phenaproxima’s picture

Issue summary: View changes
niharika.s’s picture

Assigned: Unassigned » niharika.s
niharika.s’s picture

Assigned: niharika.s » Unassigned
Status: Active » Needs review
StatusFileSize
new1.13 KB

I have created the patch apply changes according to issue .please review it .

phenaproxima’s picture

Status: Needs review » Needs work

That looks like a good start, but we will need it as a merge request (we're no longer using patches) and I think there is at least one other place where the #id property is used in the ProjectBrowser render element that has to be removed.

shalini_jha made their first commit to this issue’s fork.

lavanyatalwar’s picture

Assigned: Unassigned » lavanyatalwar

Working on it.

lavanyatalwar’s picture

Assigned: lavanyatalwar » Unassigned
Status: Needs work » Needs review

@phenaproxima
I have created a MR.
Kindly review :)

shalini_jha’s picture

Patch is converted to MR but Feedback is not addressed mentioned in #5,

According to #5, there is another place where the #id is being used, which needs to be removed. Upon reviewing the code, I found that in the attachProjectBrowserSettings method, the #id is being attached to Drupal settings. Additionally, in the getDrupalSettings method, the $id parameter is passed and used in a condition (empty($id)) to determine the behaviour of the $package_manager array. Since the $id argument has already been removed from the route, should this parameter and its associated logic also be removed from the getDrupalSettings method?

phenaproxima’s picture

Status: Needs review » Needs work

Thanks for asking. We should probably keep the logic from that if block, but remove the if itself. In other words, what's in there should always run.

shalini_jha’s picture

Assigned: Unassigned » shalini_jha
shalini_jha’s picture

Assigned: shalini_jha » Unassigned
Status: Needs work » Needs review

@phenaproxima Thank you for the review & guidance , I have updated the getDrupalSettings method for #id, removing the id condition while keeping the inner logic unchanged.
Additionally, since the $id parameter has been removed from the method, I have also removed the following doc block comment.
During testing, I noticed that ?id was being appended to the URL for all the tabs. After debugging, I removed the id from the Local task, and it is now working fine. Moving this for your review. Kindly review and let me know if anything else needs to be updated.

phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

That looks good to me. The test failures do not appear to be related. Thanks!

chrisfromredfin made their first commit to this issue’s fork.

chrisfromredfin’s picture

Status: Reviewed & tested by the community » Fixed

This feels good to remove cruft from a feature we no longer have! 💪

Status: Fixed » Closed (fixed)

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