Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-625

GUI - Review updating react router to v6

    XMLWordPrintable

Details

    Description

      As a UI developer I need to review and test out the steps necessary to migrate Subs GUI to v6 of React Router (and dom).

       

      Assumptions and questions

      • We need an exact timeframe for this. Aspects of the RHODS work resolve some of this, however if we're forced to refocus on the router updates instead this could delay Subs GUI work for RHODS
      • Currently v6 will break the GUI.
      • Subs still has a 2 class components that do not leverage hooks such as our deprecated Inventory for RHEL and OpenShift product displays and associated Guests display. The React Router update prefers the use of hooks, now. Both components still leverage the "withRouter" function. We developed a solution for Discovery to resolve this... this may work for Subs, otherwise this will break that component. https://github.com/quipucords/quipucords-ui/blob/master/src/redux/index.js 
        • We were in the process of migrating and removing the old deprecated inventory component for the RHODS work, however based on the timeframe given by the platform we may have to pull focus and develop a temporary solution to resolve the platforms push first
      • Subs GUI makes use of product context driven by React Router doms old `render` prop. This will break all product context for the GUI if a migration to v6 is completed first. We developed a partial solution in product Discovery, this may work for Subs too https://github.com/quipucords/quipucords-ui/blob/master/src/components/router/router.js#L25-L45 
      • We tested out a solution, it appears to be functional, see https://github.com/cdcabrera/curiosity-frontend/commits/sw-625
        • However there are still questions since the platform plans to alter "basename" ... and possibly the context associated with the hooks used to navigate

      Attachments

        Issue Links

          Activity

            People

              cdcabrera Charles Cabrera
              cdcabrera Charles Cabrera
              Mirek Długosz Mirek Długosz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: