Skip to content
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

Enable support for custom HTML in riot-web homepage #55

Merged
merged 1 commit into from
Dec 12, 2018

Conversation

anadahz
Copy link
Contributor

@anadahz anadahz commented Dec 8, 2018

  • Add default template file for homepage HTML
  • Add default riot-web config options for homepage

@spantaleev
Copy link
Owner

Calling the variable something like matrix_riot_web_homepage_template (instead of matrix_riot_web_config) is probably better.

I also wonder whether using and maintaining our own copy of riot-web's home.html is something we want to take on. It seems like something that may easily get out of date.

On the other hand it's nice we can point it to our own "Riot Bot" (or rather, not show that at all).
We may also be able to inject an additional item in the "Running Matrix services" list, which points to the support channel for this playbook (#matrix-docker-ansible-deploy:devture.com).

So maybe it's worth going to the trouble and doing it..

@anadahz
Copy link
Contributor Author

anadahz commented Dec 10, 2018

Calling the variable something like matrix_riot_web_homepage_template (instead of matrix_riot_web_config) is probably better.

Indeed it makes more sense to use this variable instead, I changed the variables accordingly.

I also wonder whether using and maintaining our own copy of riot-web's home.html is something we want to take on. It seems like something that may easily get out of date.

According to the commits history of home.html it seems that is not getting updated so often.

On the other hand it's nice we can point it to our own "Riot Bot" (or rather, not show that at all).

This is being handled by the variable matrix_riot_web_welcome_user_id if it's undefined the bot section will not be displayed.

We may also be able to inject an additional item in the "Running Matrix services" list, which points to the support channel for this playbook (#matrix-docker-ansible-deploy:devture.com).

Good point added the support channel of this playbook.

Copy link
Owner

@spantaleev spantaleev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've found a few more things that should be changed before we can merge this.

roles/matrix-server/tasks/setup/setup_riot_web.yml Outdated Show resolved Hide resolved
roles/matrix-server/templates/riot-web/home.html.j2 Outdated Show resolved Hide resolved
@spantaleev
Copy link
Owner

Thanks for your work on this!

I've submitted a few minor things to be tested/corrected and let's merge this!

* Add default template file for homepage HTML
* Add default riot-web config options for homepage
@anadahz
Copy link
Contributor Author

anadahz commented Dec 11, 2018

Ready for review.

@spantaleev spantaleev merged commit ed2ae4b into spantaleev:master Dec 12, 2018
spantaleev added a commit that referenced this pull request Dec 12, 2018
@spantaleev
Copy link
Owner

I've merged this and it seems to work!

I've only had to remove the _t() (translation) call for our custom button.
Otherwise the "Support for Matrix Docker Ansible role" label was being prefixed by some other "missing translation" label. Maybe this only happened when another locale was used (besides the default "en"), but..

Thank you for your work on this! 👍

@anadahz
Copy link
Contributor Author

anadahz commented Dec 12, 2018

I've only had to remove the _t() (translation) call for our custom button.

Good catch, thanks!

@anadahz anadahz deleted the feature/custom-riot-home branch December 12, 2018 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants