Bug 491556 - [Welcome] Provide theme-specific mechanism to influence path resolution
Summary: [Welcome] Provide theme-specific mechanism to influence path resolution
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 4.6   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.6 RC1   Edit
Assignee: Brian de Alwis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-12 22:24 EDT by Brian de Alwis CLA
Modified: 2016-05-23 08:52 EDT (History)
3 users (show)

See Also:
daniel_megert: pmc_approved+
psuzzi: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian de Alwis CLA 2016-04-12 22:24:57 EDT
As part of defining a Solstice-style Welcome/Intro theme (bug 466370), I found that the stock product logo 'intro-eclipse.png', specified via the introBrandingImage product property, does not fit the Solstice theme style.  This logo is included in the Platform, SDK, and EPP products.  My approach was to provide an alternative logo  (intro-eclipse-bw.png) and change the introBrandingImage property accordingly.  But then the other themes look terrible.

We need a way for themes to influence how an image is resolved.
Comment 1 Brian de Alwis CLA 2016-04-12 22:33:46 EDT
https://git.eclipse.org/r/70362

Adds support for resolving theme-specific files via a prefix defined using the 'filePrefix' theme property.  When resolving a file path, the Intro first checks for a file with the filePrefix applied to the file component.

Adds file prefixes for each of our defined themes.

So the Platform and SDK products can now include a 'solstice-intro-eclipse.png' file for a Solstice-specific Eclipse logo.
Comment 2 Brian de Alwis CLA 2016-04-14 10:32:01 EDT
This change adds a new theme property for Welcome/Intro themes called “filePrefix” used to resolve theme-dependent variants of images that are referenced by the theme.  This only affects files specified as product-properties, such as the branding logo.  The filePrefix causes the Intro code to first resolve images with the given prefix and then fallback to the path as-is.  For example, the Solstice theme defines (simplified; full details in patch):

	<theme id=“org.eclipse.ui.intro.universal.solstice">
        	<property name=“filePrefix” value=“solstice-“ />
		…
	</theme>

The Platform and SDK products specify their branding logo like:

	 <property name=“introBrandingImage” value=“product:intro-eclipse.png” />

When resolving the introBrandingImage, the code will now first try resolving ’solstice-intro-eclipse.png’ from the product bundle.  If not found, it will fallback to ‘intro-eclipse.png’.  If a directory is specified (e.g., ‘product:logos/eclipse.png’) then the prefix is applied to the file portion (‘logos/solstice-eclipse.png’).

Without this change, product definitions have to explicitly reference a more Solstice-friendly logo.  But then the other themes don’t look as intended. [Though to be honest, I think they all look better with the white logo.]
Comment 3 Dani Megert CLA 2016-04-19 12:21:16 EDT
(In reply to Brian de Alwis from comment #2)
> [Though to be honest, I think they all look better with the white logo.]

No, it did not look good and it also did not fit properly. I currently don't have a Linux box at hand to attach a screenshot.
Comment 4 Dani Megert CLA 2016-04-19 12:56:01 EDT
(In reply to Brian de Alwis from comment #1)
> https://git.eclipse.org/r/70362
> 
> Adds support for resolving theme-specific files via a prefix defined using
> the 'filePrefix' theme property.  When resolving a file path, the Intro
> first checks for a file with the filePrefix applied to the file component.
> 
> Adds file prefixes for each of our defined themes.
> 
> So the Platform and SDK products can now include a
> 'solstice-intro-eclipse.png' file for a Solstice-specific Eclipse logo.

Please see the discussion on the PMC mailing list.
Comment 5 Eclipse Genie CLA 2016-04-19 23:32:27 EDT
New Gerrit change created: https://git.eclipse.org/r/71025
Comment 7 Eclipse Genie CLA 2016-04-21 10:22:17 EDT
New Gerrit change created: https://git.eclipse.org/r/71148
Comment 8 Ed Merks CLA 2016-05-07 05:07:10 EDT
I believe these changes resulted in a regression as described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=487713
Comment 9 Brian de Alwis CLA 2016-05-07 22:51:30 EDT
The return value of UniversalIntroConfigurer#resolveVariable() has changed when a file reference is not found, as identified in bug 487713 comment 11.
Comment 10 Eclipse Genie CLA 2016-05-07 22:55:00 EDT
New Gerrit change created: https://git.eclipse.org/r/72229
Comment 11 Brian de Alwis CLA 2016-05-07 22:57:10 EDT
Patrik, would you be able to review the patch at https://git.eclipse.org/r/72229?
Comment 13 Brian de Alwis CLA 2016-05-10 14:59:42 EDT
Fixed for RC1.  Leaving open as still have some doc pending.
Comment 14 Dani Megert CLA 2016-05-12 06:24:26 EDT
(In reply to Brian de Alwis from comment #13)
> Fixed for RC1.  Leaving open as still have some doc pending.

Please open a separate bug for the doc.
Comment 15 Brian de Alwis CLA 2016-05-20 10:32:22 EDT
Verified in 4.6.0.I20160519-1730.