- Issue created by @thejimbirch
- 🇺🇸United States smustgrave
Could you use a route param?
Currently can do something this for nodes
entity.node.canonical
- node:2 - 🇺🇸United States thejimbirch Cape Cod, Massachusetts
Yes. That is exactly what is needed. But the param needs to fire on the id/machine name as dashboards are config entities.
- Assigned to gaurav.goyal
- Merge request !56Issue #3468756: Add a route parameter for the Dashboard initiative's Dashboard entity → (Merged) created by gaurav.goyal
- Issue was unassigned.
- Status changed to Needs review
4 months ago 6:45pm 30 August 2024 - 🇮🇳India gaurav.goyal
@thejimbirch - I extended the route_params to use `id` instead of `machine_name` which is basically `id` of the dashboard config entity.
Let me know if this PR works, and I can submit tests for this change.
- Status changed to Needs work
4 months ago 12:11pm 31 August 2024 - 🇺🇸United States thejimbirch Cape Cod, Massachusetts
Code looks good, but I am running into a JavaScript error on the dashboard page in Firefox. I do not get the error on the SEO Checklist tour.
It could be related to 🐛 TypeError: this.model.get('activeTour').cancel is not a function Active .
The maintainer loves tests, so that would be amazing if you could add those also!
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
We are testing on MR 47:
https://www.drupal.org/project/drupal_cms/issues/3470830 → - 🇺🇸United States smustgrave
Do we care if it's a dashboard? Should the configEntity check be enough so others could use this feature too.
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
Our immediate need is for the dashboard for Drupal CMS, but if there is a way to abstract this for other config entities, I feel like that would be great.
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
I removed the patch from the Drupal CMS for now until we solve the error in #8.
- 🇺🇸United States smustgrave
Finally got around to testing and the change does fix it when the route is
admin/dashboard/2nd_dashboard
but not when admin/dashboard
- Status changed to Needs review
4 months ago 7:16pm 9 September 2024 - Status changed to Needs work
4 months ago 1:33pm 11 September 2024 - 🇺🇸United States thejimbirch Cape Cod, Massachusetts
This now allows the Tour to work on the page that has the route parameter. But on Tours of the same route that do not have the route parameter, I am still getting the model error.
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
I think I failed at testing this. Will try again later.
- Status changed to Needs review
3 months ago 2:43pm 17 September 2024 - 🇺🇸United States thejimbirch Cape Cod, Massachusetts
1. There is odd movement with the navigation being collapsed when you open a Tour or click the No Tour button. There is also a new Tour button in the Navigation sidebar. I believe these are being addressed in other issues.
2. This issue is better, but not fixed yet. The Tour does fire correctly on the route that has the ID specified in the route parameter.
However, a dashboard that does not had that ID still gets the Tour button instead of the No Tour button. The tour doesn't fire, which is good, but the button should be No Tour.
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
Issue #1 from comment #19 was fixed. Issue #2 was not.
The tour button appears on a dashboard entity that doesn't have the route parameter. Makes me think that other routes with parameters probably also have this problem.
Setting back to needs work.
- 🇺🇸United States smustgrave
what value are you putting into the dashboard tour?
- 🇺🇸United States smustgrave
Believe I fixed this and updated to use id: vs dashboard:
- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
Success! Dashboard of the same route with a different parameter behaves as expected and does not show there is a tour.
Other entity types can use this Issue/MR as an example to add support for route parameters.
Marking as RTBC. Thanks for all the work on this!
-
smustgrave →
committed f12ac114 on 2.0.x authored by
gaurav.goyal →
Issue #3468756: Add a route parameter for the Dashboard initiative's...
-
smustgrave →
committed f12ac114 on 2.0.x authored by
gaurav.goyal →
Automatically closed - issue fixed for 2 weeks with no activity.