Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Francesco Menghi
Francesco Menghi

Posted on

     

Adding a feature to Telescope

My last Hacktoberfest contribution was toTelescope, the awesome web app used to aggregate blog feeds from the Seneca College open source community.

New Feature

I worked on a way to easily display all of the Github repos, issues and pull requests links from a blog post into the sidebar.

After a few days of writing the initial work for theissue, I opened aPR as a draft. Things were far from over! 😄 I received a lot of great feedback and kept adding commits to fix bugs and improve the code. The PR accumulated a total of 73 comments with multiple reviewers involved. I also received help fromAndrew Nguyen for thefilterGitHubUrls() function in the form of aPR in my owntelescope fork.

The basic idea was to receive an array of Github links, filter them byrepos,issues,pullRequests, and finally display those in their own individual react component.

constGitHubInfo=({ghUrls}:Props)=>{constclasses=useStyles();const{repos,issues,pullRequests}=filterGitHubUrls(ghUrls);return(<ListSubheaderclassName={classes.root}><divclassName={classes.GitHubInfoContainer}>{!!repos.length&&<ReposrepoUrls={repos}/>}{!!issues.length&&<IssuesissueUrls={issues}/>}{!!pullRequests.length&&<PullRequestsprUrls={pullRequests}/>}</div></ListSubheader>);};
Enter fullscreen modeExit fullscreen mode

Final Result

The sidebar used to show only the Author and the blog post's date. Now it shows a more complete overview on the post using the Github data:

Telescope New Sidebar

I loved seeing the excitement for this feature on the Telescope slack channel and I am really happy with the result. It should be released with the next version of Telescope very soon!

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Location
    Toronto, Canada
  • Joined

More fromFrancesco Menghi

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp