Bug 39525 - App Center - support for SVG icons
App Center - support for SVG icons
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 4.1
Other Linux
: P5 enhancement (vote)
: UCS 4.1
Assigned To: Alexander Kläser
Dirk Wiesenthal
: interim-2
Depends on: 38894
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-14 11:39 CEST by Alexander Kläser
Modified: 2015-11-17 12:12 CET (History)
6 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Design
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2015-10-14 11:39:46 CEST
For a more flexible and improved view, we will support (and prefer) with UCS 4.1 SVG images as app icons. This may include different icons for gallery view and app page.

+++ This bug was initially created as a clone of Bug #38894 +++

The UMC App Center usability should be improved. The app list is getting longer and longer. :)
Comment 1 Stefan Gohmann univentionstaff 2015-10-23 07:24:04 CEST
I've installed the dudle-docker App. After the installation, I got the following message:

 Ein Fehler ist aufgetreten: Ignoring /var/cache/univention-appcenter/opencms.ini because of logo_detail_page: Invalid format

From the appcenter.log:
 20956 actions.install.container.9aa7   15-10-23 01:21:19 [    INFO]: Downloading "https://appcenter-test.software-univention.de/meta-inf/4.1/all.tar.gz"...
 20956 actions.install.container.9aa7   15-10-23 01:21:27 [ WARNING]: Ignoring /var/cache/univention-appcenter/opencms.ini because of logo_detail_page: Invalid format
 20956 actions.install.container.9aa7   15-10-23 01:21:29 [ WARNING]: Ignoring /var/cache/univention-appcenter/opencms.ini because of logo_detail_page: Invalid format
 20956 actions.install.container.9aa7   15-10-23 01:21:30 [    INFO]: Registering component for dudle-docker
 20956 actions.install.container.9aa7   15-10-23 01:21:30 [    INFO]: File: /etc/apt/sources.list.d/20_ucs-online-component.list
 20956 actions.install.container.9aa7   15-10-23 01:21:30 [    INFO]: 
 20956 actions.install.container.9aa7   15-10-23 01:21:32 [    INFO]: File: /etc/apt/mirror.list
 20956 actions.install.container.9aa7   15-10-23 01:21:32 [    INFO]: 
 20956 actions.install.container.9aa7   15-10-23 01:21:32 [    INFO]: File: /etc/apt/sources.list.d/15_ucs-online-version.list
 20956 actions.install.container.9aa7   15-10-23 01:21:32 [    INFO]: 
 20956 actions.install.container.9aa7   15-10-23 01:21:35 [ WARNING]: Ignoring /var/cache/univention-appcenter/opencms.ini because of logo_detail_page: Invalid format
Comment 2 Dirk Wiesenthal univentionstaff 2015-10-23 09:32:27 CEST
This may very well be due to an outdated App Center in the Container. See the name of the logger: actions.install.container.9aa7

I know that the regexp for logos has been changed recently.
Comment 3 Alexander Kläser univentionstaff 2015-10-30 17:13:55 CET
This bug can be closed now. SVG icons have been included in the app center and all existing app icons have been converted to SVG. Along with this change, the structure of the meta-inf directory has been adjusted such that each app has its own subfolder below meta-inf/4.1.

changelog:
r65024 | Bug #39525: added changelog entry

univention-appcenter (5.0.13-3):
r65016 | Bug #39525: remove exception of inheriting values from meta file
r64967 | Bug #39525: convert appcenter.css to a stylus file
r64825 | Bug #39525: CSS fine tuning
r64824 | Bug #39525: Ignore Logo and LogoDetailPage values from meta file
r64823 | Bug #39525: Fix instantiation of ConfigParser instance at AppcenterApp object
r64822 | Bug #39525: Store ConfigParser instance at AppcenterApp object
r64786 | Bug #39525: Fix sync of app logos, integrate detail page logos, fix screenshot URL
r64785 | Bug #39525: Implement handling for new meta-inf file structure
r64784 | Bug #39525: adjust dict key in index.json for app logos
r64613 | Bug #39525: Relax required condition for logos
r64594 | Bug #39525: Relax required condition for logos
r64592 | Bug #39525: Integrated SVG icons as given by 'Logo', 'LogoDetailPage'

univention-management-console-frontend (5.0.50-1):
r64592 | Bug #39525: Integrated SVG icons as given by 'Logo', 'LogoDetailPage'

repo-ng (2.0-221):
r64856 | Bug #39525: Merge changes from univention-appcenter (2)
r64787 | Bug #39525: Merge changes for new meta-inf dir structure from the package univention-appcenter
Comment 4 Alexander Kläser univentionstaff 2015-10-30 17:14:55 CET
Logo and LogoDetailPage information is now solely contained in the meta file, however, this file is not read when creating the index.json file.
Comment 5 Alexander Kläser univentionstaff 2015-10-30 17:43:27 CET
(In reply to Alexander Kläser from comment #4)
> Logo and LogoDetailPage information is now solely contained in the meta
> file, however, this file is not read when creating the index.json file.

Fixed.

univention-appcenter (5.0.13-6):
r65034 | Bug #39525: read META as well as INI file for creating index.json

repo-ng (2.0-222):
r65032 | Bug #39525: read META as well as INI file for creating index.json
Comment 6 Alexander Kläser univentionstaff 2015-10-30 17:48:35 CET
Another fix.

repo-ng (2.0-223):
r65035 | Bug #39525: read META file at the and of App.__init__()
Comment 7 Alexander Kläser univentionstaff 2015-10-30 18:26:24 CET
univention-appcenter (5.0.14-2):
r65040 | Bug #39525: ignore non-existing logos in AppcenterApp.importan_files()

repo-ng (2.0-224):
r65039 | Bug #39525: ignore non-existing logos in App.importan_files()
Comment 8 Dirk Wiesenthal univentionstaff 2015-11-05 13:29:04 CET
In python/appcenter-umc/actions/umc_update.py
  def _update_svg_file(self, app_id, suffix, src_file, filename):
    dest_file = os.path.join(FRONTEND_ICONS_DIR, 'apps-%s%s.svg' % (app_id, suffix))
    ...

Two issues here: filename is given, but not used anywhere. The value is app.logo or app.logo_detail_page. Please remove the argument.

dest_file uses app.id, not app.component_id. This may lead to situations where one upgrades an app to a newer version with a different logo, but one still sees the old logo in the App Center.

Please use component_id instead of id and copy _all_ app's logos, not just the one of the latest / installed version.

See AppManager.get_all_apps_with_id.
Comment 9 Dirk Wiesenthal univentionstaff 2015-11-05 14:01:27 CET
Also, is it possible to preload the logo_detail_page svg files in UMC? Currently I have to wait a couple of moments until I see the bigger logo. It suddenly appears when loaded.
Comment 10 Alexander Kläser univentionstaff 2015-11-05 19:34:50 CET
(In reply to Dirk Wiesenthal from comment #8)
> In python/appcenter-umc/actions/umc_update.py
>   def _update_svg_file(self, app_id, suffix, src_file, filename):
>     dest_file = os.path.join(FRONTEND_ICONS_DIR, 'apps-%s%s.svg' % (app_id,
> suffix))
>     ...
> 
> Two issues here: filename is given, but not used anywhere. The value is
> app.logo or app.logo_detail_page. Please remove the argument.
> 
> dest_file uses app.id, not app.component_id. This may lead to situations
> where one upgrades an app to a newer version with a different logo, but one
> still sees the old logo in the App Center.
> 
> Please use component_id instead of id and copy _all_ app's logos, not just
> the one of the latest / installed version.
> 
> See AppManager.get_all_apps_with_id.

Fixed. The component_id is being used now. I also replaced the properties logo and logo_detail_page with logo_name and logo_detail_page_name specifying the icon filename (if present). This helped to make the code clearer at the place where the logo is referenced. In this way, the naming scheme is settled in the App class.

I hope you are happy with this solution ;) .

univention-appcenter (5.0.17-1):
r65253 | Bug #39525: incorporate component_id into SVG icon files

(In reply to Dirk Wiesenthal from comment #9)
> Also, is it possible to preload the logo_detail_page svg files in UMC?
> Currently I have to wait a couple of moments until I see the bigger logo. It
> suddenly appears when loaded.

True... however, I would see this as a later change (→ Bug 39666).
Comment 11 Dirk Wiesenthal univentionstaff 2015-11-07 23:43:30 CET
(In reply to Alexander Kläser from comment #10)
> (In reply to Dirk Wiesenthal from comment #8)
> I hope you are happy with this solution ;) .

VERIFIABLE :)
Comment 12 Stefan Gohmann univentionstaff 2015-11-17 12:12:21 CET
UCS 4.1 has been released:
 https://docs.software-univention.de/release-notes-4.1-0-en.html
 https://docs.software-univention.de/release-notes-4.1-0-de.html

If this error occurs again, please use "Clone This Bug".