Bug 120922 - "Dirty Page" behavior in XML Report Designer editor needs improved
Summary: "Dirty Page" behavior in XML Report Designer editor needs improved
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.0 Final   Edit
Assignee: Wang Qiangsheng CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-14 13:47 EST by Paul Clenahan CLA
Modified: 2005-12-22 20:37 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Clenahan CLA 2005-12-14 13:47:53 EST
If you edit the XML in the "source" view of the Layout Editor, and then try to switch back to the Layout view, you will get an error message indicating that you need to save your changes.

This problem is the user has to figure out what he needs to do to save the changes (or discard them, which is even harder), and the error message is not very good.

The error message is "Source page is dirty. Other pages cannot be used until the source is saved." (including the quotes). And then the user needs figure out how to save or discard their changes. A better and more typical approach would be:

XML Report Design has been changed. Do you want to save the changes?
<Yes> <No> <Cancel>

Yes would save the changes
No would discard the changes
Cancel would do nothing and remain on the Source page


In addition, the dialog is titled "Error" (including the quotes). The dialog needs to use a better title (and certainly should not have the quotes).
Comment 1 Wang Qiangsheng CLA 2005-12-14 22:37:12 EST
Add new message dialog to let user choice to save,doesn't save or cancel.
The only different with the suggesion from Paul is, if user select no the chages will not be discarded automatically. Becuase if we do auto discarding, we need reload the file and rebuild all graphical designer. That can be a potential performace issue.
So if user select no the page will switch to graphical editor. The user can simplly click the save button to discard all source changes.
Comment 2 Paul Clenahan CLA 2005-12-15 12:53:09 EST
I disagree with the suggested behavior -- if they select "No" (i.e. don't save) this will be very confusing for users if they are simply returned to the visual layout editor. If I understand this correctly, they will now be at a point where the content in the XML view and the visual view are out of sync. This is not intuitive and is a serious usability issue.

I might add that we should support discarding the changes since there are users who will make changes to the XML file and then may decide they want to discard them anyway.

Comment 3 Paul Clenahan CLA 2005-12-15 12:56:00 EST
I meant to add that once they are back in the layout view, users will not know that simply clicking the save button will discard the changes they made in the XML. 
Comment 4 Wenbin He CLA 2005-12-16 18:46:04 EST
I agreed with the Paul's suggested behaviour because that will be what most people have expected.

Even with the current behaviour, I don't see how can we avoid to reload the design after the user saved the change in XML tab.

One more issue is that we don't have a good way to discard the changes made in the XML source unless I close the whole report editor.  

Two other improvements that we can have for XML sourec editor:

1. When I switch to normal tab from XML tab, the XML soure editor should highlight the tag or the line that has error if the xml source is invalid, so users can easily figure out how to fix the error.

2. if the report design is invalid, we should open the design file with XML source editor, and highlight the line with syntax errors. That's one of main objectives to include the XML source editor.

Comment 5 Wang Qiangsheng CLA 2005-12-20 01:47:50 EST
 If user selection no when user try to switch from xml source to report designer, all changes will be discarded.
Other requirement from Wenbin, i'll fire a new enhacment for BIRT 2.1
Comment 6 Arto Laurila CLA 2005-12-22 20:37:45 EST
Verified in build 20051222.