Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1184

Tools->Configure Web Links ->Export - Convert file chooser to the operating system's Native File Chooser

    Details

    • Story Points:
      1
    • Sprint:
      Fall 2017, B - Summer 2018

      Description

      Convert file chooser window to Native OS file chooser window style.
      Similar to IGBF-1140.

        Attachments

        1. BranchVersion.png
          BranchVersion.png
          129 kB
        2. FileExtensionNotPermitted.png
          FileExtensionNotPermitted.png
          292 kB
        3. IGBF-1184.err
          2 kB
        4. IGBF-1184.out
          64 kB

          Issue Links

            Activity

            Hide
            akadam3 Ashwini Kadam (Inactive) added a comment - - edited
            Show
            akadam3 Ashwini Kadam (Inactive) added a comment - - edited Fix can be found at https://bitbucket.org/ashwiniK27/integrated-genome-browser/commits/be9b77b1044ef83925ffcdc17fc3a6b4bad0f1e4?at=IGBF-1184 Needs testing in Linux and MacOS environment.
            Hide
            akadam3 Ashwini Kadam (Inactive) added a comment -

            First level functional review:
            1. If user saves/exports weblink with name 'webLinkExport', it actually gets saved as 'weblinkExport..json'. Extra '.' is appended between name and extension.
            2. If user saves it with full name, 'webLinkExport.json', error dialog is shown saying 'You cannot save this document with extension “.json” at the end of the name. The required extension is “.”. '

            I think this problem is observed with mac OS only. Needs further investigation.

            Show
            akadam3 Ashwini Kadam (Inactive) added a comment - First level functional review: 1. If user saves/exports weblink with name 'webLinkExport', it actually gets saved as 'weblinkExport..json'. Extra '.' is appended between name and extension. 2. If user saves it with full name, 'webLinkExport.json', error dialog is shown saying 'You cannot save this document with extension “.json” at the end of the name. The required extension is “.”. ' I think this problem is observed with mac OS only. Needs further investigation.
            Hide
            sneha Sneha Ramesh Watharkar (Inactive) added a comment -

            Saved on Linux, resulting file was 'webLinkExport.json' no extra .

            Saved 'webLinkExport.json' and resulting file was 'webLinkExport.json' , no error.

            Show
            sneha Sneha Ramesh Watharkar (Inactive) added a comment - Saved on Linux, resulting file was 'webLinkExport.json' no extra . Saved 'webLinkExport.json' and resulting file was 'webLinkExport.json' , no error.
            Hide
            ann.loraine Ann Loraine added a comment -

            There is a build error - see attached reports.

            I am using mvn from the command line for speed:

            mvn clean install -DskipTests=true

            Show
            ann.loraine Ann Loraine added a comment - There is a build error - see attached reports. I am using mvn from the command line for speed: mvn clean install -DskipTests=true
            Hide
            ann.loraine Ann Loraine added a comment -

            Re-assigning to Ashwini to investigate build error.

            Show
            ann.loraine Ann Loraine added a comment - Re-assigning to Ashwini to investigate build error.
            Hide
            akadam3 Ashwini Kadam (Inactive) added a comment -

            Fixed the code.
            Moving to 'Need Review' and assigning it to Dr. Loraine for MAC OS specific testing.

            Show
            akadam3 Ashwini Kadam (Inactive) added a comment - Fixed the code. Moving to 'Need Review' and assigning it to Dr. Loraine for MAC OS specific testing.
            Hide
            ann.loraine Ann Loraine added a comment -

            Screen shot of the IGBF-1184 file chooser.

            Show
            ann.loraine Ann Loraine added a comment - Screen shot of the IGBF-1184 file chooser.
            Hide
            ann.loraine Ann Loraine added a comment -

            I checked out Ashwini's branch IGBF-1184 after adding her fork as an upstream repository.

            However, after I built and ran the software, I did not see a native file chooser on my Mac. The attached image is what I see.

            Show
            ann.loraine Ann Loraine added a comment - I checked out Ashwini's branch IGBF-1184 after adding her fork as an upstream repository. However, after I built and ran the software, I did not see a native file chooser on my Mac. The attached image is what I see.
            Hide
            ann.loraine Ann Loraine added a comment -

            Ivory may have had similar problems getting her code to "refresh" on Mac.

            Show
            ann.loraine Ann Loraine added a comment - Ivory may have had similar problems getting her code to "refresh" on Mac.
            Hide
            ann.loraine Ann Loraine added a comment -

            Needed to delete bundle cache in ~/.igb directory

            Show
            ann.loraine Ann Loraine added a comment - Needed to delete bundle cache in ~/.igb directory
            Hide
            djoshi4 Deepti Joshi (Inactive) added a comment -

            Issue is ready for first level review.

            Link to the commit branch:
            https://bitbucket.org/djoshi4/deepti-fork-igb/commits/285a33580e76521f7b162ca30617aa3afe2ed3eb

            The issue has built on bitbucket pipelines and the jar is available in the downloads.

            Show
            djoshi4 Deepti Joshi (Inactive) added a comment - Issue is ready for first level review. Link to the commit branch: https://bitbucket.org/djoshi4/deepti-fork-igb/commits/285a33580e76521f7b162ca30617aa3afe2ed3eb The issue has built on bitbucket pipelines and the jar is available in the downloads.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            Ann added a comment on bitbucket, regarding line 398 "See line 387. Don't add this file extension if full_path ends with any of the allowed options, which include both JSON (upper case) and json (lowercase)"

            I modified line 398, the program will not tack on ".json" if the file already ends in .json OR .JSON.

            When testing this, I found that the system is misbehaving. See FileExtensionNotPermitted.png.
            As long as I don't include any file extension, everything is fine.
            If I DO include a file extension, even the ideal one: .json, the system gives me a dialogue box saying that this extension is not allowed, it must be "." ???
            I think the issue lies in FileChooserUtil.java. The file chooser is creating this unwanted dialogue box.

            I think the code in WebLinksView.java is behaving as expected. So this problem is outside the scope of this issue.
            However, I don't think WebLinksView should handle the file extension at all. I think that should be handled by the file chooser. So lines 398-400 (below) should not be in here at all.

            if ( ! (full_path.endsWith(".json") || full_path.endsWith(".JSON")) )

            { fil = new File(full_path + ".json"); }
            Show
            ieclabau Ivory Blakley (Inactive) added a comment - Ann added a comment on bitbucket, regarding line 398 "See line 387. Don't add this file extension if full_path ends with any of the allowed options, which include both JSON (upper case) and json (lowercase)" I modified line 398, the program will not tack on ".json" if the file already ends in .json OR .JSON. When testing this, I found that the system is misbehaving. See FileExtensionNotPermitted.png. As long as I don't include any file extension, everything is fine. If I DO include a file extension, even the ideal one: .json, the system gives me a dialogue box saying that this extension is not allowed, it must be "." ??? I think the issue lies in FileChooserUtil.java. The file chooser is creating this unwanted dialogue box. I think the code in WebLinksView.java is behaving as expected. So this problem is outside the scope of this issue. However, I don't think WebLinksView should handle the file extension at all. I think that should be handled by the file chooser. So lines 398-400 (below) should not be in here at all. if ( ! (full_path.endsWith(".json") || full_path.endsWith(".JSON")) ) { fil = new File(full_path + ".json"); }
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            After talking to Ann, I decided the best solution for the newly found mis-behavior is to just remove the file extension filter from the file chooser.
            That commit, and the one allowing for JSON (upper case) have been squashed into the original commit "Changed file chooser to local OS".

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - After talking to Ann, I decided the best solution for the newly found mis-behavior is to just remove the file extension filter from the file chooser. That commit, and the one allowing for JSON (upper case) have been squashed into the original commit "Changed file chooser to local OS".
            Hide
            mason Mason Meyer (Inactive) added a comment -

            My testing confirms that this story is now resolved. When exporting on Mac and Windows, the Export option for "Configure Weblinks" is using the native file chooser. If I did not enter a file extension, .json was properly added, and if I did enter .json as the file extension, the file was saved properly with only a single .json extension. I tried to break this but could not, and there seem to be no side effects related to this change, so it will now be closed.

            Show
            mason Mason Meyer (Inactive) added a comment - My testing confirms that this story is now resolved. When exporting on Mac and Windows, the Export option for "Configure Weblinks" is using the native file chooser. If I did not enter a file extension, .json was properly added, and if I did enter .json as the file extension, the file was saved properly with only a single .json extension. I tried to break this but could not, and there seem to be no side effects related to this change, so it will now be closed.

              People

              • Assignee:
                mason Mason Meyer (Inactive)
                Reporter:
                akadam3 Ashwini Kadam (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: