-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
feat: Extensions/Projects page on the Gate Website #424
Conversation
wip, still testing pages worker
had functions in the wrong folder i believe
Automatically adjusts page title to Extensions or Minekube Libraries based on the current search mode being used.
I just pushed the feature to automatically update the webpage title based on what search mode is being used so technically I think the current wanted features are done. I also wanted to see opinions on if it should be added to the homepage with a button next to quick start and a new nav link on the header. I attached a picture showing how it looks currently with it added to both places. |
Added the ability to show cached data in the browsers localstorage if the API is down/unable to be reached. If no cached data is found message shown is "Error reaching the API. To see updated results, please try again later. " If cached data is found, it is shown and a message saying "Warning: Showing locally cached results. To see updated results, please try again later. " is shown above the results.
Forgot to check for browser env when using localstorage since it breaks yarn build.
cached message was showing due to us using cached data on second refresh to reduce api calls, we should only show the cached data message if we are using it as fallback due to api being unreachable
i wish I could test this without commiting lol
bro took a small amount of inspiration from the minestom website |
@oglassdev Haha yeah, their page fit really well with what I wanted so I tried to remake it. This was my first time using vitepress so it helped to have something to bounce off of when working on it. I want to try and experiment with other designs soon though and see if anything would work better since the Minekube Libraries page might get cluttered as the libraries get used more and more. If you have any ideas feel free to lmk and I’ll try and work on them (: |
Exciting! It is much better than the initial requirements! |
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.
Looking good!
minor future improvements:
- ui: make the search consider both the repo description in addition to the name
- ui: display the two search modes switches to visible
- code: extract duplicate code into a shared js file imported by both extensions.js and go-modules.js
This PR adds an Extensions/Projects page to the Gate Website. This would allow users to add their own Plugins/Extensions for Gate to the Gate website by adding the topic gate-extension to their repo! This also allows users to see what projects are importing Minekube Libraries in their go.mod file.
All API work is done through Cloudflare Pages functions, and we currently cache all repo's locally in browser and also a KV in Cloudflare to stay within GitHub's API and Cloudflare's limits.
I still have some small things to change (like the url title) but this is technically ready to merge whenever it has been checked over and the required changes to the Cloudflare Pages deployment settings have been added. Sorry for the low commits btw, most of the work was done locally :)
Pictures: