Closed Bug 447800 Opened 16 years ago Closed 16 years ago

month View is missing a right border

Categories

(Calendar :: Calendar Frontend, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: berend.cornelius09, Assigned: bv1578)

References

Details

Attachments

(3 files)

The month View is currently missing a right border. This should be restored.
Some implementation details:

As described in 
Bug 430382 comment #21 and Bug 430382 comment #33:
Adding the border will lead to disappearing lines in the column header. There has to be found a solution for. This is why I removed the right border from the grid in the last patch of that issue:
	
>.calendar-month-view-grid-row {                                                 
>    border-right: 1px solid #D2D2D2 !important;                                 
>    min-height: 1px;                                                            
>    height: 1px;                                                                
>}

to                                                                               
>.calendar-month-view-grid-row {                                                 
>    min-height: 1px;                                                            
>    height: 1px;                                                                
>}
Depends on: 430382
as in bug 434019, bottom could be affected also
I've tried to make a workaround for column header too and *seems* that the following code works.
I'm not a developer so I apologize in advance if I'm posting something wrong  but this is only for purpose, if it works I hope it could be used in some way.

I changed two line in calendar-month-view.xml file (\chrome\calendar.jar\content\calendar\) to add two selectors (their names are only for test)

from line 680
 <binding id="calendar-month-view-column-header">
    <content>
-     <xul:hbox flex="1">
+     <xul:hbox class="calendar-month-view-column-header_container" flex="1">
        <xul:spacer flex="1"/>
        <xul:label anonid="label" crop="right" class="calendar-month-view-column-header-label" />
        <xul:spacer flex="1"/>
      </xul:hbox>
    </content>
		
		
from line 715
  <binding id="calendar-month-view">
    <content>
      <xul:vbox class="verticalbox" flex="1">
-       <xul:hbox anonid="headerbox" equalsize="always"/>
+       <xul:hbox class="headerbox_container" anonid="headerbox" equalsize="always"/>

        <xul:grid anonid="monthgrid" flex="1">
          <xul:columns anonid="monthgridcolumns" equalsize="always">
            <xul:column flex="1" class="calendar-month-view-grid-column"/>
            <xul:column flex="1" class="calendar-month-view-grid-column"/>



and I add the following CSS code to UserChrome.css file (to add to calendar-view.css if it works)

calendar-month-view-column-header {
	/* borders only on top and bottom */
	border: none !important;
	border-bottom: 1px solid #D2D2D2 !important;
	border-top: 1px solid #D2D2D2 !important;
	/* without the following line, borders are 1px shorter (could be deleted line 445 in calendar-view.css file) */
	padding-bottom: 0px !important;
	/* background color only for a better look (?) */
	background-color: #EEEEEE !important;
}

.headerbox_container {
	/* border on the extreme right side of the headers */
	border-right: 1px solid #D2D2D2 !important;
}

.calendar-month-view-column-header_container {
	/* single column header borders  */
	border-left: 1px solid #D2D2D2 !important;
}

.calendar-month-view-grid-row{
	/* border for month grid */
	border-right: 1px solid #D2D2D2 !important;
}


The code seems to solve every misalignment between the headers and the grid. Column-header lines don't disappear on month-view resize (1px border on flex bug) and the border on the right side of the month-view is always aligned with the header. It works on week-view too.
As usual there is a lot of flickering and misalignment when month-view resize but final position seems always good.
 
I tried this on Lightning 0.9pre build 2008081218 and I used calendar-month-view.xml found in it.

Hope this helps.

(In reply to comment #2)

> ... It works on week-view too.

... on multiweek-view too.
My first time with a patch, I hope with a few mistakes.
The patch works with WinXP, Thunderbird 2.0.0.16, Lightning 0.9pre 2008082721. It's a workaround for this issue and, consequently, for the disappearing lines reported in bug 430382 comment #34. 
Header borders are always aligned with the grid and don't disappear when month-view changes size, even with month-view right border.

I've added two classes to calendar-month-view.xml:
- calendar-month-view-column-header-container
- headerbox-container
(maybe better names are required?).
Borders for single column headers are given by calendar-month-view-column-header-container and border on the right side is given by headerbox-container.

I've deleted padding on bottom side for calendar-month-view-column-header selector because, with new selectors, it cuts column-header borders.

I've also added a background color for the header (#EEEEEE), it looks as showed in the next attachment. I like it but it's just an idea.
Attachment #335870 - Flags: review?(Berend.Cornelius)
A proposal for a background color for the header. Not invasive but a little contrast (color #EEEEEE) with a completely white month-view.
Comment on attachment 335870 [details] [diff] [review]
workaround for the missing border and disappearing lines 

patch works fine and looks good. I just found that you unnecessarily introduced another css rule and the binding that your rule referred to virtually cries for consolidation. So I took myself the liberty to modify your patch in detail. If you  don't object I will check  in that one.
Attachment #335870 - Flags: review?(Berend.Cornelius) → review+
Comment on attachment 335870 [details] [diff] [review]
workaround for the missing border and disappearing lines 

patch works fine and looks good. I just found that you unnecessarily introduced another css rule and the binding that your rule referred to virtually cries for consolidation. So I took myself the liberty to modify your patch in detail. If you  don't object I will check  in that one.
Argh, I just see that here and in earlier patches of other bugs, we regressed bug 422369 again. Seems that I need to reopen that one.
Attached patch patch v. #2 — — Splinter Review
When I tested my promised consolidation I again ran into the know problem described in Bug 430382 with the vanished borders and remorsefully turned back my changes. What remains in this new patch is the removal of some spacers within the binding, the removal of the added background color as Christian denied this and an adaption to ltr -compliant style attributes. 
Decathlon, if you don't have any objections, I will check this patch in by tomorrow. Thank you for your contribution and your assistance!
(In reply to comment #9)

> When I tested my promised consolidation I again ran into the know problem
> described in Bug 430382 with the vanished borders and remorsefully turned back
> my changes.

I tried several css rules in combination with several css properties but *seems* that only those reported in the patch fix both issues (misalignment and disappearing with right border on month view). On the other hand, seems to me there isn't a "logical" way to make a workaround for issues due to bug 434019, only to try if something works.
Sorry for ltr style attribute (and for other missing things as well), I didn't even know the problem.
I checked in patch v. #2 on MOZILLA_1_8_BRANCH and trunk.
->Fixed
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: wanted-calendar0.9?
Checked in lightning 2008082818 and sunbird 20080828 -> VERIFIED.
Status: RESOLVED → VERIFIED
Flags: wanted-calendar0.9? → wanted-calendar0.9+
Target Milestone: --- → 0.9
Assignee: nobody → bv1578
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: