Patch #21947

Improve page header title for deeply nested project structures (+ improved XSS resilience)

Added by Jan from Planio www.plan.io almost 2 years ago. Updated 12 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:UI
Target version:3.3.0

Description

Some theme developers (or even Redmine core, see below) may wish to put the project breadcrumbs within the page header title on a separate line, see screenshots attached.

Patch 0001 will add some extra span elements which make this possible for theme CSS. It also improves XSS resilience by using the safe_join helper instead of manually declaring strings .html_safe, see here and here. This patch shouldn't change things for existing themes and could therefore applied to core without any doubt, IMHO.

Patch 0002 actually changes Redmine's core CSS to take advantage of this and display the breadcrumbs on a separate line. I feel it looks better this way, but I realize that this is just my opinion, so I would see this patch as optional and up for discussion.

Old:

Overview - Sub-Subproject with a very long name - Redmine 2016-02-04 14-50-43.png

New:

Overview - Sub-Subproject with a very long name - Redmine 2016-02-04 14-51-33.png

0001-Add-additional-markup-to-page_header_title-to-enable.patch Magnifier (1.12 KB) Jan from Planio www.plan.io, 2016-02-04 07:49

0002-Put-project-breadcrumbs-in-page_header_title-on-sepa.patch Magnifier (1.11 KB) Jan from Planio www.plan.io, 2016-02-04 07:49

Overview - Sub-Subproject with a very long name - Redmine 2016-02-04 14-50-43.png (161 KB) Jan from Planio www.plan.io, 2016-02-04 07:51

Overview - Sub-Subproject with a very long name - Redmine 2016-02-04 14-51-33.png (155 KB) Jan from Planio www.plan.io, 2016-02-04 07:51

screenshot-font-comparison.png (52.5 KB) Go MAEDA, 2016-02-05 01:54

2016-11-30_new_redmine_header.png (10.1 KB) Ben Blanco, 2016-11-30 12:28

2016-11-30_old_redmine_header.png (12.2 KB) Ben Blanco, 2016-11-30 12:28


Related issues

Duplicated by Redmine - Defect #5261: Multiple level subprojects wrap around into the menu Closed 2010-04-07

Associated revisions

Revision 15256
Added by Jean-Philippe Lang over 1 year ago

Add additional markup to page_header_title to enable better styling (#21947).

Patch by Jan Schulz-Hofen.

Revision 15257
Added by Jean-Philippe Lang over 1 year ago

Put project breadcrumbs in page_header_title on separate line and use ellipsis if it's still too long (#21947).

Patch by Jan Schulz-Hofen.

Revision 15258
Added by Jean-Philippe Lang over 1 year ago

Font size for project breadcrumbs (#21947).

History

#1 Updated by Jan from Planio www.plan.io almost 2 years ago

  • Description updated (diff)

#2 Updated by Jan from Planio www.plan.io almost 2 years ago

  • Description updated (diff)

#3 Updated by Daniel Feliciano Branco almost 2 years ago

I have the same problem on some of my projects, so a +1 from me.

#4 Updated by Go MAEDA almost 2 years ago

Great. I think this should be included in Redmine core.

But breadcrumbs in small and bold font are hard to read with non HDPI devices, especially when displaying CJK characters.

I suggest changing the style to the following:

#header h1 .breadcrumbs { display:block; font-size: .6em; font-weight: normal; }

#5 Updated by Go MAEDA almost 2 years ago

  • Target version changed from Candidate for next minor release to 3.3.0

Setting target version to 3.3.0.

#6 Updated by Jan from Planio www.plan.io almost 2 years ago

Go MAEDA wrote:

I suggest changing the style to the following:

Sounds good to me! I must admit that I hadn't tested with CJK characters, but I agree that all texts should remain readable with all character sets, of course!

#7 Updated by Jean-Philippe Lang over 1 year ago

  • Status changed from Needs feedback to Closed
  • Assignee set to Jean-Philippe Lang

Changes committed, thanks.

#8 Updated by Go MAEDA over 1 year ago

  • Duplicated by Defect #5261: Multiple level subprojects wrap around into the menu added

#9 Updated by Ben Blanco 12 months ago

Hi,

I've upgraded to from 3.2.3 to 3.3.1, and now my header wraps even when they're short..

It's definitely cool that headers can be styled differently now, and wrap nicely when dealing with super-long-project-names, but for me we have two sub-levels max, and our names are short, yet I used to have this:

Now I have this:

We use circle theme v.2.0.2

Any help/indication on how I can fix this wrapping?

#10 Updated by Toshi MARUYAMA 12 months ago

Ben Blanco wrote:

Hi,
...

Please create new issue for feature request, because this issue has closed.

Also available in: Atom PDF