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

Combine all themes into a single playground #1539

Merged
merged 29 commits into from
Feb 25, 2020
Merged

Combine all themes into a single playground #1539

merged 29 commits into from
Feb 25, 2020

Conversation

epicfaace
Copy link
Member

@epicfaace epicfaace commented Dec 10, 2019

Fixes #1536.

Description

  • Make a separate package called @rjsf/playground. This exports a Playground component that takes an object of themes in its props.
  • This package will be published to npm. It will have a single "playground" within it which will have all themes, such as the following:
import React from "react";
import { Theme as MuiTheme } from "rjsf-material-ui";
import Playground from "../src/index";
import { render } from "react-dom";

const themes = {
  default: {
    stylesheet:
      "//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css",
    theme: {},
  },
  "material-ui": {
    stylesheet: "",
    theme: MuiTheme,
  },
};

render(<Playground themes={themes} />, document.getElementById("app"));
  • Each package can have a "development" playground with the following code:
import React from "react";
import { render } from "react-dom";
import Playground from "@rjsf-team/playground";

const themes = [
  {
    default: {
      stylesheet:
        "//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css",
      theme: {},
    },
  },
];

render(<Playground themes={themes} />, document.getElementById("app"));

@epicfaace
Copy link
Member Author

How it looks like so far:

image

@delyanr delyanr mentioned this pull request Dec 29, 2019
11 tasks
@epicfaace epicfaace marked this pull request as ready for review January 9, 2020 01:38
@epicfaace epicfaace requested a review from edi9999 January 9, 2020 01:38
Copy link
Collaborator

@edi9999 edi9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@epicfaace epicfaace merged commit 5d17e37 into master Feb 25, 2020
@epicfaace epicfaace deleted the playground branch February 25, 2020 21:09
erunion added a commit to readmeio/react-jsonschema-form that referenced this pull request Feb 27, 2020
* update package lock

* v2.0.0-alpha.2

* Overridable DescriptionField in BooleanField (rjsf-team#1594)

* Overridable description field in BooleanField

* Adds test for BooleanField's overridable DescriptionField

* doc: JSON schema version supported versions (rjsf-team#1603)

For rjsf-team#1307 (comment)

* Don't crash when schema property is a non-object - show an error instead (rjsf-team#1582)

* don't throw TypeError: Cannot use 'in' operator to search for

* Update Form_test.js

Co-authored-by: Ashwin Ramaswami <[email protected]>

* Set up CI with Azure Pipelines (rjsf-team#1605)

* Set up CI with Azure Pipelines

[skip ci]

* Update azure-pipelines.yml for Azure Pipelines

* Add npm test to azure pipelines

* Delete .travis.yml

* Combine all themes into a single playground (rjsf-team#1539)

* move playground to new folder

* move playground to packages and standardize playground structure

* don't rely on bootstrap in playground

* fix styling, move share button to top right

* remove footer things

* more fixes

* encode theme in playground hash

* fix: don't switch to default theme when changing tabs

* correct package name is @rjsf/playground

* fix prod config for playground

* fix more configs

* use webpack-dev-server

* render form in a Frame

* add dependencies

* use DemoFrame component to properly fix material-ui styles

* use old bootstrap look and feel for the playground itself

* fix dist

* move netlify toml

* update netlify

* empty commit

* remove npm prepare to speed up travis runs

* fix webpack dist config for playground

* fix import

* disable minicssextractplugin to try to fix netlify

* fix netlify path

* no need to build playground / gh-pages for core package

* add HtmlWebpackPlugin

* Allow references that don't start with #/definitions/ (rjsf-team#1506)

* pass entire rootSchema to findSchemaDefinition, not just definitions

* use jsonpointer to handle non-"#/definitions" definitions

* revert package-lock

* make sure json pointers are URI fragment encoded

* replace "definitions" with "rootSchema"  variable

* Fix getMatchingOption logic

* fix tests

* remove console log

* Fix tests

* prettier

* Remove support for recursive references to deep schema definitions

* update docs for registry and definitions

* add `definitions` back to registry

* Fix mui form tests

* Add a general registry test

* update proptypes of registry

* fix eslint issues

* fix formatting

* Fix local playground for core package (rjsf-team#1607)

* remove scss file from playground

* fix dev playground on @rjsf/core

* fix playground version

* update package-lock

* fix playground "npm start"

* chore: move docs to separate folder (rjsf-team#1604)

* test: adding a github workflow for running tests

Co-authored-by: Ashwin Ramaswami <[email protected]>
Co-authored-by: Erik Lothe <[email protected]>
Co-authored-by: ACoolmanBigHealth <[email protected]>
Co-authored-by: Evgeniy Tatarkin <[email protected]>
Co-authored-by: Chancellor Clark <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

full material-ui playground for all feature
2 participants