-
Notifications
You must be signed in to change notification settings - Fork 309
Add a funding page that lists Project members with GitHub Sponsors #2237
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
Conversation
|
Rebased. |
senekor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good. I don't like the handling of the custom script though. This is basically adding a hook where every page can inject it's custom javascript, right? Why not just write it inline inside the "page" block? I checked if there's a precedent for this. tools-install.js is another custom script that only applies to one page. But it seems to me that's handled in a complicated way too... it get's another generated name "vendor_<random_num>.js". I can't see a reason why this is done. I would prefer if we put all scripts in static/scripts/ and reference them explicitly with the same name as the source file in HTML templates. What do you think?
|
And once this is merged, I imagine it would be appropriate to make a post on the inside-rust blog to let contributors know they can add themselves to this list. |
The main reason why I added the script section is because when I added the script to the end of the I'm fine with adding the logic into an external file, although it makes the logic a bit more distributed. When it's in the same file, it's easier to see that you should update the script when the HTML IDs/classes change, for example. |
I wanted to leverage the new Project Zulip channel that we should have hopefully soon (rust-lang/team#1969) to let people know, but a blog a post would also work, yeah. I first wanted to have something to show for it, to motivate people to add it, when they see this new page. |
You could sqeeze it inside the
Why?
Fair. In that case, we should inline the |
When JS is encountered in the middle of the page, it will block the processing of further page contents until the JS is parsed and processed. Granted, here it probably doesn't matter at all, as the script is tiny and uses Anyway, no problem with keeping it before the end of the section. Wrapping it in a
Good question. I think there are two counter-arguments to that, in theory:
So yeah, if you want, I can inline the |
|
I think I prefer the script in a separate file in And as you said about The part about being careful to update IDs that are referenced in different files is true, but it comes with the territory of web stuff. And we already have many different html.hbs, css, and js files, so that train has kinda sailed. Contributors and reviewers just have to grep the entire repo when changing a static string, there's no way around that. |
|
Could it be that the generated name for the |
I agree, we should do this. |
Yup, pretty sure that's the reason. Created a separate JS script for the funding page. I also removed the "app" JS file, since I think that it doesn't make sense to combine the funding JS (as the scripts might not be self-contained and shouldn't run on arbitrary pages) and the tools installation JS, and instead created a separate JS file for both. |
This PR adds a dedicated Funding page that lists all active Project members that have GitHub Sponsors enabled and have opted into it being publicized through
team. The order of people is randomized using JavaScript on every page load, to reduce ordering bias.Maybe we could even add a dedicated "Funding" link in the top-level navbar?