GithubHelp home page GithubHelp logo

open-rpc / playground Goto Github PK

View Code? Open in Web Editor NEW
37.0 4.0 25.0 44.41 MB

A place to play around with OpenRPC. https://playground.open-rpc.org

Home Page: https://playground.open-rpc.org

License: Apache License 2.0

JavaScript 1.88% HTML 2.59% CSS 3.08% TypeScript 92.44%
openrpc-document openrpc-playground openrpc react

playground's Introduction

open-rpc logo

open-rpc.org

This repository contains the open-rpc.org website & tooling to deploy the website.

Need help or have a question? Join us on Discord!

Goals

  1. Knowledge Base for the community.
  2. Purpose-built to introduce new and existing users to OpenRPC.
  3. Great native-content, and minimal curated content.

Contributing

How to contribute, build and release are outlined in CONTRIBUTING.md, BUILDING.md and RELEASING.md respectively. Commits in this repository follow the CONVENTIONAL_COMMITS.md specification.

Resources

playground's People

Contributors

antoine-mulet avatar bakon11 avatar belfordz avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar devonwesley avatar fosgate29 avatar jonaspf avatar mattbford avatar meowsbits avatar openrpc-bastion avatar shanejonas avatar stevanlohja avatar zcstarr avatar zmitton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

playground's Issues

Allow a button to share links to the current playground document

Describe the feature
I'd like to click a button to copy a link to share it with someone else with the document I've edited.

Describe the solution
This can be done creating a button that when clicked, copies a new url with the document being edited passing ?schema=.

This feature is already used in the CLI:

const url = `http://localhost:${port}?${qs.stringify({ uiSchema, schema })}`;

add better JSON Schema support

right now for #36 its missing a couple features around schemas:

image

It does not go any deeper than schema.type.

anything other than the primitives are schemas defined in #components/schemas/<schemaName>

support for uiSchema configuration (split view, auto expanding methods and params via toggles)

Describe the feature you'd like
I'd like to have a way to configure the expand or collapse state of the methods and their children.

Current Problem
they are closed now by default, but there is state.uiSchema.params["ui:defaultExpanded"] in App.js to configure this on and off.

image

Solution You'd like to see
I'd like to see it as both another checkbox toggle in the AppBar and via uiSchema object via querystring (theres an existing usage of qs already).
?uiSchema=

image

Create Extension pattern

We should support extensions within the playground. Examples are:

Method extensions - Items to attach to each method docs that will allow you to customize what you want included in your playground.

remove unneeded files

Describe the feature you'd like
serviceWorker and scripts/test.js are not used anymore

allow resize

I would like to be able to resize the split view

Summary column is empty for referenced parameters.

"Summary" of a parameter field will not be displayed in the generated HTML if the parameter is referenced as a component. ex
"params": [ { "name": "systemID", "required": true, "schema": { "$ref": "#/components/SystemID" } },
where
"components": { "SystemID": { "type": "integer", "title": "System ID", "summary": "My SUmmary",

it only works when I put the "summary" field directly in the parameter object in the params array. This is useful as there will always be redundant parameters, and you don't want to have redundant documentation for it.

on first load with schemaUrl in url sometimes does not load

Describe the issue
on first load with schemaUrl in url sometimes does not load #231

Additional Information
the loading code is a bit of a mess.

Will rewrite with hooks which will make it a lot easier to handle the loading of state for the url and editor on load

use semantic-release for releases

Is your feature request related to a problem? Please describe.
I'd like to spend less time releasing playground. Ideally this is an automated process.

Describe the solution you'd like
semantic-release has been added to some of the other repos. It should be added here too.

Additional Resources
#43

configurable URL

should have a drop down that can configure the url

given a url, it should fetch the spec via service discovery

convert to typescript

Is your feature request related to a problem? Please describe.
This project should be converted to typescript

Describe the solution you'd like
Go through and convert it to typescript

possibly pull out <Documentation /> to its own repo?

Additional context
This gets us a couple other things:

  1. types from meta-schema
  2. <Documentation /> usage in vscode plugin for Preview OpenRPC Document

automate the deploy process

right now i am deploying by hand to github pages

the magical incantation goes something like this:


clean existing local gh-pages

git branch -D gh-pages

npm run build

remove build from .gitignore

checkout new branch, for example deploy/my-deploy

git add .

git commit -av

git subtree split --prefix build -b gh-pages

git push -f origin gh-pages:gh-pages

First Try notes

  • reformat on a timer (3s after stopping typing) OR use a button to reformat
  • show tooltips on the same timer??

Semantic Release is not releasing to npm

Problem
Semantic Release is not releasing to npm

Solution

needs this inside of verifyConditions and publish in the .releaserc file

    "@semantic-release/npm",

and npm install --save'd

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Add ui initial state switching based on window.location

Should be able to provide different default UI layouts based on the url having
docs.myurl.com or myurl.com/docs should put the playground in docs mode
playground.myurl.com or myurl.com/playground should put the playground in playground mode

add CLI

Describe the feature
I'd like CLI interface to pass a schema to like:

npm install -g @open-rpc/playground
open-rpc-playground -s <schema>
// => Server listening on localhost:3000

Examples should be collapsible

Make examples section collapsible and when more than one example is given, create an arrow or indicator to show there is more then one example.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

HTML page will not render if $ref to external document is used

using $ref to external document will fail to render the document ( empty page , fail without errors ). I would suggest that it just put the document name there and still render the rest of the page.
"schema": {
"description": "",
"$ref": "somedocument.json"
}

semantic release gh pages error

image

[4:44:35 PM] [semantic-release] β€Ί βœ–  An error occurred while running semantic-release: { Error: package.json repository.url does not match github.com pattern

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.