| Summary: | Default theme modifications severely affect consumer themes | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Austin Riddle <austin.riddle> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ivan, mseashore, ronald.so, tbuschto |
| Version: | 1.5 | ||
| Target Milestone: | 1.5 M5 | ||
| Hardware: | All | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Austin Riddle
In fact, a custom theme *does* replace the default theme. However, for properties missing in the custom theme, the default theme is still used as a fallback. I understand that this silent fallback causes the problem described here. It's hard to identify exactly which properties are taken from the default theme. The theming _needs_ some value for every property, therefore I think there has to be some kind of fallback. But maybe the issue here is that our default theme does much more than providing a fallback. Here's my suggestion: 1) We provide a built-in fallback theme without any graphical effects. It only provides meaningful defaults for all properties. With this change, it's less likely that a fallback screws up a custom theme. 2) We generate some kind of warning in development mode if a custom theme misses some properties. This makes it easier to identify holes in a custom theme. What do you think? I think having "neutral" fallback values is the way to go. Not sure we still need the warning if we have that. We could use this "neutral" fallback for execution of server-side tests as well. (In reply to comment #3) > We could use this "neutral" fallback for execution of server-side tests as > well. Client-side also! (In reply to comment #1) > Here's my suggestion: > 1) We provide a built-in fallback theme without any graphical effects. It only > provides meaningful defaults for all properties. With this change, it's less > likely that a fallback screws up a custom theme. > > 2) We generate some kind of warning in development mode if a custom theme > misses some properties. This makes it easier to identify holes in a custom > theme. > I also like the idea of a more neutral fallback. And I do think we need some simple way to determine if your custom theme is not completely overriding the default fallback. There are 2 use cases: partial and complete override of the default theme. The complication here is that in the partial case you don't want warnings showing up. In the complete case you do indeed want to know. Could we support both? Or should we just say that custom themes always should override the default or you will get a warning? I implemented warnings for incomplete themes in bug 254478. For now, these warnings have to be enabled by setting the system property "org.eclipse.rap.enableThemeWarnings" to "true". They will only be issued in development (debug) mode. (In reply to comment #6) > I implemented warnings for incomplete themes in bug 254478. For now, these > warnings have to be enabled by setting the system property > "org.eclipse.rap.enableThemeWarnings" to "true". They will only be issued in > development (debug) mode. Looks good to me. Introduced fall-back theme - based on *.default.css (we decided to keep the name of the files). The default theme is now located in "org.eclipse.rap.rwt\resources\resource\theme\default.css". Client and server tests are executed against fall-back theme. Next step is to reduce the fall-back theme - remove unnecessary definitions. Reduced the fall-back theme. With this change default theme modifications do not affect consumer themes anymore. Changes are in CVS. |