Menu

#291 Adding a new sidebar-item breaks session-compatibility

next release
closed
session (10)
5
2018-03-06
2017-10-17
No

If a view with a sidebar-item is restored from a state which was created when the sidebar-item was not present yet, the state cannot be restored.

This is caused by the expanded-state, which is fetched from the viewstate. It is stored as a list of booleans. If the number of sidebar-items exceeds the number of items in the list, the program crashes with an exception (see attachment).

At least the number of sidebar-items should be checked against the number of items in the list and a default-value should be set to all remaining items if applicable.
Furthermore using a simple list might not work if a new sidebar-item is inserted between two other items, since the mapping will become incorrect. Maybe we shouldrethink the use of this datastructure.

1 Attachments

Discussion

  • Philipp Mewes

    Philipp Mewes - 2018-01-09
    • Blocks: --> feature #79
     
  • Philipp Mewes

    Philipp Mewes - 2018-01-10
    • status: open --> in-progress
    • assigned_to: Philipp Mewes
     
  • Philipp Mewes

    Philipp Mewes - 2018-01-10

    Replaced the list with a map and extended the class SideBarItem with a key to uniquely identify sidebar items in this map ([69880e]). This update breaks session compatibility one-time.

     

    Related

    Commit: [69880e]

  • Philipp Mewes

    Philipp Mewes - 2018-01-10
    • status: in-progress --> needs-review
     
  • Till Schäfer

    Till Schäfer - 2018-01-11
    • Blocks: feature #79 -->
     
  • Nils Kriege

    Nils Kriege - 2018-01-16
    • status: needs-review --> re-opened
     
  • Nils Kriege

    Nils Kriege - 2018-01-16

    The changes for this bug seem to cause problems: The side bar element 'Zoom' of the scaffold tree view is broken and only shows a blank screen. Please investigate the reason for this and make sure that all sidebar elements work.

     
  • Philipp Mewes

    Philipp Mewes - 2018-01-16
    • status: re-opened --> in-progress
     
  • Philipp Mewes

    Philipp Mewes - 2018-01-16

    There were problems with duplicated keys, so the expanded-state of the zoom-item was overwritten with the state of another item ([1c0272] ). Also fixed a similiar bug (and [2a0b08]).
    The zoom-item itself seems to be ok. Looks like it shows a blank screen since the cursor pointed to a white area in the view.

     

    Related

    Commit: [1c0272]
    Commit: [2a0b08]

  • Philipp Mewes

    Philipp Mewes - 2018-01-16
    • status: in-progress --> needs-review
     
  • Nils Kriege

    Nils Kriege - 2018-03-06
    • status: needs-review --> needs-merge
     
  • Nils Kriege

    Nils Kriege - 2018-03-06

    Works fine! Thanks!

     
  • Till Schäfer

    Till Schäfer - 2018-03-06
    • status: needs-merge --> closed
    • Group: any future version --> next release
     
  • Till Schäfer

    Till Schäfer - 2018-03-06

    merged in [2829f9]

     

    Related

    Commit: [2829f9]


Log in to post a comment.

MongoDB Logo MongoDB