Skip to content

Improve linking from KRIs #4972

Description

@schogges

Description

Follow-up of #4930

With #4256 we've added a protocolHandler and a custom kri protocol to handle links with href of kri://.... This included the registration of an event listener on the document.body element during the initialization of the app. We've not added a removal of that event listener, which can introduce memory leaks.
With #4930 the event handler is moved into XAction so we can easily maintain the lifetime of the event listener with the lifecycle of the component. This solves the issue around potential memory leaks, but introduces another issue. The event handler is now tightly coupled with XAction and this means that there must always be at least one XAction on the page to make this work. This might break if we need to provide a KRI link via locales.

General requirements for linking from KRIs:

  • Providing string based KRIs as href with kri protocol to XAction needs to trigger the KRI protocol handler.
  • Clicks on a wrapping element needs to trigger a link inside (basically keep the functionality of findAnchor).
  • Decouple XAction from global event handling, all of this needs to work without a XAction on the page.
  • KRI links are internal links and should not use the browser API but vue router history (no page refresh). We also check for the attribute x-internal.
  • Currently our KRI links link to detail pages, but we also need to support linking to summary views or other types of nested views

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureNew featuretriage/acceptedThe issue was reviewed and is complete enough to start working on itux

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions