Skip to content
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

Investigate how users can share and reuse code #1042

Open
robertjmccarthy opened this issue Dec 30, 2024 · 2 comments
Open

Investigate how users can share and reuse code #1042

robertjmccarthy opened this issue Dec 30, 2024 · 2 comments
Assignees

Comments

@robertjmccarthy
Copy link
Contributor

What

Investigate how users could share code that they have written and reuse code that others have written.

The written code will be to build a component which can then be shared on the MoJ Design System community space for others to reuse.

Carry out an investigation and trial to see how this could be done, and share findings back to the team to support the community space work.

Why

As part of a component being shared into the community space, a workable coded version of the component will support users when reusing the community component within their prototypes or even live services. Currently for MoJ Design System components, users import MoJ Frontend. This work is to understand how code for community components can be shared and reused.

Who needs to be involved

  • Developer (leading)
  • Interaction Designer (supporting)

Done

When findings of the investigation are shared back to the team working on the community space.

@jbarnardmoj
Copy link
Contributor

GitHub provide gists - "share code, notes, and snippets". We could create these from the contribution form via the GitHub API (and retrieve them from the API).

The API would require a PAT for authentication; we would want to create that for a machine user so not to tie it to an individual.

@jbarnardmoj
Copy link
Contributor

GitHub API also allows us to create commits and pull requests but it seems awkward to try and do that because:

  1. we might need to provide a UI to capture multiple files
  2. we would need to virus check all submitted files etc

i.e. we would probably want to have human intervention or to simply allow users to raise PRs via github to a community component repository rather than tying this into the submission page directly.

Gists, for code examples, make more sense as part of the submission process. And perhaps allowing the uploading of code to S3 for the team to look at rather than sending straight into a code repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

3 participants