• This repository has been archived on 11/Jan/2024
  • Stars
    star
    333
  • Rank 126,599 (Top 3 %)
  • Language
  • License
    MIT License
  • Created about 3 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A set of files to use as input for Blocks.

GitHub Blocks

πŸŽ‰ You made it! Welcome to the GitHub Blocks Technical Preview. For questions and help, join us at discord.gg/githubnext in the #blocks channel.

What are blocks?

With Blocks, you can extend GitHub's interface in some pretty powerful ways! It could be as simple as a custom renderer for files or folders in your repository, and it can be as flexible as a full interface for editing content.

The Blocks platform is blocks.githubnext.com. If you have access, you can view any public repository on GitHub by navigating to blocks.githubnext.com/{owner}/{repo}.

🚨 Blocks is currently an experimental technical preview! It WILL have bugs and issues, and should not be used for anything mission-critical.

Goals of the Technical Preview

We’re aiming for two things with the technical preview:

  • Seed a marketplace with Blocks for common use cases
  • Refine the developer experience for building and using Blocks.

As an early adopter you can help shape the direction for Blocks by building your own, and by sharing your feedback. We will work closely with you every step of the way.

GitHub Blocks is an exploration of the question:

What if developers could customize GitHub, not only to present their code and data, but to make it a living, interactive platform?

Instead of feeling like a storage locker for code, could you bring that content to life? What if a designer could view styles from a CSS file instead of having to wait for a developer to transform it? What if you could review that branch with the new component by looking at the file here, instead of cloning the repository and setting up a local development environment? What if journalists and scientists could visualize data right on GitHub, along with how it's changed over time?

Ultimately, extensibility is about making all the parts of the developer platform that we never imagined. It could be a great idea that all developers love, or just something that scratches your own itch.

We can't imagine the developer platform of the future alone! We want you to build blocks and share them. Help us to design the developer experience, and help us to figure out how to strike a good balance between ease-of-use and flexibility. We're very excited to see how you use the Blocks platform!

Using Blocks

If you're viewing this in the Blocks platform, You can switch which block you're using in the dropdown menu in the top left of this window.

File blocks

We have Blocks for viewing 3D files, prettifying CSV and JSON files, React components, CSS selectors, and much more.

We've populated this repo with different types of content to explore. Feel free to poke around by clicking files and folders in the left sidebar, and see what you find!

otherBlocks1

You can find the code for all of these example Blocks in our example Blocks repo

Folder blocks

Folder blocks can visualize or the contents of a folder, or even the entire repository.

Check out our example folder Block by clicking the root folder of this repo.

Block features

View live data

Since we have complete control over this content, we can render live data: say we wanted to show off our p5.js sketch, we can do that inline:

<BlockComponent block={{"type":"file","id":"processing","title":"p5.js","description":"Run a p5.js sketch","sandbox":true,"entry":"blocks/file-blocks/processing.tsx","matches":["*.js"],"example_path":"https://github.com/githubnext/blocks-tutorial/blob/main/processing-sketch.js","owner":"githubnext","repo":"blocks-examples"}} context={{"repo":"blocks","owner":"githubnext","path":"examples/p5-sketch.js","sha":"main","file":"README.md"}} height={438} /> as well as show the code for that sketch:

<BlockComponent block={{"owner":"githubnext","repo":"blocks-examples","id":"code-block","type":"file"}} context={{"repo":"blocks","owner":"githubnext","path":"examples/p5-sketch.js","sha":"HEAD","file":"README.md"}} height={202} /> We can also embed interactive code examples, say for demonstrating how to use gestures in framer-motion:

<BlockComponent block={{"type":"file","id":"sandbox","title":"JS Sandbox","description":"Run JavaScript code in a sandbox","entry":"blocks/file-blocks/sandbox/index.tsx","matches":[".js",".ts",".tsx",".jsx"],"example_path":"https://github.com/githubnext/blocks-tutorial/blob/main/README.md","owner":"githubnext","repo":"blocks-examples"}} context={{"repo":"blocks","owner":"githubnext","path":"examples/framer motion docs/example2.js","sha":"main","file":"README.md"}} />

View changes over time

We've also included the commit history for the file or folder you're viewing in the right sidebar.

This is a great way to keep an eye on what's changed recently, plus you can click to surf through past versions of the code. This becomes very powerful when combined with different visualizations of the code, instead of just the raw content.

commits


Developing your own blocks

We've written a guide for developing blocks! Use the file tree on the left to navigate to docs/Developing Blocks.

Getting help

Blocks is a technical preview, and is NOT a supported GitHub product. Please don't reach out to GitHub support, as they will not be able to help you.

The best venue to find help and connect with other creators is the GitHub Next discord, at discord.gg/githubnext. Join the #blocks channel and say hi!

More Repositories

1

monaspace

An innovative superfamily of fonts for code
TypeScript
13,775
star
2

testpilot

Test generation using large language models
TypeScript
495
star
3

copilot-workspace-user-manual

πŸ“– The user manual for GitHub Copilot Workspace
368
star
4

gpt4-with-calc

GPT-4 Equipped with Numeric Calculation
TypeScript
171
star
5

vitale

TypeScript notebook for developers
TypeScript
163
star
6

githubnext

A public point of contact for GitHub Next
155
star
7

blocks-template

A template for creating custom Blocks.
TypeScript
112
star
8

blocks-examples

A set of example custom Blocks.
TypeScript
92
star
9

amalfi-artifact

Artifact accompanying our ICSE '22 paper "Practical Automated Detection of Malicious npm Packages"
Python
35
star
10

blocks-dev

TypeScript
18
star
11

universe-blocks-demo

JavaScript
14
star
12

spectrum

TypeScript
13
star
13

blocks-template-svelte

make GitHub Blocks with Svelte!
JavaScript
9
star
14

vscode-react-webviews

A sample/starter template for developing VS Code extensions with webviews
TypeScript
7
star
15

UpgrAIder

Upgrade deprecated/outdated code using LLMs and release notes
Python
7
star
16

llmorpheus

LLM-based mutation testing
TypeScript
5
star
17

tiny-svelte-fsm

A minimalistic finite state machine library for Svelte 5
TypeScript
4
star
18

blocks-template-react

make GitHub Blocks with React!
JavaScript
3
star
19

preview-block

TypeScript
2
star
20

universe-blocks-demo-blocks

CSS
2
star
21

followup-attention

Accompanying artifacts for the TSE paper "Follow-up Attention: An Empirical Study of Developer and Neural Model Code Exploration"
Jupyter Notebook
2
star
22

blocks-template-vue

make GitHub Blocks with Vue!
JavaScript
1
star
23

array-toolbox

This is going to get a thousand stars
JavaScript
1
star
24

blocks-howie-spike-busted

TypeScript
1
star
25

.github

1
star
26

emoji-block

TypeScript
1
star
27

blocks-runtime

runtime support for Blocks
TypeScript
1
star
28

azuresvelte

JavaScript
1
star
29

hello-world

Sample repository
TypeScript
1
star
30

azureswacookies

TypeScript
1
star
31

history-blocks

TypeScript
1
star