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

Custom dynamic home pages via React components #4081

Open
lukebarnard1 opened this issue May 30, 2017 · 6 comments
Open

Custom dynamic home pages via React components #4081

lukebarnard1 opened this issue May 30, 2017 · 6 comments
Labels
P4 [OBSOLETE LABEL] Interesting — Not yet scheduled, will accept patches T-Enhancement

Comments

@lukebarnard1
Copy link
Contributor

A dynamic (React as opposed to HTML in iFrame) home page would allow for a much simpler implementation of an icon to start a chat with welcomeUserId (@RiotBot).

  • Use profile API to determine if we can access the user (solves the question of "what if their HS isn't federated with the bot user?"
  • Dynamically show the icon depending on the success of getting the profile of the user
  • Clicking the button could open any existing DM with RiotBot if there is only 1 or show the ChatCreateOrReuseDialog if there are > 1 or just create a new DM if there are 0 DMs.
@ara4n
Copy link
Member

ara4n commented May 30, 2017

i've remembered that one of my big concerns about the dynamic home page is that i suspect that people will want to edit the HTML of the landing page without building their own Riots.

So i'm actually back considering doing some basic templating on the static page in order to i18nize it - and we'll lose the niceness proposed here :/

@lukebarnard1
Copy link
Contributor Author

I totally forgot to mention that the welcomePageUrl can override the dynamic page, so you wouldn't lose that even if that default page was dynamic.

@ara4n
Copy link
Member

ara4n commented May 31, 2017

thing is that people will want to tweak the default template

@lampholder lampholder added feature P4 [OBSOLETE LABEL] Interesting — Not yet scheduled, will accept patches labels May 31, 2017
@lampholder
Copy link
Member

There seems to be something about this issue that is somehow weirdly complicated to think about, so I'll put my latest understanding here.

To run one's own welcome page post ILAG, admins will have to specify a custom URL in the config file which will require them to run their own instance of Riot. There is currently no other way to specify a custom welcome page.

Therefore, admins who just want to tweak what we have will need their own instance of Riot deployed, so the difference between their manipulating a static HTML page (with some i18n templating) and a dynamic react component is little more than the difference in their technical comfort level with each task.

However, there is a realistic use case where admins want to run their own welcome page by pointing their Riot welcomePageUrl config at an external site; perhaps one already managed through WordPress or some such. Our providing an iframe into which they can configurably drop their own page does have utility to these people.

@lampholder
Copy link
Member

All that said, our current thinking is that a dynamic home page will not be part of ILAG, so I'm going to explicitly remove it from this project (and modify the issue name accordingly).

@lampholder lampholder changed the title ILAG: Dynamic Home Page Dynamic Home Page Jun 1, 2017
@ara4n
Copy link
Member

ara4n commented Oct 15, 2017

So far I've seen it be repeatedly useful that the homepage can be tweaked without forking Riot (e.g. for various cryptocurrency Riot deployments). If folks want more sophisticated custom functionality they'll have to fork Riot anyway, at which point they are welcome to replace HomePage with a React component rather than injecting home.html. I don't think we need to proactively do this for them.

@ara4n ara4n removed their assignment Oct 15, 2017
@ara4n ara4n changed the title Dynamic Home Page Custom dynamic home pages via React components Oct 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 [OBSOLETE LABEL] Interesting — Not yet scheduled, will accept patches T-Enhancement
Projects
None yet
Development

No branches or pull requests

4 participants