Skip to content

Commit

Permalink
[#55024] Remove bugfix that is not required anymore
Browse files Browse the repository at this point in the history
Since we switched to turbo drive, this bug is not happening anymore, so
the extra stimulus controller and the custom angular event can be
removed.
For more details about the bug see
https://community.openproject.org/wp/55024
  • Loading branch information
dombesz authored and oliverguenther committed Dec 17, 2024
1 parent b8a83e5 commit bc5d508
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 82 deletions.
23 changes: 0 additions & 23 deletions frontend/src/app/core/routing/openproject.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,29 +195,6 @@ export function initializeUiRouterListeners(injector:Injector) {
(transition) => redirectToMobileAlternative(transition),
);

// Fire an event when navigating to a different module. This event then can be detected in
// the non-angular parts of the application. A usecase for this can be found in the
// overview-header.controllers.ts
// See https://community.openproject.org/wp/55024 for details.
$transitions.onBefore(
{},
(transition:Transition) => {
const fromState = transition.from();
const toState = transition.to();
if (
!!fromState.name
&& !!toState.name
&& fromState.name?.split('.')[0] !== toState.name?.split('.')[0]
) {
window.dispatchEvent(new CustomEvent('angular:router:module-changed', {
detail: toState.name?.split('.')[0],
}));
}

return true;
},
);

// Apply classes from bodyClasses in each state definition
// This was defined as onEnter, onExit functions in each state before
// but since AOT doesn't allow anonymous functions, we can't re-use them now.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
<% end -%>

<%=
render(Primer::OpenProject::PageHeader.new(
data: {
'controller': 'overview-header',
'application-target': 'dynamic',
turbo: true
}
)) do |header|
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title(variant: :medium) { t("overviews.label") }
header.with_breadcrumbs(
[
Expand Down

0 comments on commit bc5d508

Please sign in to comment.