Closed Bug 360947 Opened 13 years ago Closed 13 years ago

Calendar grid view outside screen limits when screen rotated to portrait mode (tablet width=768)

Categories

(Calendar :: Calendar Views, defect, minor)

Sunbird 0.3
defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED
Sunbird 0.5

People

(Reporter: ophilar, Assigned: gekacheka)

References

Details

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061006 Sunbird/0.3

Calendar grid component not recalculated properly when screen rotated to portrait mode (primary and secondary). In resolution 1024*768 columns right of Friday are cut and not displayed. No horizontal scroll bar is present.

Reproducible: Always

Steps to Reproduce:
1.Change screen orientation
2.
3.

Actual Results:  
Calendar grid view truncated.

Expected Results:  
Compact the columns to fit to screen (narrower).

I'm using IBM x41 tablet w/ 1024 MB RAM, 1.5 GHz processor.
Version: unspecified → Sunbird 0.3a2
Workaround: drag the splitter (between the grid view and the left column) to the left.  With the minimonth is narrower but still legible, this still cuts off the right edge of the last day of the week of Month View, but at least events on the last day of the week are visible.  (I think the view minimum sizes must have been set for 800x600, so a width of 768 is just a bit narrower.)  Also, maybe use view > workweek days only. 

A fix to this bug might also fix bug 330282.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Calendar grid view outside screen limits when screen rotated to portrait mode → Calendar grid view outside screen limits when screen rotated to portrait mode (tablet width=768)
(patch -l -p 2 -i file.patch)

Problem was a little tricky, because by coincidence in month view both the navigation bar and the weekday header had similar minimum widths.  Also, I think having a deck also hid changes, so changing just month view (using DOM Inspector extension) didn't fix the problem because multiweek view was still forcing the width.


Width/padding/margin

In the navigation pane, the month names are buttons, and DOM Inspector showed that in the CSS rules for the buttons, buttons inherit a default min-width of 6.3em, which is pretty wide in the large title fonts.

In the weekday name headers, the deafault CSS for labels gives them a large margin which is not needed here.

To fix these issues, this patch overrides them with much smaller values for the navigation titles and weekday headers.


Overflow

The minimum width of the application panes should not depend on what locale is installed.  (We don't want to say users can use it on a small screen only if they use certain locales with short strings for month names and weekday names, such as Japanese.  It should be usable regardless of locale.)  If the user wants narrow panes, the application can hide the overflow.  (It might be nicer to use a smaller font instead of cropping, but I don't think there is an easy way to do that yet.)

In the weekday name header, since the columns are equal sized, the minimum width depended on the longest weekday name, which varies by locale.

In the month navigation titles, the months overlapped when the view became narrow.

To address both of these, overflow-x: hidden was added to the rules for a box containing the label.

Tested in Sunbird and Lightning on w2k

Month view (and multiday view) can now be made as narrow as 768px or narrower and the view is still usable.  Even if made very narrow, the full grid is still visible.  In this case the month names and weekday names fill their horizontal space and are truncated, but still legible.
Attachment #245987 - Flags: ui-review?(mvl)
(I did still have to drag the splitter to the left.)
Blocks: 330282
Comment on attachment 245987 [details] [diff] [review]
Month view: For month names and weekday names, minimize min spacing and allow overflow (so min width not dependent on locale)

ui-review=mvl
You still need to request code review from somebody.  (same for the other patches I ui-reviewed a while ago)
Attachment #245987 - Flags: ui-review?(mvl) → ui-review+
Comment on attachment 245987 [details] [diff] [review]
Month view: For month names and weekday names, minimize min spacing and allow overflow (so min width not dependent on locale)

Please see comment #2 for description.
Attachment #245987 - Flags: first-review?(lilmatt)
Blocks: 270976
Blocks: 270915
Comment on attachment 245987 [details] [diff] [review]
Month view: For month names and weekday names, minimize min spacing and allow overflow (so min width not dependent on locale)

The rules work fine. My only comments are style nits.

You used 2 space indenting in all files.
Only mozilla/calendar/base/themes/[pw]instripe/calendar-views.css uses 2 space indenting.
The others should all use 4.  Don't look too closely at sunbird's calendar.css indenting though. ;)

r=lilmatt with the indenting change
Attachment #245987 - Flags: first-review?(lilmatt) → first-review+
(patch -l -p 2 -i file.patch)

Fixed lightning.css to be 4 space indent.
(left calendar.css changes as 2 space indent because the unchanged part of the rule is already 2 space indent, and there are several 2-space indent rules before it.)
Attachment #245987 - Attachment is obsolete: true
Attachment #248122 - Flags: second-review?(mvl)
Comment on attachment 248122 [details] [diff] [review]
v2: Month view: For month names and weekday names, minimize min spacing and allow overflow (so min width not dependent on locale)[nit addressed]

r2=mvl
Attachment #248122 - Flags: second-review?(mvl) → second-review+
Whiteboard: [needs checkin]
Assignee: nobody → gekacheka
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Sunbird 0.5
Version: Sunbird 0.3a2 → Sunbird 0.3
Patch checked in on MOZILLA_1_8_BRANCH and trunk.

-> FIXED
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [needs checkin]
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070106 Calendar/0.4a1
Status: RESOLVED → VERIFIED
Whiteboard: [litmus testcase wanted]
Flags: in-litmus?
Whiteboard: [litmus testcase wanted]
You need to log in before you can comment on or make changes to this bug.