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

Investigate: Let users edit track name in place

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      A nice addition to the Track Context Menu (the right-click menu for tracks) would be to add the option to "Rename" the track or let the user click on the name (in the track) to edit it.

        Attachments

          Activity

          Hide
          ann.loraine Ann Loraine added a comment - - edited

          Investigate: Can we allow users to double-click the track name to activate editing mode and then type in a new name there? (similar to how this works when renaming a file using a file browser GUI on Windows or Mac?)

          Show
          ann.loraine Ann Loraine added a comment - - edited Investigate: Can we allow users to double-click the track name to activate editing mode and then type in a new name there? (similar to how this works when renaming a file using a file browser GUI on Windows or Mac?)
          Hide
          ann.loraine Ann Loraine added a comment -

          In addition, can we add a "settings" icon to track labels to activate the context (right-click) menu?

          Show
          ann.loraine Ann Loraine added a comment - In addition, can we add a "settings" icon to track labels to activate the context (right-click) menu?
          Hide
          noor91zahara Noor Zahara (Inactive) added a comment -

          As per discussion with Ann, placing the rename option in the context menu adds a lot of steps for the user to go through just to rename the track. And also the right click menu/ context menu needs to be re-designed, so it is a good idea not to add new things in the menu.

          A better solution would be to add a functionality wherein the user can click on the track name and it turns into an editable text box.

          Show
          noor91zahara Noor Zahara (Inactive) added a comment - As per discussion with Ann, placing the rename option in the context menu adds a lot of steps for the user to go through just to rename the track. And also the right click menu/ context menu needs to be re-designed, so it is a good idea not to add new things in the menu. A better solution would be to add a functionality wherein the user can click on the track name and it turns into an editable text box.
          Hide
          ann.loraine Ann Loraine added a comment -

          Thanks Noor!

          Moving this out of the current sprint and into the backlog for consideration later.

          Show
          ann.loraine Ann Loraine added a comment - Thanks Noor! Moving this out of the current sprint and into the backlog for consideration later.
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          Notes from scrum:

          • TierLabelManager java class has mouselisteners that intercept mouse interactions on the component.
          • We proposed a new interaction: a user double-clicks the track label text. The track label text then changes its appearance to look "editable." The user then types some new text and presses ENTER. The text of the label then becomes what the user entered.
          • We think we should investigate whether this is possible and make a possible plan for how this could be done. Then close the ticket.
          Show
          ann.loraine Ann Loraine added a comment - - edited Notes from scrum: TierLabelManager java class has mouselisteners that intercept mouse interactions on the component. We proposed a new interaction: a user double-clicks the track label text. The track label text then changes its appearance to look "editable." The user then types some new text and presses ENTER. The text of the label then becomes what the user entered. We think we should investigate whether this is possible and make a possible plan for how this could be done. Then close the ticket.
          Hide
          jsirigin Jaya Sravani Sirigineedi added a comment -

          The Track is completely designed using Graphics2D, the label is shown by the drawString method, which makes it difficult to change the label to editable. We might have to create a custom component. It might be easier to add the rename in the context menu in terms of effort.

          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - The Track is completely designed using Graphics2D, the label is shown by the drawString method, which makes it difficult to change the label to editable. We might have to create a custom component. It might be easier to add the rename in the context menu in terms of effort.
          Hide
          jsirigin Jaya Sravani Sirigineedi added a comment -

          Investigating a way to perform any action when the text on the TierLabel is clicked. Right now, looking into the classes TierLabelManager which is responsible for the mouse interactions, it has all the listeners related to the track label, TierLabelGlyph which is responsible for the graphics design of the entire label, and the class TrackPreferencesPanel to see how the existing rename is implemented.

          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - Investigating a way to perform any action when the text on the TierLabel is clicked. Right now, looking into the classes TierLabelManager which is responsible for the mouse interactions, it has all the listeners related to the track label, TierLabelGlyph which is responsible for the graphics design of the entire label, and the class TrackPreferencesPanel to see how the existing rename is implemented.
          Hide
          jsirigin Jaya Sravani Sirigineedi added a comment -

          Written some code in TierLabelManager for the mouseClick event to just rename the label at the moment, it isn't working as expected so debugging the code to see the issue.

          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - Written some code in TierLabelManager for the mouseClick event to just rename the label at the moment, it isn't working as expected so debugging the code to see the issue.
          Hide
          jsirigin Jaya Sravani Sirigineedi added a comment - - edited

          Made changes to the code to rename the Label to a hardcoded string, which is now working but it is getting renamed if the user clicks anywhere in the rectangular area of the label need to change it to work only when the user clicks on the string. Also, have to add a condition to check the Coordinates tier as well, as we are not allowing users to rename it. And one more thing is that it's not getting renamed when the user drags it, which is a good thing
          Before clicking:

          After clicking:

          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - - edited Made changes to the code to rename the Label to a hardcoded string, which is now working but it is getting renamed if the user clicks anywhere in the rectangular area of the label need to change it to work only when the user clicks on the string. Also, have to add a condition to check the Coordinates tier as well, as we are not allowing users to rename it. And one more thing is that it's not getting renamed when the user drags it, which is a good thing Before clicking: After clicking:
          Hide
          jsirigin Jaya Sravani Sirigineedi added a comment - - edited

          Code changes are done to rename the label when the user double click on the middle of the track label (where the name appears) and a popup JOptionPane is shown in order for the user to enter the new name (see below screenshot), once the user enters the new name and clicks ok it will rename the label, if he wishes to not rename he can click cancel or close the window.
          Branch: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-457

          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - - edited Code changes are done to rename the label when the user double click on the middle of the track label (where the name appears) and a popup JOptionPane is shown in order for the user to enter the new name (see below screenshot), once the user enters the new name and clicks ok it will rename the label, if he wishes to not rename he can click cancel or close the window. Branch: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-457
          Hide
          jsirigin Jaya Sravani Sirigineedi added a comment -

          As explained in the above comments, the Track Label is completely designed using graphics, we will be able to track mouse events but introducing JLabel or any tet box into the graphics is kind of hard, so currently this is implemented using a popup dialog box when the user double clicks the middle part of the track label (where the name appears). A pull request has been raised to a new branch in the team repository to store code for the current implementation. https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/953

          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - As explained in the above comments, the Track Label is completely designed using graphics, we will be able to track mouse events but introducing JLabel or any tet box into the graphics is kind of hard, so currently this is implemented using a popup dialog box when the user double clicks the middle part of the track label (where the name appears). A pull request has been raised to a new branch in the team repository to store code for the current implementation. https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/953
          Hide
          nfreese Nowlan Freese added a comment - - edited

          Testing on Mac
          Built Sravani's IGBF-457 IGB branch successfully.
          The renaming feature works as described.

          Ready for pull request: https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/953

          Show
          nfreese Nowlan Freese added a comment - - edited Testing on Mac Built Sravani's IGBF-457 IGB branch successfully. The renaming feature works as described. Ready for pull request: https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/953
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          Merged the branch to the team repository. Branch installers ready for testing.

          Show
          ann.loraine Ann Loraine added a comment - - edited Merged the branch to the team repository. Branch installers ready for testing.
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          To test:

          • Download, install, and run branch installer from team repository; name should contain text "IGBF-457"

          Other suggestion for testing:

          • If not already done, check how the new interface component looks in Linux, Windows, Mac
          Show
          ann.loraine Ann Loraine added a comment - - edited To test: Download, install, and run branch installer from team repository; name should contain text " IGBF-457 " Other suggestion for testing: If not already done, check how the new interface component looks in Linux, Windows, Mac
          Hide
          nfreese Nowlan Freese added a comment - - edited

          Testing on Mac

          Downloaded, installed, and ran branch installer for IGBF-457. Everything worked correctly.

          The appearance of the new interface component in Mac was the same as other/previous IGB interface components, i.e. it looked normal.

          To test:
          Download and install the IGBF-457 branch installer.
          Start IGB.
          Select the human genome.
          Double-click on the RefSeq Curated track name.
          Check that a window appears near where you double-clicked.
          Check that the window allows you to modify the track's name.

          Show
          nfreese Nowlan Freese added a comment - - edited Testing on Mac Downloaded, installed, and ran branch installer for IGBF-457 . Everything worked correctly. The appearance of the new interface component in Mac was the same as other/previous IGB interface components, i.e. it looked normal. To test: Download and install the IGBF-457 branch installer. Start IGB. Select the human genome. Double-click on the RefSeq Curated track name. Check that a window appears near where you double-clicked. Check that the window allows you to modify the track's name.
          Hide
          kgopu Kaushik Gopu added a comment - - edited

          Tested on Windows.

          • Fetched the IGBF-457 branch and ran it on a Windows machine.
          • Followed the test instructions provided in the notes.
          • The renaming feature works as described
          Show
          kgopu Kaushik Gopu added a comment - - edited Tested on Windows. Fetched the IGBF-457 branch and ran it on a Windows machine. Followed the test instructions provided in the notes. The renaming feature works as described
          Hide
          nfreese Nowlan Freese added a comment -

          Testing complete, closing ticket.

          Show
          nfreese Nowlan Freese added a comment - Testing complete, closing ticket.

            People

            • Assignee:
              jsirigin Jaya Sravani Sirigineedi
              Reporter:
              mason Mason Meyer (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: