LD4P / sinopia_editor

Sinopia Linked Data Editor
https://sinopia.io/
Apache License 2.0
35 stars 10 forks source link

Close and save buttons not closing/saving open tab #2057

Closed fculpepper closed 3 years ago

fculpepper commented 4 years ago

What went wrong? When saving, I get confirmation of the save but when closing am told that there is unsaved information. And, when clicking the Close button, the leftmost resource template is closed, not the one that is open. What did you expect to happen? I expect the RT that I am working on to save when I press the save button and close when I press the close button.

Please include a screenshot Snag_4b45a25

Snag_4b487bd

Snag_4b49e72

peetucket commented 4 years ago

See also #2052 -- this is basically the same thing I believe

michelleif commented 4 years ago

2052 is closed now. @fculpepper are you still seeing this bug?

briesenberg07 commented 4 years ago

Just commented on similar issue #2052 .

michelleif commented 4 years ago

@fculpepper new version of Sinopia released today that should fix the erroneous message about unsaved info. Can you check if that is fixed? Are you still seeing the problem with closing the wrong tab? (that is also documented in #2183

jermnelson commented 4 years ago

Adding a new wrinkle to this bug as it is related to issues with closing/saving the correct tab.

To replicate (when running locally with in USE_FIXTURES=true):

  1. Open a resource template like ld4p:RT:bf2:Title:AbbrTitle and add some content: Screen Shot 2020-08-10 at 9 57 17 AM
  2. Open a second resource (do not close the previously opened resource template) like resourceTemplate:bf2:Note: Screen Shot 2020-08-10 at 9 59 09 AM
  3. Click on the close button for the first resource template, a pop-up confirmation modal is displayed as expected: Screen Shot 2020-08-10 at 10 05 44 AM
  4. However, if you click on the blue close button, the
    ld4p:RT:bf2:Title:AbbrTitle tab is not close but instead the tab with the resourceTemplate:bf2:Note resource template is closed, leaving the original resource template:

Screen Shot 2020-08-10 at 10 08 33 AM

michelleif commented 3 years ago

This seems to be happening again. (examples are on stage)

I have three templates open. One is a template that I entered some data into "A form about a thing". The other two are resource templates I opened but have not touched, both tabs called "Resource Template".

Screen Shot 2021-02-18 at 9 29 17 AM

I close the current highlighted tab and it works as expected. Now I have two tabs.

Screen Shot 2021-02-18 at 9 29 24 AM

Now I want to close the "A form about a thing" tab. So I close it by clicking the little "x", while staying on "Resource Template", and am prompted, as expected, to save the unsaved changes.

Screen Shot 2021-02-18 at 9 29 31 AM

I don't want to save, so I just click "Close".

Now I have one template standing, but it's not the one I was on before called "Resource Template". It's the one I tried to close called "A form about a thing"

Screen Shot 2021-02-18 at 9 29 39 AM
jermnelson commented 3 years ago

@michelleif I think this bug was fixed with Justin's recent merged PR #2780. I tested on dev but we should test again on stage after Monday's dependency updates (which should include Justin's PR)

michelleif commented 3 years ago

tested on DEV just now and this is fixed.