Where does a theme end and an app begin? - themes

We have created a portlet. We then went through some pain to move images from our portlet into a theme created for our portal vendor. I disagreed with this move, thinking that having application images within the theme overstepped the bounds of the theme. We are now having issues caused by having the images in the theme rather than the portlet. A good part of that is because of our implementation, but I believe a portion of those problems are simply because the theme shouldn't contain application images.
Having said that, if you look at themes for the firefox browser, they override the images within the action bar, like the home, back, refresh buttons. Of course, one large difference there is that firefox is an application, not a web application, but does that really make a difference in where a theme should begin and end?
I'm not a web-ui guru, and would like some input from the community on guidelines for what is appropriate in a theme and what should remain part of the web application, and why.
My initial take is that application images (those that are a part of application presentation, and would be particular to a single application) should be part of the application, and layout, color schemes, and fonts should be part of the theme. If that's the case, how can you make an application that includes application images look good in themes with vastly different color schemes?
Our environment is Liferay portal, so it could be that the image handling within themes in liferay is different than other systems, but I would be interested in examples from other systems as well.

Many things such as color and shading gradients are difficult to do without images of some kind. If the images are artifacts that make the elements of the page better looking (by providing 3D effects, for example), then they properly belong with the theme or template.
If the images are specific to a particular customer, then they are not part of the theme or template.

Related

Is the social boo theme dead in codenameone?

I've been struggling with app dialog and toolbar appearances in the social boo theme for some time. I recently discovered that my struggles are less with my code and more with the theme. In the GUI Builder switching the Native Themes from IOS6, IOS7, and Android (Gingerbread I believe) all create very different dialogs ranging from matching to illegible to ok. Also I found this demo:
https://www.codenameone.com/demos-SocialBoo.html
and ran it on my Android (S6) phone. The below image illustrates the problems:
Social Boo visualizations
Note the Dialog's appearances as they change in the first 3 images. Please note in the 3rd Android picture I'm clicking on the Cancel button to show how differently it paints with the pointer pressed. The 4th image is again from my phone, note the toolbar button on the top right with a square image placed oddly over a rectangular button. Ah finally, all the problems I'm seeing in my app happening elsewhere!
Hopefully my title question now makes more sense. Is the social boo theme being updated with CodenameOne releases or is it dead? Should I abandon using it as it'll have quite varied appearances on devices especially iOS? I'd love to have the theme maintain the IOS6 appearance on all devices - how can I achieve that goal? Thank you in advance for your help!
It's a bit out of date. Most developers just cut a PSD design from scratch which works best when based on a native theme.
You can easily fix these things if you want to work with that theme though. When we implement a theme we don't aim to implement every feature that might be needed as those are hard to predict and will increase the theme size. The original theme didn't include design for dialogs so some behaviors leaked out.
You can use theme constants and UIID's like the theme constant dlgButtonCommandUIID to determine the UIID of the buttons within the dialog.

Bigcommerce product image customization with text change

Currently I am trying to build such customization of product in Bigcommerce Storefront that allows to display image with dynamic text, which was entered in Textbox. That means product image preview should be shown INSTANTLY with new image with written text.
so that the end user will know how the final product will looks like and also same image should go in shopping cart as well.
I know that there is an app on Shopify named as Product Builder.
Is this possible to do it on Bigcommerce?
Thanks in Advance
It's definitely possible with some fairly advanced client-side code. Unfortunately I don't know of any plug and play systems or apps for Bigcommerce that will achieve what you're looking for, but there are a couple ways to get a live updating product preview if you're willing to get your hands dirty.
Here's an example from my site. Click the button under "personalize this item", and you'll see a live preview image like you describe in the modal. Enter some text and change the monogram style and color, the preview image should update pretty quickly every time you change an option. A solution exactly like mine may not be feasible for you, since that site is using a pretty complex React/Redux implementation built on an extensively customized Stencil theme... it's far from a turnkey solution. That said, you could implement something similar without needing a totally custom app.
The image preview itself in the example above is powered by IMGIX.com. They offer a great service at a fantastic price. Basically my system translates the user-selected Bigcommerce option into a URL string per IMGIX's URL-based API. Displaying the live preview is then as simple as changing the image's src attribute to the corresponding IMGIX URL on every input change. I do this in a React component that consumes a Redux store, but something similar could definitely be done in the framework of your choice, or plain old vanilla JavaScript. Cloudinary offers a similar (maybe even a little bigger) feature set to IMGIX, but I found IMGIX to be a bit faster, and the pricing was considerably less for my usage.
You could also write something that uses the HTML5 canvas to overlay text and effects on an image, and thereby avoid using a third-party service. I found such a solution to be way more work and way more taxing on the client-side device, but it'd definitely be another way to skin the proverbial cat.
There may be other viable solutions out there, but the above has been my experience in implementing something similar to what you're looking for on Bigcommerce. I hope this is helpful!

