Defect #5958

Empty visible sidebar in Overview section

Added by Marc Kaiser over 7 years ago. Updated about 4 years ago.

Status:ClosedStart date:2010-07-25
Priority:NormalDue date:
Assignee:Jean-Baptiste Barth% Done:

0%

Category:UI
Target version:-
Resolution: Affected version:

Description

If you disable the "time tracking" module in the project settings (based on the fact that you have a default installation with no other plugins), the sidebar will be shown (even if it should not), because it contains a single space.

Fix idea: One way would be to change the has_content? query in base.rhtml to something else or to patch this method to trim the string first.

sidebar_empty.diff Magnifier - Patch to have no white-space in the sidebar if empty (724 Bytes) Henrik Ammer, 2010-07-26 13:40

emptySidebar.png - Screenshot as confirmation (4.32 KB) Daniel Felix, 2013-01-15 09:56

5958-patch.diff Magnifier (1.77 KB) Jean-Baptiste Barth, 2013-05-05 19:00


Related issues

Related to Redmine - Defect #15414: Empty sidebar should not be displayed in project overview Closed

History

#1 Updated by Henrik Ammer over 7 years ago

I've been thinking about this aswell. Since the CSS selector :empty needs the element to have no white-space I did a small patch.

#2 Updated by Daniel Felix almost 5 years ago

I can confirm this misbehaviour. But the applied patch won't fix this.

There still need to be some css enhancement to remove the sidebar display.

But in my opinion it would be better that the whole sidebar div won't be rendered at all if there is nothing to display. What do you think?

#3 Updated by Jean-Baptiste Barth over 4 years ago

  • Category set to UI
  • Assignee set to Jean-Baptiste Barth
  • Target version set to Candidate for next major release
  • Affected version (unused) set to devel

I don't think introducing a CSS hack would be a good idea for this. I would prefer that ApplicationHelper#has_content? behaves the right way. It turns out simply delegating to Rails' #content_for? seems to work well, but I'd like to understand why Redmine had hack around it in the first place. I'll dig into that and let you know.

#4 Updated by Jean-Baptiste Barth over 4 years ago

After some research, there's a very good reason redmine has hacked around it: it wasn't present in Rails 1.x and 2.x, it was introduced in 3.0.0.

This part of the code is 5 years old, and not really tested, but I guess the framework does the right thing here, so we should rely on it. Jean-Philippe: can you tell me what you think about the attached patch ? Anything I missed ? Does it need some more tests in your opinion ?

#5 Updated by Mischa The Evil about 4 years ago

  • Status changed from Confirmed to Closed
  • Target version deleted (Candidate for next major release)

This issue is superseded by #15414, which itself is fixed - like suggested by Jean-Baptiste - in r12310.

#6 Updated by Mischa The Evil about 4 years ago

  • Related to Defect #15414: Empty sidebar should not be displayed in project overview added

Also available in: Atom PDF