Skip to content

Commit

Permalink
refactor: switch to react18-json-view (#890)
Browse files Browse the repository at this point in the history
This PR replaces `react-json-view` with `react18-json-view`. This
results in 18 less dependencies and a 2kb smaller gzipped bundle.

There were a few small tweaks to the json view themes to use the closest
color within the sites color palette (previously they were one offs) and
margins/padding.

### Context of Change

`react-json-view` doesn't work with React 18 and is also much bigger
than `react18-json-view`. Related to #668.

mac-s-g/react-json-view#441

Co-authored-by: Caleb Kniffen <ckniffen@ripple.com>
  • Loading branch information
mvadari and ckniffen committed Jan 5, 2024
1 parent 3d046a0 commit cceb18a
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 306 deletions.
19 changes: 12 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Contributing

Thanks for contributing to the explorer!

We're thrilled you're interested and your help is greatly appreciated. Contributing is a great way to learn about the XRP Ledger (XRPL).
Expand All @@ -11,6 +12,7 @@ We're thrilled you're interested and your help is greatly appreciated. Contribut
- [.env](.env.example) - Environment variables

## Git setup

You need only to do this once and you have probably already done this if you already use git.

1. Download git.
Expand All @@ -19,19 +21,22 @@ You need only to do this once and you have probably already done this if you alr
4. git config --global user.name “Your Name Here”

### Fork the repository
1. Create a GitHub account if you haven’t already. Let’s assume your git account name is username.

1. Create a GitHub account if you haven’t already. Let’s assume your git account name is username.
2. Go to https://github.com/ripple/explorer.
3. Click on the “Watch”, “Star” and “Fork” buttons in the top right.
4. That last command will fork a new copy of the repo in your personal git area at https://github.com/username/explorer

### Clone the repository on your local machine.

```
$ git clone git@github.com:username/explorer.git --branch staging
$ cd explorer
$ git remote add upstream git@github.com:ripple/explorer.git
```

### Start work in a new branch.

```
$ git fetch upstream staging
$ git checkout staging
Expand All @@ -40,6 +45,7 @@ $ git push --set-upstream origin your-branch-name
```

Bring in recent changes to the “staging” branch into your own branch

```
$ git fetch upstream staging
$ git pull upstream staging
Expand All @@ -65,7 +71,6 @@ Before being considered for review or merging, each pull request must:

All new react components must be [function components](https://reactjs.org/docs/components-and-props.html) unless there is good reason to use classes.


## CSS linting rules are extended from

1. [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard)
Expand All @@ -74,7 +79,7 @@ All new react components must be [function components](https://reactjs.org/docs/

## JSON viewer

We are using [react-json-view](https://github.com/mac-s-g/react-json-view)
We are using [react18-json-view](https://github.com/YYsuni/react18-json-view)

## Analytics

Expand Down Expand Up @@ -108,10 +113,10 @@ We are using Google Analytics. For more info read the [documentation](https://de

## Useful Chrome add-on

* [Redux DevTools](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en)
* [Dom listener](https://chrome.google.com/webstore/detail/domlistener/jlfdgnlpibogjanomigieemaembjeolj?hl=en)
* [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi/related?hl=en)
* [Postman](https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop/related?hl=en)
- [Redux DevTools](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en)
- [Dom listener](https://chrome.google.com/webstore/detail/domlistener/jlfdgnlpibogjanomigieemaembjeolj?hl=en)
- [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi/related?hl=en)
- [Postman](https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop/related?hl=en)

## Basic security

Expand Down
Loading

0 comments on commit cceb18a

Please sign in to comment.