planetarium / libplanet-explorer-frontend

Libplanet Explorer Frontend
https://explorer.libplanet.io/
MIT License
16 stars 27 forks source link

Migrate to NextJS #176

Closed tkiapril closed 1 year ago

tkiapril commented 1 year ago

Resolves #173. Resolves #175. I imagine that a thorough review of this PR would be incredibly cumbersome, so I would like to ask a review from mostly a functional viewpoint, i.e. if everything works fine. (If it's fine for you, a look in the components/libs/pages to see if there isn't an unnecessary contraption would be nice, too! Especially: I am wondering if hook calls are sane in the pages/*.tsx files.) Also, a deployed version is available at: https://libplanet-explorer-frontend.pages.dev/ Known issues: system actions are not displayed correctly #183, and account transactions are timed out on large chains (an issue with libplanet rather than the frontend.) To run it, please do the following after checking out the PR branch:

corepack enable

# if corepack is not found, run:
npm i -g corepack
corepack enable

# install dependencies, populate endpoints and build static site:
./build.sh

To run in development mode, do:

yarn dev

To run the static site version, serve the files in _site directory in the webserver root directory. If you have python available, this would work:

cd _build
python3 -m http.server
# the website will be available at http://localhost:8000

Please do note that page navigation on the development mode will be sluggish, as getStaticPaths() on every page will be called on every request. This is a limitation of NextJS.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

pull-request-quantifier-deprecated[bot] commented 1 year ago

This PR has 2243 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

``` Label : Extra Large Size : +1233 -1010 Percentile : 100% Total files changed: 53 Change summary by file extension: .dockerignore : +21 -3 .development : +1 -0 .example : +0 -1 .eslintignore : +1 -1 .js : +5 -75 .json : +75 -49 .yml : +15 -10 .gitignore : +33 -11 .node-version : +1 -0 .yaml : +0 -1 .md : +24 -13 .sh : +7 -6 .tsx : +946 -779 .ts : +104 -46 Dockerfile : +0 -15 ``` > Change counts above are quantified counts, based on the [PullRequestQuantifier customizations](https://github.com/microsoft/PullRequestQuantifier/blob/main/docs/prquantifier-yaml.md).

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a balance between between PR complexity and PR review overhead. PRs within the optimal size (typical small, or medium sized PRs) mean: - Fast and predictable releases to production: - Optimal size changes are more likely to be reviewed faster with fewer iterations. - Similarity in low PR complexity drives similar review times. - Review quality is likely higher as complexity is lower: - Bugs are more likely to be detected. - Code inconsistencies are more likely to be detected. - Knowledge sharing is improved within the participants: - Small portions can be assimilated better. - Better engineering practices are exercised: - Solving big problems by dividing them in well contained, smaller problems. - Exercising separation of concerns within the code changes. #### What can I do to optimize my changes - Use the PullRequestQuantifier to quantify your PR accurately - Create a context profile for your repo using the [context generator](https://github.com/microsoft/PullRequestQuantifier/releases) - Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the `Excluded` section from your `prquantifier.yaml` context profile. - Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your `prquantifier.yaml` context profile. - Only use the labels that matter to you, [see context specification](./docs/prquantifier-yaml.md) to customize your `prquantifier.yaml` context profile. - Change your engineering behaviors - For PRs that fall outside of the desired spectrum, review the details and check if: - Your PR could be split in smaller, self-contained PRs instead - Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR). #### How to interpret the change counts in git diff output - One line was added: `+1 -0` - One line was deleted: `+0 -1` - One line was modified: `+1 -1` (git diff doesn't know about modified, it will interpret that line like one addition plus one deletion) - Change percentiles: Change characteristics (addition, deletion, modification) of this PR in relation to all other PRs within the repository.


Was this comment helpful? :thumbsup:  :ok_hand:  :thumbsdown: (Email) Customize PullRequestQuantifier for this repository.