Currently the function for showing messages in LastFm Importer Modal is present in other components. However this is against React's design principles and makes it difficult to add new code or test the existing code. Refactoring the code so that the content shown by Modal is controlled by the component itself will solve the issue.

      For reference this is the code which has to me refactored

      https://github.com/metabrainz/listenbrainz-server/blob/master/listenbrainz/webserver/static/js/src/LastFMImporterModal.tsx

      https://github.com/metabrainz/listenbrainz-server/blob/master/listenbrainz/webserver/static/js/src/Importer.tsx

       

          [LB-530] Refactor the LastFm Modal code

          Monkey added a comment -

          Monkey added a comment - Fixed with https://github.com/metabrainz/listenbrainz-server/pull/1214

          GitHub Bot added a comment -

          See code changes in pull request #1214 submitted by kshitijk83.

          GitHub Bot added a comment - See code changes in pull request #1214 submitted by kshitijk83 .

            devorizon devorizon
            ishaanshah Ishaan Shah
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package