spark
spark copied to clipboard
feat: Add support for gists
This time I've tested everything is working :-) (shame on me for #6)
This PR will add support for gist stargazers e.g. https://stars.medv.io/qoomon/gist:5dfcdf8eec66a051ecd85625518cfd13.svg
render.js- add gist support
api.js- move
rateLimitin graphQL queries (render.js) toapi.jsby reading limits from response header (recommended way by GitHub API docs) - replace
r2package withnode-fetchpackage
- move
svg.js- refactor parameter to array of
Dateobjects instead of epoch timestamp
- refactor parameter to array of
Please deploy your version, so I can test my self
Where should I deploy? Or just anywhere?
Just anywhere
feel free to test http://ec2-3-72-47-194.eu-central-1.compute.amazonaws.com
Looks stuck at http://ec2-3-72-47-194.eu-central-1.compute.amazonaws.com/
Also I don't like hot a title for gists are shown .
Maybe we should have a separate url for gists? gist.stars.medv.io?
You have used a wrong url pattern you need to use it like this <baseUrl>/<owner>/gist:<gistHash>
e.g. http://ec2-3-72-47-194.eu-central-1.compute.amazonaws.com/qoomon/gist:5dfcdf8eec66a051ecd85625518cfd13
This is my point. This is very unintuitive what this sort support gists as well. So we can somehow highlight this in ui. Or maybe deploy at a separate url and name it Gist Sparklines?
Or what about following convention?
<baseUrl>/<owner>/<repoName><baseUrl>/gist/<owner>/<gistHash>- or back to the initial idea
<baseUrl>/gist:<owner>/<gistHash>
I thinks repos(files and directories repos) and gist (file only repos) are so alike that is seems odd to have two deployments for that
At least every thing is now working as expected, I fixed all issues.
I've deployed a version with the initial url pattern <baseUrl>/gist:<owner>/<gistHash>
see http://ec2-3-72-47-194.eu-central-1.compute.amazonaws.com/gist:qoomon/5dfcdf8eec66a051ecd85625518cfd13
I think this is the most appealing variant
Super! Now it looks more cool.
One more thing. Lets get name of the gist from GraphQL api.
And use it here:
How difficult it will be to implement?
Unfortunately it would be a complete refactoring.
The header always shows the name of the first file (even if there a multiple files in one gist)
And just an extra note
I mean we can still use sha1, but only display name in the title. This will require saving gist names locally?
I'd suggest that we release this version first, and then we add the gist display name later.
This will require saving gist names locally?
Yes that would be one option.
Another option would be to call fetch('https://api.github.com/gists/<gistHash>') and resolve name on the fly
I've implemented the gist display name, see http://ec2-3-72-47-194.eu-central-1.compute.amazonaws.com/gist:qoomon/5dfcdf8eec66a051ecd85625518cfd13
WDYT?
@antonmedv can we merge it so I can stop my instance again?
Will try to take a look tonight and deploy.
@antonmedv do you still need the server? I'd like to shut it down.
No, you can shut it down.
cool, looking forward to the merge and release
@antonmedv can you estimate when you will merge this feature?
Sometime soon?... There is no SLO, so you get it -)))
👀
🥺
Still didn’t find any time. Will try tonight.
Is there any rough estimation of a release date?
Can I support to get this PR to be merged?