Window Manager Themes and X11

In some WMs it is possible to choose theme which affects how windows are displayed, e.g. how a background of a button is coloured.
If I draw a window using bare Xlib calls, what should I do to conform to these theme-affected settings? I.e. am I supposed to write specific code for every possible WM? How is it resolved in general?
There are several theme types and they sometimes play together, but they should not be confused.
Window manager/border themes describe the decorations of each window, not the content
UI toolkit themes/widget themes describe how buttons, text fields etc. are drawn within a window
Icon themes describe which icons are used, covering application icons as well as file icons, action icons, toolbar icons etc.
Color themes define a palette of colors to be used within the framework of the other themes
Pointer themes define a set of mouse pointer icons
Some desktop environments bundle all these themes in "desktop" themes, or at least provide a frontend to choose all of them. Yet, these themes are independent from the desktop environment and also from each other. It is possible to set them using configuration files.
If you want your application to fit with the user's preferences, first of all you should adhere to the Icon theme. The Pointer theme is taken care of by the X server, as long as you only use stock mouse icons and don't upload your own to the X server.
The second obvious thing would be the Color theme, but unfortunately there is no standard for color themes, both Gtk+ and Qt frameworks provide this functionality in an independent fashion (and desktop theme configurators understand and manipulate both to provide consistency). You could do some magic to find out whether the user prefers Gtk+ colors or Qt colors (e.g., is running Gnome or KDE) and then extract the colors somewhat from there.
The hardest thing however is to provide a look and feel of your UI elements that is true to the UI toolkit theme(s) the user has chosen. First you would again have to decide between Gtk+ and Qt (other toolkits that are themeable exist as well, but are typically not themed by the user, or niche players like Enlightenment). Then you would have to re-implement the same functionality. Interestingly, many themes come with their own theme engine in Gtk+, and it is possible to let the theme engine do the work for you. An approach that was picked-up by several parties already. Examples:
Java Swing supports mimicing Gtk+ applications by implementing the Gtk+ themeing API and letting the Gtk+ theme engines do the work, works with some inconsistencies.
Firefox and other Mozilla Apps using XUL also do this, but there are always annoying differences, starting with the default font size.
Qt itself has a compatibility Gtk+ theme, that basically does the same; this one works pretty well.
My suggestion is to not reinvent the wheel, instead use Qt (or Gtk+ if you prefer) for GUI elements that go beyond basic drawing operations. Note that from my experience, even primitive drawing is typically better done with Qt than with Xlib.
The user gets the look&feel she expects (not only the look), the interface is rich and stable, and you save considerable time writing all this stuff.

How to avoid theme (lite&dark) efects on windows phone applications?

I developed one Windows Phone 7 application.
After installed the app to my mobile device (in emulator too) I'm experiencing the theme problem.
Means there are two themes in windows phone, LITE and DARK.
When I set my theme to dark and execute my app , it looks OK,
but if I change the theme to LITE everything is reverted.
It means white lables become black, and black background become white.
So I need a solution to my app, so that the user can set any theme, but it doesn't effect the appearrence of application.
Don't hardcode colours, brushes, etc, but instead use {StaticResource ResourceName} and use resources from Theme Resources for Windows Phone
Make sure that every TextBlock and TextBox has a Style associated with it (available values from the same link)
If you have have custom resources (colours, images, etc) that you wish to be theme-aware you are free to use the ThemeResourceDictionary I posted on my blog (and also for this SO question). I promise to commit the code to GitHub one of these days and also create a NuGet package.

What is the best option for creating an in-browser UI-editor?

I want to create an simple UI-editor that can be used within the browser. It basically should have a UI-control palette and a canvas to layout and modify the controls. The resulting user-created UI model should be stored in some kind of backend and comply to an (abstract) UI description language (e.g. XForms). The UI-model should be downloadable as file (e.g. XForms document). A visual in-browser XForms-designer is probably a good example of what I want to achieve. The UI-editor should be usable cross browser.
Please keep in mind that i mentioned XForms only as an example. I don't want to rely on the browsers capabilities wrt. my target model. The target model (e.g. XForms) should only be used as storage format. The cross browser rendering of the desgin-time UIs in the editor should be ensured by the toolkit/framework.
Possible canditates are probably:
GWT
Adobe Flex 3
Eclipse RAP
The UI-editor will not be used in production. My focus lies on a rapid development of the editor.
The extjs JavaScript library is good for implementing GUIs in JavaScript. It can also be used with Adobe AIR or Google Gears for creating offline applications, and works well with different browsers.
Here is an example of a GUI editor for extjs: http://tof2k.com/ext/formbuilder/

Resources