ManimCommunity / ManimCommunity/manim
Adding a Manim Showcase for Community Work
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
Over the last few weeks, I have been working on a showcase for Manim.
# Use Cases
* Enables new users to see what Manim is capable of and used for
* Gives existing users a place to show off what they have made in Manim
* Creates a centralized place where teachers, learners, and Manim users can search for (hopefully) high quality videos explaining a certain topic
* In many cases, it can help Manim users. If source is provided (optional), it will be linked along with the uploaded video. This enables anyone to see how a certain animation can be achieved
# Current State of the Showcase
The Manim Showcase is fully functional as of now. An unofficial version [can be viewed here.](https://wampycakes.github.io/temp-manim-projects/) There is currently one sample video supplied by a community member to show how it looks. To be clear, this is not the finished end goal. It is just about ready to go live with the minimum features required to do so. There are a few other big features missing that can and are planned to be implemented later such as searching videos.
# Features
These are the main points of the Showcase to provide an insight into how it works. Much time has been invested into smaller parts of the website as well outside of these main points to create a consistent and smooth experience.
* Lists all approved videos from a JSON file. Entries in the JSON file are read as needed using Lazy.js. Entries in the file have also been stringified without tabs and as an array to remove the need for repetitive key values. My testing shows this reduces the size of the JSON file by roughly 90%. In other words, it will allow almost double the amount of videos to be included in one file and reduce page load time. I *think* this should be able to accomodate several hundred thousands videos before hitting the GitHub file size limit of 100 MB. If Lazy.js does not work as well as expected once we have thousands of videos on there, it may be necessary to move to a database or some other kind of storage. However, I do not foresee any need to move away from the current approach until wellll into the future.
* Has a functioning page system that enables once a certain number of videos are uploaded (currently set to 10 per page, very easy to change)
* Utilizes a form to submit videos (protected by an unobtrusive captcha)
* Is completely free (hosted on GitHub pages, small backend for form handling on a Cloudflare Worker - 100K free form submissions per day)
* Has an approval process in place to prevent someone from spamming their video straight onto the website or uploading inappropriate/irrelevant videos. Approving a video is as easy as adding a label to an issue and closing it.
* Once a video has been submitted or approved, it can be edited by repository maintainers
# Moving Forward
If this seems generally acceptable to the community, the next step would be to transfer it to be an official part of the ManimCommunity organization. Here's what this will entail:
* It will need added to the manim.community domain @behackl
* I will need to DM you @eulertour regarding a token for the backend or what route that should go. I will explain later.
* I will put the code on a fresh repository (because of numerous variations of testing, the current repo is extraordinarly messy with branches, deleted issues, actions, etc.)
* I will then be able to change some parameters in the code and GitHub workflows for the new branch, domain, etc.
* We need a few other people who would be willing to help approve videos. This does not need to be a big time commitment. For one, the approval process is extremely short and will be detailed below. Secondly, there is no one dictating that there can never be a slight backlog of videos to be approved (if this even happens). @naveen521kk and (I can't mention him on here) Myssa, you both showed interest in creating a showcase before. Would either of you be willing to help with this process?
* After all is settled, it should probably be linked to from the top of the docs Example Gallery. Additionally, an announcement on Discord and/or Reddit alerting people that they can submit all their work they've already done would be great!
## Approval Process
[Here is a sample of what a submission looks like.](https://github.com/WampyCakes/temp-manim-projects/issues/180) I envision the approval process to look like this:
* Confirm that the video is created in Manim and appropriate. I do not plan on watching all of what is submitted. That would be insane.
* Check the values such as description, tags, etc. and determine if they are acceptable. For example, if it is a calculus related video, Calculus should probably be one of the subfields. Titles shouldn't be clickbaity; they should be descriptive of subject matter. This will come in later when searching, sorting, and filtering videos is hopefully added.
* If everything looks good, add the "submission approved" label and close the issue. This will trigger an automatic process that takes care of the rest.
* If everything is NOT good, there are a few options. If the video has a snowball's chance in hell of being accepted, add the "submission rejected" label and close the issue. If it is blatantly inappropriate, delete the issue or request that it be deleted by someone with permission to do so. If it only needs a slight tweak in the information provided, go ahead and do it if it is an obvious change. Then approve the submission. If changing the title or author values, it should also be updated in the name of the issue. If a change is needed but what it should be changed to is not obvious, add the label "changes requested." This signals that the person who submitted the video must provide the necessary changes (what needs changed should be stated in a comment). Whatever they comment to be the changed values, a repo maintainer would have to edit the original post and update the values. If after a sufficiently long time, no response is given, close the issue. It's their loss.
# Questions to be addressed
* @behackl Can you confirm that I did the meta and icon information correctly? I tried to closely resemble what you did [here.](https://github.com/ManimCommunity/manim-website/blob/main/index.html) Mine is located [here](https://github.com/WampyCakes/temp-manim-projects/blob/new-main/public/index.html). I can confirm that while the paths for the icons are different, the paths are correct. The icons [are located here](https://github.com/WampyCakes/temp-manim-projects/tree/new-main/public). I just copied the ones you had (ignore favicon2).
* @naveen521kk or anyone else with knowledge of CDNs, is this appropriate? I created a [folder called CDN here](https://github.com/WampyCakes/temp-manim-projects/tree/new-main/cdn) to house fonts and pictures. The fonts stuff only contains the FontAwesome icons necessary for the header (to minimize size and replicate the icons used on other parts of the Manim website). The pictures are used in the captcha. These are accessed through jsDelivr's GitHub CDN. Is it preferable to do this or just include these fonts and images in the website assets? It would seem this should be faster by reducing asset size (and increasing load speed of these assets? not sure). If this is good, should the same be done for website icons?
* When first designing this showcase, I tried to think through all the information that should be necessary to submit a video. I decided on what I think is a good balance of information to give context, links to more, and fields, subfields, and tags to filter content by without being excessive. Until the other day, I never thought to include a field about what language the video is made in. For example, I believe I have been seeing a lot of German manim videos lately. It will no doubt be helpful to include a selection for language to filter for a certain language or exclude certain languages from results. The question is this: How should this be implemented? A dropdown of languages seems most feasible to me. Is anyone able to help with compiling a list languages for a dropdown? Not too sure what to do in this department and it seems like it is going to be the delaying factor in the Showcase going live.
# What should *not* be discussed here
* Stylistic nitpicking. This does not pertain to whether the showcase should be added. I agree that the styling of video titles is ugly. Ideas on how that can be improved are welcome, but not particularly relevant here.
* Any other nitpicking that does not pertain whether the showcase should be added. While welcome at a later point, not important right now.
Contributor guide
Research direction
Start by reviewing the linked prototype, especially public/index.html and the cdn folder, along with the sample submission workflow. Confirm the requirements for moving the showcase into the ManimCommunity organization, including the manim.community domain, backend token, repository and workflow changes, approval roles, and language filtering. Done means the community has agreed on the scope and an official deployment plan.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- content, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100