[Owncloud] JS degration and use custom themes

Stefan Nagtegaal development at standoutdesign.nl
Fri Mar 1 08:59:47 UTC 2013


The point to be noted is, that if you properly separate functionality (PHP) from user interface (HTML) and user experience (JS), custom themes could live longer in it's current form.

Currently Im trying to make some custom themes. To properly theme most aspects of OC, i *must* copy almost an entire app (like files/calender, etc) to my themes directory and rewrite more than 50% of the code to give it another look. Thats awfull, and directly explains why there are no themes available in the current repository other than the rediculously simple responsive-theme. (No offense though)

I could live with the fact that owncloud requires JS to be enabled in the browser. I only think that to make theming easier for non-programmers this is a step that needs to be taken.
Seperate things and make functionality rely on id,s in JS. Make the id start with "js-..." So themers know it triggers certain functionality in the js-files.
The looks of oc could be done with ids/classes, like it is now.
All the generated/build HTML inside the JS-files should be in seperate templates, which could easily be overridden by themers.

Im willing to work on this, but I need more opinions on the approach and some sort of approval for this plan.

Hope to have things cleared up a bit.

Kind regards,


Stefan Nagtegaal

-------- Oorspronkelijk bericht --------
Van: Daniel Molkentin <danimo at owncloud.com> 
Datum:  
Aan: owncloud at kde.org 
Onderwerp: Re: [Owncloud] JS degration and use custom themes 
 
While I generally agree, Bernhard, I think this misses the OPs point. 

Stefan, ownCloud is - by it's very nature - a web application. Creating well-working instant-feedback web applications without the use of JS simply is not possible. So generally, the requirement of JS is not a bug, and we will not support browsers that have JS disabled.

If however, there are special, valid use case that would make pure HTML desireble (e.g. for automation), please bring it forward, although usually this is where the REST or WebDAV-APIs are usually more useful. So what are your use cases?

Daniel

On 03/01/2013 08:29 AM, Bernhard Posselt wrote:
Yes, its your typical jQuery project. JavaScript is not the problem, the problem is like you said the often missing seperation between view and logic and that makes it at least for me incredibly hard to understand the code. 

The solution is to use a proper JS framework like AngularJS http://angularjs.org/ but this has been introduced very recently to people. Also we have too less time for too many bugs, so people dont really have the time to rewrite stuff.

Everyone who wants to improve the code/fix bugs is welcome though. Just contact the people on the IRC/mailinglist if you need help.

PS: Disabling JS is not an option.

On 03/01/2013 08:02 AM, development wrote:
Is it me or is *a lot* of owncloud 5 functionality relying heavely on Javascript, which do not degrade gracefully in browser whixh do not support or has disabled the use of Javascript?
Is this intentionally, or are these bug reports?

There is quite some HTML generated through the js-files. I can not see why this would be required to be in the JS, and not could be handled through PHP.
When we could split functionality (through PHP) and user           experience improvements (mostly js), we could support more browsers and make owncloud much easier to theme.
At the moment if someone would like to override the looks of a simple form, the JS file from the (core) app is required to be included and edited inside the theme. In my opinion this could and should be handled in another way.

If people would like some examples, Im happy to provide any..

Kind regards,


Stefan Nagtegaal


Verzonden vanaf Samsung Mobile


_______________________________________________
Owncloud mailing list
Owncloud at kde.org
https://mail.kde.org/mailman/listinfo/owncloud



_______________________________________________
Owncloud mailing list
Owncloud at kde.org
https://mail.kde.org/mailman/listinfo/owncloud


-- 
www.owncloud.com - Your Data, Your Cloud, Your Way!

ownCloud GmbH, GF: Markus Rex, Holger Dyroff
Schloßäckerstrasse 26a, 90443 Nürnberg, HRB 28050 (AG Nürnberg)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20130301/d61cb111/attachment.html>


More information about the Owncloud mailing list