Ok most of it will be done in:
https://github.com/discourse/discourse/pull/7114
Will merge tomorrow morning.