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

Load Session-Convert file chooser to the operating system's Native File Chooser

    Details

    • Story Points:
      1
    • Sprint:
      Fall 2017

      Description

      This is similar to IGBF-1140

      Certain places in IGB use the operating system's native file chooser and some do not. One place that does not is under the IGB file tab.
      Go to IGB File->Load Session
      Java Swing Window is displayed to open a file. Instead we want OS native file chooser.

        Attachments

          Issue Links

            Activity

            Hide
            akadam3 Ashwini Kadam (Inactive) added a comment -

            I have fixed this issue by converting file chooser from JFileChooser to OS Native File Chooser (through FileChooser Utils).
            I have also tested it by verifying that only XML files are allowed for user to choose from and when valid XML session file is selected, it gets loaded correctly.
            On invalid XML file selection, error message is shown to user saying 'Selected file is invalid. Only file saved by using save session will be opened'. This behavior is consistent with earlier design, only load session window style is change which was expected.

            NOTE:
            I have not tested this on linux or Mac OS.

            Show
            akadam3 Ashwini Kadam (Inactive) added a comment - I have fixed this issue by converting file chooser from JFileChooser to OS Native File Chooser (through FileChooser Utils). I have also tested it by verifying that only XML files are allowed for user to choose from and when valid XML session file is selected, it gets loaded correctly. On invalid XML file selection, error message is shown to user saying 'Selected file is invalid. Only file saved by using save session will be opened'. This behavior is consistent with earlier design, only load session window style is change which was expected. NOTE: I have not tested this on linux or Mac OS.
            Hide
            akadam3 Ashwini Kadam (Inactive) added a comment -

            Needs 1st level review and testing on different OS other than windows.

            Show
            akadam3 Ashwini Kadam (Inactive) added a comment - Needs 1st level review and testing on different OS other than windows.
            Hide
            sneha Sneha Ramesh Watharkar (Inactive) added a comment - - edited

            In IGB, I selected File > Load Session on both main and this branch, and the file window was the same on both branches. I think it's selecting my native file chooser in both versions, this is on Linux.

            Was this issue only happening in Windows?

            Show
            sneha Sneha Ramesh Watharkar (Inactive) added a comment - - edited In IGB, I selected File > Load Session on both main and this branch, and the file window was the same on both branches. I think it's selecting my native file chooser in both versions, this is on Linux. Was this issue only happening in Windows?
            Hide
            sneha Sneha Ramesh Watharkar (Inactive) added a comment -

            Tested on Linux by saving a session (this 'save session' file chooser is still in Java Swing, IGBF-1151 already created) and then loading that saved session, the load menu is in my native file chooser. The session file loaded correctly and I was able to resume that session.

            Finished first level review #1, moving to 'needs review' for first level review #2.

            Show
            sneha Sneha Ramesh Watharkar (Inactive) added a comment - Tested on Linux by saving a session (this 'save session' file chooser is still in Java Swing, IGBF-1151 already created) and then loading that saved session, the load menu is in my native file chooser. The session file loaded correctly and I was able to resume that session. Finished first level review #1, moving to 'needs review' for first level review #2.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            IGBF-1150

            First Level Review #2

            Functional Review:

            On main master, when I choose file > load session, the window has the mac os style. I’m not sure what the swing window looks like. This window looks very similar to the one I get in chrome when I try to open a file. See image MacOsOpenFileDialog.png.

            On branch IGBF-1150, I did the same thing, and I get the same window. However there is a pull down option now for file type and it defaults to XML, and only folders and xml files are enabled.
            See MacOpenFileDialog_WithPullDown.png

            In both cases, selecting the saved session seemed to be effective.

            Git History Review:

            ok

            Code Review:

            I’m no file-choosers expert, but this looks reasonable to me, and it has comments, good.

            Be careful with commenting on what the code used to be like.
            In this comment,
            // <Ashwini Kadam> IGBF-1150 : Related to IGBF-1140
            + // JFileChooser displays JavaFX style Open File Session dialog
            + // while loading a session. Instead we want OS Native file choooser.
            + // Thus we are turning to FileChooser for opening a dialog.
            Someone could read the first sentence, pause to look at the code and get confused. The first sentence is actually about what the code USED to be, not what it is. Try to make comments focus on what the code does now. Only describe what is was in past as much as you need to in order to make the current code easy to understand.

            This is a general note for the future, I don’t think you necessarily need to change this now.

            Action:
            I was the second reviewer, BUT, this issue really needs to be tested on a PC. The window was already the right type for mac. I’m going to do a second functional review on a windows machine.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - IGBF-1150 First Level Review #2 Functional Review: On main master, when I choose file > load session, the window has the mac os style. I’m not sure what the swing window looks like. This window looks very similar to the one I get in chrome when I try to open a file. See image MacOsOpenFileDialog.png. On branch IGBF-1150 , I did the same thing, and I get the same window. However there is a pull down option now for file type and it defaults to XML, and only folders and xml files are enabled. See MacOpenFileDialog_WithPullDown.png In both cases, selecting the saved session seemed to be effective. Git History Review: ok Code Review: I’m no file-choosers expert, but this looks reasonable to me, and it has comments, good. Be careful with commenting on what the code used to be like. In this comment, // <Ashwini Kadam> IGBF-1150 : Related to IGBF-1140 + // JFileChooser displays JavaFX style Open File Session dialog + // while loading a session. Instead we want OS Native file choooser. + // Thus we are turning to FileChooser for opening a dialog. Someone could read the first sentence, pause to look at the code and get confused. The first sentence is actually about what the code USED to be, not what it is. Try to make comments focus on what the code does now. Only describe what is was in past as much as you need to in order to make the current code easy to understand. This is a general note for the future, I don’t think you necessarily need to change this now. Action: I was the second reviewer, BUT, this issue really needs to be tested on a PC. The window was already the right type for mac. I’m going to do a second functional review on a windows machine.
            Hide
            ieclabau Ivory Blakley (Inactive) added a comment -

            I tested this on my Windows 7 machine.
            The file chooser is different on the master branch vs branch IGBF-1150. The 1150 file chooser looks like the standard windows dialog.

            I'm moving this to ready for pull request, reassigning to Ashwini.

            Show
            ieclabau Ivory Blakley (Inactive) added a comment - I tested this on my Windows 7 machine. The file chooser is different on the master branch vs branch IGBF-1150 . The 1150 file chooser looks like the standard windows dialog. I'm moving this to ready for pull request, reassigning to Ashwini.
            Hide
            mason Mason Meyer (Inactive) added a comment -

            I am changing the title of this story and some of the description because there is not a "Choose Local Folder" option for this feature, that only applies to stories IGBF-1140 and IGBF-1157. I am doing this to avoid confusion in the future.

            Show
            mason Mason Meyer (Inactive) added a comment - I am changing the title of this story and some of the description because there is not a "Choose Local Folder" option for this feature, that only applies to stories IGBF-1140 and IGBF-1157 . I am doing this to avoid confusion in the future.
            Hide
            mason Mason Meyer (Inactive) added a comment -

            After testing this story I can confirm that the Load Session file chooser has been changed to the operating system's native file chooser. This has been tested on Mac and Windows and is functioning as expected. Saved sessions are being opened properly in IGB using the Load Session feature and there seem to be no side effects resulting from this change. Since this issue is resolved it will now be closed.

            Show
            mason Mason Meyer (Inactive) added a comment - After testing this story I can confirm that the Load Session file chooser has been changed to the operating system's native file chooser. This has been tested on Mac and Windows and is functioning as expected. Saved sessions are being opened properly in IGB using the Load Session feature and there seem to be no side effects resulting from this change. Since this issue is resolved it will now be closed.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: