Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-1462

Move all alerts to the context

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    • Icon: Task Task
    • Resolution: Obsolete
    • Icon: Normal Normal
    • None
    • None
    • UI
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      As per issue https://issues.redhat.com/browse/AAH-1383 we needed cross screen alerts, the solution was to move them for those screens to the context. In the future we could store all our alerts in the context and we could use a single alert component in the App.tsx to display all the alerts. This would ensure that the alerts remain on screen even when a redirect happens, or the user navigates in the meanwhile to a different page. Using the context only for alerts would mean that we don't need anymore to pass the state to the component to close the alerts, but the Alert component could access the context itself.

      The next components are needed to be changed slightly (remove alert state and replace all occurences with with context.alerts, remove closeAlert function and remove AlertList components) for the full transition:

      • publish-to-controller-modal
      • collection-header
      • certification-dashboard
      • collection-dependencies
      • collection-detail
      • edit-namespace
      • registry-list
      • base (execution environment - already changed in issue AAH-1383)
      • execution_environment_detail_images
      • execution_environment_list (already changed in issue AAH-1383)
      • group-detail (2 places)
      • group-list
      • namespace-detail
      • namespace-list
      • user-profile
      • task_detail
      • task-list-view
      • token-insights
      • token-standalone
      • user-detail
      • user-list

      In addition the AlertList need to be updated and the App.tsx or entry.ts

      cc semighdo@redhat.com 

              mhradil-1 Martin Hradil
              lberky@redhat.com Levente Berky (Inactive)
              Archiver:
              ranumula@redhat.com Raju Anumula

                Created:
                Updated:
                Resolved:
                Archived: