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

Get front page plugin spotlight working #116

Open
ctrueden opened this issue May 25, 2021 · 3 comments · May be fixed by #191
Open

Get front page plugin spotlight working #116

ctrueden opened this issue May 25, 2021 · 3 comments · May be fixed by #191
Assignees

Comments

@ctrueden
Copy link
Member

ctrueden commented May 25, 2021

And generate plugins.json from front matter. Or failing that, convert the plugins.json into a front matter field in index.html itself.

@ctrueden ctrueden added this to the production milestone May 25, 2021
@ctrueden ctrueden modified the milestones: production, post-production Jun 4, 2021
@ctrueden
Copy link
Member Author

My current thinking is that we don't need plugins.json; we should just make index.html include (via a Liquid for loop), all the plugins who declare themselves to be part of the carousel. Of course, we still need JavaScript to randomly select which plugin of the carousel gets displayed first for a given page load.

@mattxwang
Copy link
Collaborator

mattxwang commented Jun 21, 2021

More than happy to take a look at this since I wrote the original plugins pane for the Fiji website!

My current thinking is that we don't need plugins.json; we should just make index.html include (via a Liquid for loop), all the plugins who declare themselves to be part of the carousel. Of course, we still need JavaScript to randomly select which plugin of the carousel gets displayed first for a given page load.

I'm more than happy to try this, especially since it lets us do quite a bit of the work at build time (and we're not duplicating things, etc.). I'll investigate how much overlap we have between the two!

@mattxwang mattxwang self-assigned this Jun 21, 2021
@mattxwang
Copy link
Collaborator

Been a bit busy, but I think I can get some work done on this today. Re:

My current thinking is that we don't need plugins.json; we should just make index.html include (via a Liquid for loop), all the plugins who declare themselves to be part of the carousel. Of course, we still need JavaScript to randomly select which plugin of the carousel gets displayed first for a given page load.

I've thought about this for a bit, and I actually think our best course of action is to create a plugins.json file. Inlining it into index.html would:

  • significantly bloat the index.html's file size
  • be a larger blocker for first contentful paint
  • be larger dead weight if the user has disabled javascript

In addition, it maintains the plugins.json as an "active endpoint" that others can use to get more information about plugins, though I'm not sure if this is something that we want to support.

I think the only practical downside is a slightly longer render time as JS needs to be parsed before fetching the resource, but since the item is much lower than the fold I don't think it'll be too bad.

I'll draft a preliminary version, but switching between the two wouldn't be too tricky anyways! And of course, always free to get feedback on this proposal!

@mattxwang mattxwang linked a pull request Jul 7, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants