-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setTimeout in TCustomAttribute causes annoying 'blink' in browser #59
Comments
@zewa666 I'd like to understand why those setTimeout calls are there too. We definitely don't want to delay things in the binding process that affect rendering since this will cause performance issues and, as mentioned above, UX problems. |
tbh I have absolutely no clue why I needed those timeouts, especially why there is a second one nested below. I remember vaguely there was some timing issue with binding, but maybe that's gone by now. Will have to check that again |
There may have been a bug in subscribing to the value property of a custom attribute early on. That was fixed though. |
ok, sounds good will try to fix it asap |
this removes the usage of timeouts inside bind, as they are not necessary any more fixes issue #59
ok seems that it works without using the timeouts. All tests passed and I couldn't find an obvious issue in my test candidates. |
This was released, if you @kaarholt still experience any issues we can reopen this again |
My view is first rendered with initial texts, then (one tick later) texts are replaced by i18n texts. This causes a visible 'jump' of content in the browser, because elements might need less or more space.
The reason is the usage of setTimeout in https://github.com/aurelia/i18n/blob/master/src/t.js line 50 and 62. QUESTION: Why are these timeouts there?
Using i18n in text-nodes instead of attributes does not have the setTimeout issue, and would of course be a solution to my problem. Extending the view with BaseI18N also solves the problem because i18n.updateTranslations is called. But it requires a lot of extra setup code for my view-models.
It would be nice if translating via html attributes worked out of the box.
The text was updated successfully, but these errors were encountered: