Closed
Bug 93732
Opened 24 years ago
Closed 23 years ago
Composer dialog cleanup
Categories
(SeaMonkey :: Composer, defect, P4)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.6
People
(Reporter: bugs, Assigned: cmanske)
References
Details
(Whiteboard: EDITORBASE (1 day))
Attachments
(1 file, 2 obsolete files)
198.56 KB,
patch
|
slogan
:
review+
sfraser_bugs
:
superreview+
|
Details | Diff | Splinter Review |
Image Properties, Page Colors, Insert Table, Table Cell/Properties dialogs are
all showing weird layout symptoms:
1) Grid columns aren't showing up
2) textfields draw over buttons
3) buttons etc run off screen
4) dialog size oddly when sizeToContent() called.
Patch in a sec...
Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
r=jag
Reporter | ||
Comment 3•24 years ago
|
||
Comment 4•24 years ago
|
||
sr=hewitt
Reporter | ||
Comment 5•24 years ago
|
||
Fixed!
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 6•24 years ago
|
||
Doh, collission on my r=jag. So for the record ... :-)
Assignee | ||
Comment 8•24 years ago
|
||
What happened to module owner permission before checking in fixes?
We (Composer UI engineers) are not happy at all about these changes that were
made without CCing us or asking for our review.
Who said you can redesign dialogs? You moved the "Advanced Edit" button to
different locations so it is not consistent across all dialogs, as it was
before. Moving it to the lower-left corner, along with "Ok", "Cancel" etc, may
be a good idea, but then it should be done for all dialogs.
You made significant changes to the Preview window in the Image dialog, which
I also think needs more review and discussion.
I want these changes backed out until we can discuss and approve them.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 9•24 years ago
|
||
A specific note about the patch:
I think specifying widths for the dialog like this:
style="width: 43em;" in the Image dialog
style="width: 25em;" in the Insert Table dialog
is a bad idea. It may appear to fix errors in dialog layout, but it will only
obscure finding those errors in other languages, especially German.
Comment 10•24 years ago
|
||
As far as I can tell from the original bug that touched the image dialog was
trying to fix the chopping of buttons in the dialog.
Currently in my Mac build from today, Modern theme, the choose image button
doesn't appear the first time and then is still chopped on subsequent openings of
that dialog.
Reporter | ||
Comment 11•24 years ago
|
||
Changes removed. Good day.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → WONTFIX
Assignee | ||
Comment 12•24 years ago
|
||
Ben, thanks, but lets be constructive about this. You had lots of good
suggestions in the patch, which we want to investigate. I like the idea of
locating the Advanced Edit button in the lower left corner, for example.
Reopening to hold onto the attachments.
Adding dependency on bug 87652 to monitor the issue of what overlay ID to use
for center vs. right-aligned "Ok", "Cancel", "Help" buttons.
Status: RESOLVED → REOPENED
Depends on: 87652
Resolution: WONTFIX → ---
Summary: Many editor dialogs busted → Review editor dialogs to improve layout problems and location of Advanced Edit button
Comment 14•24 years ago
|
||
moving out 9.4
Severity: normal → minor
Priority: -- → P4
Target Milestone: --- → mozilla0.9.4
Assignee | ||
Comment 15•24 years ago
|
||
After various discussions, we decided that moving the "Advanced Edit" button to
the lower-left corner of all property dialogs is not a good idea. For some
dialogs, this would be too crowded. The primary reason is that in dialogs that
have a Help button, that button should be in the lower left corner in Mac.
Status: NEW → ASSIGNED
Comment 16•23 years ago
|
||
table properties/advanced edit button doesn't trigger anything on Linux. Is that
covered by this bug?
Assignee | ||
Comment 17•23 years ago
|
||
No! Please file a new bug on that issue.
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Comment 18•23 years ago
|
||
What is the status of this bug? 0.9.5 realistic? Is a patch forthcoming?
Assignee | ||
Comment 20•23 years ago
|
||
There's a few dialogs that need minor tweaking -- mainly to put "Ok" "Cancel"
buttons in lower-right corner rather than centered. Easy to do.
Comment 21•23 years ago
|
||
It's not just the ok and cancel buttons, but there is still alout of
'autostretch' and 'valign' attributes lying around (e.g EdTableProps.xul) that
could be replaced with box-pack and box-align, etc.
http://mozilla.org/projects/xul/layout.html
Assignee | ||
Comment 22•23 years ago
|
||
Right, I'm aware of the "autostretch" that needs to be purged. Working on it.
Assignee | ||
Updated•23 years ago
|
Whiteboard: EDITORBASE (1 day)
Assignee | ||
Comment 23•23 years ago
|
||
Tasks relating to general dialog cleanup:
1. Be sure all dialogs right-align the Ok / Cancel [/Help] buttons along the
bottom.
2. Replace 'autostretch' with appropriate XUL 1.0 syntax.
3. Simplify "grid" usage to use boxes instead if possible.
Summary: Review editor dialogs to improve layout problems and location of Advanced Edit button → Composer dialog cleanup
Assignee | ||
Updated•23 years ago
|
Attachment #44724 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #44726 -
Attachment is obsolete: true
Assignee | ||
Comment 24•23 years ago
|
||
4. Add "onunload" handlers on all dialogs (see bug 96891) so clicking on "X"
goes through appropriate JS code to cleanup dialog.
Assignee | ||
Comment 25•23 years ago
|
||
*** Bug 96891 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 26•23 years ago
|
||
*** Bug 87652 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 27•23 years ago
|
||
*** Bug 92247 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 28•23 years ago
|
||
5. Change global variable "dialog" to "gDialog" in all dialog JS files.
(formerly bug 92247)
Assignee | ||
Comment 29•23 years ago
|
||
*** Bug 102674 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 30•23 years ago
|
||
Task from bug 102674:
6. okCancelHelpButtonsRight should not be inside tabbox
Assignee | ||
Comment 31•23 years ago
|
||
*** Bug 94749 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 32•23 years ago
|
||
From bug 94749:
7. Simplify image map code in Image properties dialog
Assignee | ||
Comment 34•23 years ago
|
||
*** Bug 95526 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 35•23 years ago
|
||
Note that task 7 (simplify Image Map code) is no longer part of this bug.
This task touches every dialog XUL file as well, so including here
7. Remove class="dialog" from all buttons
Assignee | ||
Comment 36•23 years ago
|
||
Assignee | ||
Comment 37•23 years ago
|
||
As daunting as the patch on 10/09/01 seems, it the changes fit simple patterns
that are repeated in just about all of the XUL or JS files:
1. Be sure all dialogs right-align the Ok / Cancel [/Help] buttons along the
bottom.
Look for this sort of change:
- <hbox id="okCancelButtons"/>
+ <hbox id="okCancelButtonsRight"/>
2. Replace 'autostretch' with appropriate XUL 1.0 syntax.
Look for changes like this:
- <hbox autostretch="never">
+ <hbox align="center">
or
- <hbox autostretch="never" valign="middle">
+ <hbox align="center">
Also, align="start" is another common replacement, when the child elements
should be aligned starting at the top or left.
3. Simplify "grid" usage to use boxes instead if possible.
Actually, this didn't need to be done. Some grids were replaced with boxes in
other bugs, and there were no other instances that needed to be fixed.
A few columns had some flex added to them (e.g., EdInsertTable.xul) to
improve layout.
4. Add "onunload" handlers on all dialogs (see bug 96891) so clicking on "X"
goes through appropriate JS code to cleanup dialog.
You'll see a lot of examples of this addition to the <window> element:
+ onunload="onCancel()"
5. Change global variable "dialog" to "gDialog" in all dialog JS files.
By far the largest change. Every dialog includes EdDialogCommon.js, and since
it was already refering to the global "dialog" object, I move the initialization
of "gDialog" there:
+var gDialog = new Object;
Thus the declaration and initialization of "dialog" was removed from all
dialogs. Every instance of "dialog." is replaced with "gDialog."
6. okCancelHelpButtonsRight should not be inside tabbox
This change is only in EdTableProps.xul, see changes after
"@@ -249,17 +250,16 @@"
7. Remove class="dialog" from all buttons
Again, lots of simple replacements to remove the "dialog" class from buttons
only. it is left on all dialog <window> elements.
Assignee | ||
Comment 38•23 years ago
|
||
Testing note: Basically, every dialog should work and look about the same (in
some cases, better, I hope!) as it does before these changes. The Ok/Cancel
(and Help, if included) buttons should be aligned to the right side.
To test task 4:
1. Bring up each dialog
2. Move it to a different location
3. Click on the "X" in the upper right corner.
4. Launch the dialog again. It should appear in the same location as where you
moved it because the "onunload" is (usually) calling "onCancel()", which should
save the current location. I currently see one dailog that isn't doing that:
The List Properties dialog is always comming up just under the caption of the
main window, and doesn't remember its location, no matter how you close the
dialog. I'm investigating that as a separate issue.
Attachment #52791 -
Flags: review+
Assignee | ||
Comment 39•23 years ago
|
||
Review was by Syd (r=syd)
After extensive testing, one change in EdDialogCommon.js to avoid the
warning caused by trying to close the window twice:
@@ -1143,7 +1147,8 @@
function onCancel()
{
SaveWindowLocation();
- window.close();
+ // Close dialog by returning true
+ return true;
}
Whiteboard: EDITORBASE (1 day) FIX IN HAND, need r=,sr= → EDITORBASE (1 day) FIX IN HAND, need sr=
Comment 40•23 years ago
|
||
in pref-editing.xul, I see:
<row align="center">
You should remove the extra space before "align"
Although not introduced with this patch, you should remove the extra spaces on
these lines in EdAEHTMLAttributes.js:
var name = TrimString(gDialog.AddHTMLAttributeNameInput.value);
gDialog.AddHTMLAttributeValueInput.value = GetTreeItemValueStr( ...
gDialog.AddHTMLAttributeNameInput.value = selectedName;
if ( value != gDialog.AddHTMLAttributeValueInput.value )
In EdColorProps.js, why do we need these lines? Can they all be removed?
// Setting a color automatically changes into UseCustomColors mode
- //dialog.CustomColorsRadio.checked = true;
+ //gDialog.CustomColorsRadio.checked = true;
In EdDialogTemplate.js, why do we need these line? Can they be removed?
// GET EACH CONTROL -- E.G.:
- //dialog.editBox = document.getElementById("editBox");
+ //gDialog.editBox = document.getElementById("editBox");
and
// SET FOCUS TO FIRST CONTROL
- //SetTextboxFocus(dialog.editBox);
+ //SetTextboxFocus(gDialog.editBox);
and
// Set attribute example:
-// imageElement.setAttribute("src",dialog.srcInput.value);
+// imageElement.setAttribute("src",gDialog.srcInput.value);
If we can't remove them, can we add a space to the last one (before "gDialog")?
In EdImageProps.js, add a space after "if":
if(gDialog.PreviewImage)
and remove extra spaces from these lines:
switch ( gDialog.alignTypeSelect.value )
globalElement.setAttribute( "align", gDialog.alignTypeSelect.value );
In EdInsertTable.js, are these lines missing ';' at the end?
rows = ValidateNumber(gDialog.rowsInput, null, 1, maxRows, null, null, true)
columns = ValidateNumber(gDialog.columnsInput, null, 1, maxColumns, null, ...
Also in EdInsertTable.js, ValidateData looks odd to me; this isn't anything
introduced with this patch so maybe we should file a new bug on this function?
In particular, I don't like (1) "gValidationError", (2) I don't see where rows/
cols values are used, (3) the result for ValidNumber isn't always assigned, and
(4) are "rows" and "columns" globals? if so, why aren't border and width?
In EdLinkProps.js, add a space on these lines (between parameters):
gDialog.linkTextCaption.setAttribute("label",GetString("LinkImage"));
gDialog.linkTextMessage.setAttribute("value",imageElement.src);
gDialog.linkTextCaption.setAttribute("label",GetString("LinkText"));
gDialog.linkTextMessage.setAttribute("value",TruncateStringAtWordEnd...
gDialog.linkTextMessage.setAttribute("value",GetString("MixedSelection"));
gDialog.linkTextInput.setAttribute("hidden","true");
I'm sure I missed some other whitespace inconsistencies but these are the ones
that I noticed at a glance.
Comment 41•23 years ago
|
||
Speaking of whitespace, I don't suppose you can remove trailing whitespace on
lines while you're about it?
Also, my personal preferences is for gDialog = {}; instead of new Object();
Comment 42•23 years ago
|
||
Comment on attachment 52791 [details] [diff] [review]
A very big patch.
rs=sfraser
Attachment #52791 -
Flags: superreview+
Assignee | ||
Comment 43•23 years ago
|
||
All of the whitespace and other changes suggested by brade and neil were made.
Whiteboard: EDITORBASE (1 day) FIX IN HAND, need sr= → EDITORBASE (1 day) FIX IN HAND
Assignee | ||
Comment 44•23 years ago
|
||
checked in.
There are other new developments in XUL 1.0, such as replacing
<window class="dialog"
with
<dialog
but I'll do this in another bug.
Assignee | ||
Comment 45•23 years ago
|
||
2nd phase of XUL 1.0 dialog cleanup is bug 104113
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•