owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.35k stars 2.06k forks source link

Loading dialogues and Translations via AJAX causes bad user experience #163

Closed BernhardPosselt closed 9 years ago

BernhardPosselt commented 11 years ago

Loading translations and dialogues from the server via AJAX can take really long. If the user is not presented with feedback that something is loading, he'll click again after one second. I also think its really annyoing to have to wait, especially in the calendar

Solution:

Include dialogues in the HTML but mark them display: none. If you want to open the dialogue just set it to display: block

As for translation: Provide a hidden div with all translated sentences that can be read out via JavaScript.

jancborchardt commented 11 years ago

Was this discussed or are there more news on this?

BernhardPosselt commented 11 years ago

I think this wasn't discussed yet. I talked to georg about this but I don't know the progress.

Btw, a second solution would be to provide this thing as a file with JavaScript variables, for instance:

OC.trans = {'I wasnt sure': "<?php p($l->trans('I wasn't sure'))" };
jancborchardt commented 11 years ago

Do you want to lead the discussion and/or take this on?

BernhardPosselt commented 11 years ago

Seems like too much work, I'm already working on the docs, apptemplate_advanced, news app and Google Code-In.

It would be great if the original author of the translation thing could take this up.

jancborchardt commented 11 years ago

So what’s the resolution on this? cc @DeepDiver1975 @VicDeo @bantu @ringmaster what’s your call?

DeepDiver1975 commented 11 years ago

Regarding dialogs: afaik this was mainly done the described way in calendar - no idea on the current status. Regarding translations: we can have a look at this @ringmaster you are my new translation dev :wink: Wana have a look? THX

PVince81 commented 10 years ago

Not only this, it also hangs Chrome in some cases. See this painful bug: #4545

Can we schedule this for OC7 maybe ?

Maybe we can somehow generate a JSON bundle with all texts from the current app in it. Every app brings their own bundle. So t() just needs to access the bundle in global scope.

Not sure yet how to generate it, need to dive into the code first.

PVince81 commented 10 years ago

Setting to OC7.

The minimum implementation would preload all needed bundles and pre-cache them in the cache used by t(). The main goal is to prevent having synchronous ajax calls in the first place.

jancborchardt commented 10 years ago

What’s the current state of this by the way? Do we still need it? Or is someone working on it?

PVince81 commented 10 years ago

Not possible short term. Needs architectural changes.

PVince81 commented 9 years ago

Concept in progress here: https://github.com/owncloud/core/issues/11532

jancborchardt commented 9 years ago

Closing as fixed by https://github.com/owncloud/core/pull/11638