Patch #26674

Add CSS classes to column headers of issues and timelogs list

Added by Dmitry Lisichkin 5 months ago. Updated 1 day ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:UI
Target version:4.0.0

Description

For now there no any chances to style table headers for several columns becouse there no any css classes (it just <th> with column caption)
In patch I offer to add two classes: query-column-header and query-column-header-#{column.name}

additional_css.patch Magnifier (733 Bytes) Dmitry Lisichkin, 2017-08-14 11:38

additional_css_for_query_column_headers.patch Magnifier (3.39 KB) Marius BALTEANU, 2017-12-18 23:45

Associated revisions

Revision 17176
Added by Go MAEDA 1 day ago

Add CSS classes to column headers of issues and timelogs list (#26674).

Patch by Marius BALTEANU.

History

#1 Updated by Go MAEDA 5 months ago

  • Status changed from New to Needs feedback
  • Target version set to Candidate for next major release

I agree that adding classes is a nice improvement for theme developers. But I think that class names such as "query-column-header query-column-header-issue" is long and "query-column-header issue" is enough.

What do you think?

#2 Updated by Dmitry Lisichkin 5 months ago

Go MAEDA wrote:

I agree that adding classes is a nice improvement for theme developers. But I think that class names such as "query-column-header query-column-header-issue" is long and "query-column-header issue" is enough.

What do you think?

Class name contained only column name is not enough to specify context. It may be used in another parts of application and its style will be attached to query-column-header too. For example: if we have column with name 'highlight' then column header will be with background (.highlight { background-color: #FCFD8D;} from application.css).

#3 Updated by Marius BALTEANU 29 days ago

I think we should use the existing `css_classes` method to generate also the classes for query column headers. In this way, both type of cells (th and td) will have the same classes and we can easily target them from CSS. Attach is a patch that implements this and adds multiple assertions.

Regarding the proposed classes, the length is not a problem from my point of view, but we should be consistent with the existing implementations and if we want to change the class name because is not enough to specify the context, the change should apply also for tds.

#4 Updated by Dmitry Lisichkin 28 days ago

Marius BALTEANU wrote:

I think we should use the existing `css_classes` method to generate also the classes for query column headers

I agree. I prepare new issue with modifications of css_classes but in redmine css we have problem with specify everywhere and we need to fully rewrite application.css. All that fixes will broke all existed redmine themes, so I think that it need to be fixed it in a complex way and only for next major version.

#5 Updated by Marius BALTEANU 28 days ago

  • Status changed from Needs feedback to New

Dmitry Lisichkin wrote:

I agree. I prepare new issue with modifications of css_classes but in redmine css we have problem with specify everywhere and we need to fully rewrite application.css. All that fixes will broke all existed redmine themes, so I think that it need to be fixed it in a complex way and only for next major version.

Totally agree. Until then, this issue can be implemented.

#6 Updated by Toshi MARUYAMA 6 days ago

Can we set target 4.0 or 4.1?

#7 Updated by Go MAEDA 6 days ago

Toshi MARUYAMA wrote:

Can we set target 4.0 or 4.1?

I am in favor of #26674#note-3. The patch is simple and consistent with existing classes. I think we can merge it to the trunk.

#8 Updated by Marius BALTEANU 6 days ago

Go MAEDA wrote:

Toshi MARUYAMA wrote:

Can we set target 4.0 or 4.1?

I am in favor of #26674#note-3. The patch is simple and consistent with existing classes. I think we can merge it to the trunk.

Totally agree.

#9 Updated by Go MAEDA 5 days ago

  • Target version changed from Candidate for next major release to 4.1.0

Setting target version to 4.1.0.

#10 Updated by Go MAEDA 1 day ago

  • Subject changed from Additional css for query column headers to Add CSS classes to column headers of issues and timelogs list
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0

Committed. Thank you for you all's contribution.

Also available in: Atom PDF