Go to file
Finn 24a8277a3a remove console log 2024-05-08 17:11:54 +02:00
.github ci: limit PR review to dependabot 2023-11-26 14:46:49 +00:00
.husky reorder husky precommit 2023-02-13 22:35:07 -05:00
.vscode fix 2024-01-22 13:28:14 +02:00
Sounds update sounds 2023-11-14 00:39:48 +01:00
apis add backup rpc to claim 2024-04-08 14:48:18 +02:00
components fix rate curve chart 2024-05-08 15:12:45 +10:00
fonts use next font optimization 2023-06-08 11:06:26 +10:00
hooks remove console log 2024-05-08 17:11:54 +02:00
lib Add analytics (#285) 2023-10-23 17:06:43 +01:00
pages new tab 2024-05-08 15:45:40 +02:00
public add funding table empty states 2024-05-08 10:42:03 +10:00
store enable fallbacks bsol msol jitosol 2024-04-16 13:33:22 +02:00
styles add account ui tour 2024-02-12 14:14:47 +11:00
test jest testing init (#360) 2024-01-01 20:51:06 +01:00
types funding history table (#411) 2024-04-16 12:53:08 +02:00
utils add kmno logo 2024-05-04 20:52:35 +10:00
vendor update trading_view; add tradingview files to gitignore 2022-12-06 11:06:15 -05:00
.eslintignore mango v4 sandbox 2022-05-04 00:25:54 -04:00
.eslintrc.json jest testing init (#360) 2024-01-01 20:51:06 +01:00
.gitignore add glitchtip 2023-07-11 17:25:06 -04:00
.prettierignore add network concurrency for vercel builds 2023-01-28 14:41:13 -05:00
.yarnrc auto pin deps going forward 2023-01-26 12:32:11 +00:00
.yarnrc.yml deny scripts 2023-01-25 15:02:51 +00:00
LICENSE Initial commit 2022-04-08 12:35:55 -04:00
README.md Update README.md 2023-11-15 21:53:17 -05:00
jest.config.ts jest testing init (#360) 2024-01-01 20:51:06 +01:00
next-env.d.ts Initial commit from Create Next App 2022-05-04 00:25:32 -04:00
next-i18next.config.js portuguese (#370) 2024-01-17 00:58:27 +01:00
next.config.js use images.remotePatterns for allowed image domains 2024-03-04 14:12:31 +11:00
package.json update settings libs 2024-05-08 00:24:08 +02:00
postcss.config.js mango v4 sandbox 2022-05-04 00:25:54 -04:00
prettier.config.js update prettier pkgs, config, and reformat 2023-08-17 19:47:11 -04:00
sentry.client.config.ts Disable sentry autoSessionTracking 2023-07-20 17:48:14 +01:00
sentry.edge.config.ts add glitchtip 2023-07-11 17:25:06 -04:00
sentry.server.config.ts add glitchtip 2023-07-11 17:25:06 -04:00
tailwind.config.js update pepe theme 2023-10-25 14:02:36 +11:00
tsconfig.json use latest v4 npm pkg 2023-02-19 15:52:25 -05:00
yarn.lock lint fix 2024-05-08 00:30:00 +02:00

README.md

This repo contains the Next.js app for the Mango v4 user interface.

Quickstart

To get started, follow these steps:

  1. Clone the repo: Begin by cloning the repository using the command:
git clone git@github.com:blockworks-foundation/mango-v4-ui.git
  1. Install Dependencies: Move into the directory and install the dependencies:
cd mango-v4-ui
yarn setup
  1. Run the app:
yarn dev
  1. Browse to http://localhost:3000

⌨️ Contributor's Guide

Code quality

  • Avoid duplication
  • Consider performance (use useMemo and useCallback where appropriate)
  • Create logical components and give them descriptive names
  • Destructure objects and arrays
  • Define constants for event functions unless they are very simple e.g. a single state update
  • Create hooks for shared logic
  • Add translation keys in alphabetical order

Branching

Prefix your branches with your Git username and give them concise and descriptive names e.g. username/branch-name

Commits

Add commits for each self-contained change and give your commits clear messages that describe the change. Smaller commits that encompass a specific change are preferred over large commits with many changes

PRs

All PRs should have a meaningful name and include a description of what the changes are.

  • If there are visual changes, include screenshots in the description.

  • If the PR is unfinished include a "TODO" section with work not yet completed. If there are known issues/bugs include a section outlining what they are.

Drafts

Opening draft PRs is a good way for other contributors to know a feature is being worked on. This is most useful for larger/complex features and is not a requirement. When your feature is at a point where you'd like to gather feedback or it's close to completion open a draft PR and share the preview link in the relevant Discord channel

Prefix "WIP:" to your draft PR name

Reviews

When your changes are finished, who you request review from depends on the type of changes.

For complex changes e.g. new transactions, large features, lots of client or backend interactions you should at a minimum include @tlrsssss in your review

For changes that affect visual elements of the app (including text changes), request a review from @saml33 at a minimum

If you're unsure, request a review from @tlrssss and @saml33

If your work involves other parts of the stack (backend, client, etc.) request a review from the relevant person in that area

🎨 Creating Color Themes

  1. Copy one of the other color themes in tailwind.config.js (starting line 25)
  2. Modify the colors. For the variables bkg-* and fgd-* pick a base color for bkg-1 and fgd-1 then adjust the lightness for 2-4. Use this same process to create dark/hover variations for the colors that have these properties. The base color can be anything that works for your theme.
  3. Add your corresponding theme values here. The format needs to be converted to HEX, you can paste the HSL values into Coolors to do this.
  4. Copy one of the other themes in global.css and modify to match your theme name in tailwind.config.js
  5. Add a translation variable for your theme name in locales. Theme names are to be added to settings.json and make sure to add this to each locale (they can all be in English to start with). Make sure the value matches data-theme from your css vars in global.css
  6. Add your theme to the THEMES array in display settings. It should go after mango-classic then in alphabetical order. You need to use the translation key you added to the locales.