Project

General

Profile

Actions

Defect #5958

closed

Empty visible sidebar in Overview section

Added by Marc Kaiser over 14 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
-
Start date:
2010-07-25
Due date:
% Done:

0%

Estimated time:
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.


Files

sidebar_empty.diff (724 Bytes) sidebar_empty.diff Patch to have no white-space in the sidebar if empty Henrik Ammer, 2010-07-26 13:40
emptySidebar.png (4.32 KB) emptySidebar.png Screenshot as confirmation Daniel Felix, 2013-01-15 09:56
5958-patch.diff (1.77 KB) 5958-patch.diff Jean-Baptiste Barth, 2013-05-05 19:00

Related issues

Related to Redmine - Defect #15414: Empty sidebar should not be displayed in project overviewClosedJean-Philippe Lang

Actions
Actions #1

Updated by Henrik Ammer over 14 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.

Actions #2

Updated by Daniel Felix almost 12 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?

Actions #3

Updated by Jean-Baptiste Barth over 11 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.

Actions #4

Updated by Jean-Baptiste Barth over 11 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 ?

Actions #5

Updated by Mischa The Evil about 11 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.

Actions #6

Updated by Mischa The Evil about 11 years ago

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

Also available in: Atom PDF