Project

General

Profile

Actions

Feature #32116

closed

Add configured theme to Redmine::Info

Added by Aleksandar Pavic about 5 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Administration
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Administration | Information

Displays various info about system, but doesn't display which theme is currently being used.

Environment:
  Redmine version                3.4.10.stable
  Ruby version                   2.3.3-p222 (2016-11-21) [x86_64-linux]
  Rails version                  4.2.11.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.9.3
  Git                            2.7.4
  Filesystem                     
Redmine plugins:

It is important to know which theme is used, because there is many themes available on internet,
and some themes don't show everything, or have bugs.


Files

32116-20191006@2x.png (62.7 KB) 32116-20191006@2x.png Go MAEDA, 2019-10-06 06:03
32116.patch (578 Bytes) 32116.patch Go MAEDA, 2019-10-06 06:04
331.patch (562 Bytes) 331.patch Aleksandar Pavic, 2019-10-07 22:23
2021-08-05_01-36-12.png (15 KB) 2021-08-05_01-36-12.png Mischa The Evil, 2021-08-06 22:31
0001-Add-current-theme-and-whether-it-includes-JavaScript.patch (1.28 KB) 0001-Add-current-theme-and-whether-it-includes-JavaScript.patch Patch against trunk @ r21131 Mischa The Evil, 2021-08-06 22:31

Related issues

Related to Redmine - Defect #36932: Handle nil return of Redmine::Themes.theme(Setting.ui_theme) in Redmine::Info.environmentClosedMarius BĂLTEANU

Actions
Has duplicate Redmine - Feature #35686: Add configured theme and whether it includes JavaScript to Redmine::Info.Closed

Actions
Actions #1

Updated by Go MAEDA about 5 years ago

+1
The theme is important information to investigate UI issues. Here is a patch to add Setting.ui_theme to admin/info page.

Actions #2

Updated by Aleksandar Pavic about 5 years ago

Thanks @Go MAEDA, I've followed your code, and delivered patch for 3.3.1 I guess it will work on other 3.x versions as well...

Actions #3

Updated by Marius BĂLTEANU about 5 years ago

I'm not sure if it's a good idea to show the configured "Theme" in the information page because the setting is already available in "settings?tab=display". For me, Information page is more about the system, environment, framework and tools which are not configurable in the admin. Also, why display only "Theme" and no other settings as well?

Actions #4

Updated by Aleksandar Pavic about 5 years ago

Theme is important to investigate UI issues, there are also some commercially available themes, which use white text on white background for example, and people are posting "info" data on sites like stackoverflow, or forums, IRC chats, asking for help, and we can't reproduce their issues, since issues are theme related.

Actions #5

Updated by Go MAEDA over 3 years ago

  • Related to Feature #35686: Add configured theme and whether it includes JavaScript to Redmine::Info. added
Actions #6

Updated by Marius BĂLTEANU over 3 years ago

Indeed, there were a lot of cases when this information would help us investigate more quickly the issues reported by the users. I think we should add this info.

Actions #7

Updated by Marius BĂLTEANU over 3 years ago

  • Target version set to Candidate for next major release
Actions #8

Updated by Mischa The Evil over 3 years ago

A slightly alternative, more extensive, approach was posted by me as an up-to-date patch in another, duplicating issue:

Mischa The Evil wrote in #35686:

Given that a fair amount of (UI) issues are caused by a third-party theme (see e.g. recently closed #35258 and #35534), it would be really helpful if information about the configured theme and whether it includes JavaScript is added to Redmine::Info.

Example:

I'll leave a patch against current trunk.

I'll modify the subject of this issue because Redmine::Info.enviroment is also (supposed to be?) displayed as the output of the 'rake/rails about' command (see source:/trunk/bin/about@21131#L6).

Actions #9

Updated by Mischa The Evil over 3 years ago

  • Related to deleted (Feature #35686: Add configured theme and whether it includes JavaScript to Redmine::Info.)
Actions #10

Updated by Mischa The Evil over 3 years ago

  • Has duplicate Feature #35686: Add configured theme and whether it includes JavaScript to Redmine::Info. added
Actions #11

Updated by Go MAEDA over 3 years ago

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

Setting the target version to 5.0.0.

Actions #12

Updated by Go MAEDA almost 3 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch after fixing RuboCop offenses by running "rubocop -a". Thank you.

$ bundle exec rubocop -a lib/redmine/info.rb
Inspecting 1 file
W

Offenses:

lib/redmine/info.rb:24:9: C: [Corrected] Style/MultilineIfModifier: Favor a normal unless-statement over a modifier clause in a multiline statement.
        theme_js  = (Redmine::Themes.theme(Setting.ui_theme).javascripts.include?('theme') ? ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/redmine/info.rb:24:22: C: [Corrected] Style/MultilineTernaryOperator: Avoid multi-line ternary operators, use if or unless instead.
        theme_js  = (Redmine::Themes.theme(Setting.ui_theme).javascripts.include?('theme') ? ...
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/redmine/info.rb:25:24: C: [Corrected] Style/MultilineTernaryOperator: Avoid multi-line ternary operators, use if or unless instead.
          theme_js  = (Redmine::Themes.theme(Setting.ui_theme).javascripts.include?('theme') ? ...
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/redmine/info.rb:26:3: C: [Corrected] Layout/IndentationWidth: Use 2 (not -21) spaces for indentation.
  ' (includes JavaScript)'
  ^^^^^^^^^^^^^^^^^^^^^
lib/redmine/info.rb:27:1: C: [Corrected] Layout/ElseAlignment: Align else with if.
else
^^^^
lib/redmine/info.rb:28:3: C: [Corrected] Layout/IndentationWidth: Use 2 (not -21) spaces for indentation.
  '' ...
  ^^
lib/redmine/info.rb:28:24: C: [Corrected] Style/RedundantInterpolation: Prefer to_s over string interpolation.
        theme_string = "#{theme + theme_js.to_s}" 
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/redmine/info.rb:29:1: W: [Corrected] Layout/EndAlignment: end at 29, 0 is not aligned with if at 25, 23.
end
^^^

1 file inspected, 8 offenses detected, 8 offenses corrected
Actions #13

Updated by Mischa The Evil over 2 years ago

  • Related to Defect #36932: Handle nil return of Redmine::Themes.theme(Setting.ui_theme) in Redmine::Info.environment added
Actions

Also available in: Atom PDF