Commit Graph

51 Commits

Author SHA1 Message Date
Art
a3df65952d
feat: toast component (1677) (#1998) 2022-11-15 15:26:13 +01:00
macqbat
8d2c3ba4ad
chore: handle overlapping text in price cell (#1988)
* feat: filter assets to withdraw - add logic for filtering out zero balanced accounts

* chore: handle overlapping text in price cell - add title with value

* chore: handle overlapping text in price cell - add title with value

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-11-09 13:47:01 +01:00
malinantonsson
0d69ffb4a8
feat(#1355): liquidity provision dashboard details (#1802)
* feat: generate new nx application

* feat: add env variables & render a headline

* feat: add cypress projectId and delete unused files

* feat: render LP grid

* feat: create liquidity provision lib

* feat: liquidity provision calculate volume

* feat: add volume change, generate types

* feat: add EnvironmentProvider

* feat: add LP health bar

* feat: liquidity provision health

* feat: liquidity provider dashboard healthbars

* feat: liquidity provider dashnoard - add auction trigger

* feat: liquidity provider dashboard - display multiple fees

* feat: liquidity provision provider refactor

* feat: liquidity provision provider refactor

* feat: liquidity provision dashboard - add router

* feat: liquidity provision open details in new window

* feat: liquidity provision details page

* feat: liquidity provision details volume

* feat: liquidity provision formatting

* feat: move market candle providers

* feat: liquidity provision styles

* feat: add liquidity provision status

* feat: liquidity provision details

* feat: liquidity move colors

* feat: liquidty provision details

* feat: fix merge

* Feat/lp health bar redesign (#1903)

* feat: liquidity provision details page

* feat: liquidity provision details

* feat: liquidity health bar redesign

* feat: fix merge

* feat: health bar redesign

* feat: add vega colors
2022-11-08 17:43:35 +00:00
Elmar
5a764d190f
Feat/1416 tx detail (#1953)
* chore(explorer): add new vega colours to tw config

* feat(explorer): add new nested data list component

* feat(explorer): abstract page header with copy to new component

* feat(explorer): update styles tx details page

* fix(explorer): linting errors

* fix(explorer): fix txs type

* fix(explorer): fix strong typing

* fix(explorer): fix styling error for e2e test
2022-11-07 15:36:39 +00:00
Sam Keen
4ef8218267
Feat/800 better proposal ux round 1 (#1223)
* Feat/800: Configured routes for different proposal types

* Feat/800: Refactored propose.tsx to be a hub for the new proposal routes

* Feat/800: Link style tweak for proposals guide

* Feat/927: Hydrating the new proposal forms

* chore: fix typings for shared components

* Feat/927: Proposal forms built with reusable components

* Feat/800: Updated network params, added new method to get param keys as well as values, updated generated types

* Feat/800: Updated and built more reusable proposal form components

* Feat/800: Removed old catchall file of reusable proposal form components

* Feat/800: Added utils for vote deadline and enactment timestamps

* Feat/800: Readded necessary 'color-scheme-dark' class for dark-theme date and datetime inputs

* Feat/800: Tweak to icon positioning on the dialog component

* Feat/800: Regenerated types for network params

* Feat/800: Added iso8601-duration package for working with API vote deadline and enactment data

* Feat/800: Reworked the proposal forms

* Feat/800: Couple of translation additions

* Feat/800: Another translation addition

* Feat/800: Raw proposal test (tests as per old proposal form test)

* Feat/800: Some basic proposal form tests

* Feat/800: Fixing small types error in test

* Feat/800: Updating simple proposal form tests

* Feat/800: Set up env-specific proposal docs links

* Feat/800: Deadlines to the bottom of proposal forms

* Feat/800: Another type error from API changes fixed

* Feat/800: Added the spam protection min tokens network param to proposal forms requests, and the min requirements now displays the larger value of spam protection or min proposer balance

* Feat/800: Network param value change now a textarea

* Feat/800: Improved way to pass docs url

* Feat/800: Added useful explorer links to proposal forms

* Feat/800: Show current value of selected network param in proposal form

* Feat/800: Removed wallet-confirmation buffer, suspect it is not necessary

* Feat/800: Condense vote and enactment ui into single component for simpler state management, memoised some stuff

* Feat/800: Set a default select option for the market selector

* Feat/800: For network params that aren't JSON, display the network param current value in a readonly text input rather than the syntax highlighter

* Feat/800: Corrected network param form network params

* Feat/800: Timestamp functions for closing, enactment and validation, with tests

* Feat/800: More translations

* Feat/800: Added validation options to proposal-form-vote-and-enactment-deadline.tsx, generally improved the component and added tests

* Feat/800: Improved workings of proposal-form-min-requirements.tsx and wrote tests

* Feat/800: Tests for the other reusable form components

* Feat/800: Improved tests for the proposal forms

* Feat/800: Corrected mistake in get-enactment-timestamp.ts

* Feat/800: Fixed type issues that were preventing spotting an error

* Feat/800: Added some extra docs links

* Feat/800: Using renamed Dialog passed in from useProposalSubmit

* refactor: network params to return an object

* fix: update net param form, remove old net params obj

* fix: check for params before rendering

* Feat/800: Rename and simplify isJson based off PR comment

* Feat/800: Small tweaks to timestamp helpers based on PR comments

* Feat/800: Removed proposal-docs-link.tsx

* Feat/800: Used bignumber for min-requirements calculation

* Feat/800: Update tests to work with merged network params branch

* Feat/800: Removed unnecessary translations splitting

* Feat/800: Removed unwanted test

* Feat/800: Removed unwanted tests

* Feat/800: Consistent arrow functions

* Feat/800: Sorted links

* Feat/800: Removed unnecessary typecasting

* Feat/800: Refactored routing

* Feat/800: Refactored mocking of proposal forms to use MockedProvider

* Feat/800: Correct response from the raw proposal submission test

* Feat/800: Removed console.logs added for debugging

* Feat/800: Result of running 'nx format:write'

* Feat/800: Cleaning up lint warnings

* Update apps/token/.env.stagnet3

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Feat/800: Added extra test for docs link in the proposal-form-terms component

* Feat/800: Removed stray console.log

* Feat/800: Added basic render test for proposal-form-terms and cleaned up a bit

* Feat/800: Added tests for the correct form components for the different forms

* Feat/800: Split up the proposal-form-vote-and-enactment-deadline components inside the file to make things a bit more readable

* Feat/800: router config webpack chunk name tweak

* Feat/800: Lint issue fixed

* Feat/800: Fixed timing issue with get-[deadline]-timestamp tests

* Feat/800: Setting a system time in proposal-form-vote-and-enactment-deadline.spec.tsx that doesn't get affected by British Summer Time

* Feat/800: Skipping a cypress test as the newProposalButton no longer takes a user directly to a proposal form. Leaving it in the codebase as the test is very likely to be updated.

* Feat/800: Adding comment on why I've skipped a cypress test

Co-authored-by: Dexter <dexter@vega.xyz>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-09-23 11:10:13 +01:00
macqbat
d7fee66d89
feat: [console-lite] - calculate slippage (price impact) (#1173)
* feat: [console-lite] - calculate slippage (price impact)

* feat: [console-lite] - move slippage from estimates to deal-ticket-size

* feat: [console-lite] - slippage - add a bunch of unit tests

* feat: [console-lite] - slippage -

* feat: [console-lite] - slippage - fix some faillings, add enum instead text entry

* feat: [console-lite] - slippage - adjust tooltip info text

* feat: [console-lite] - slippage - fix failling cache

* feat: [console-lite] - slippage - resolve conflicts after rebase

* feat: [console-lite] - slippage - fixes after review

* feat: [console-lite] - slippage - fixes after review

* feat: [console-lite] - slippage - add memo back to the hook

* feat: [console-lite] - slippage - add back order book model outside hook

* feat: [console-lite] - slippage - adjust some int test

* feat: [console-lite] - slippage - adjust some int test

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-08-31 15:23:01 +02:00
Matthew Russell
c259622848
feat(#927) design update (#1201)
* feat: create new buttons

* feat: update anchor and button link styles

* feat: add icon support

* feat: fix full width with icon

* feat: convert invalid button props to use new props

* feat: tidy up explorer

* feat: more tidy up for token and trading

* feat: move styles to css file using @apply

* chore: remove css with @apply as its not working in apps

* fix: deposit form button

* feat: use default tailwind config, start on forms

* feat: fixup trade grid styles

* feat: form styles

* feat: styles for order book and tables

* feat: make key management use dropdown

* feat: update various components

* feat: tidy up wallet section

* feat: token tidy up

* feat: token governance styles

* Feat/927: Dialog styling

* feat: token styles

* feat: add font familys

* feat: change token borders to be softer

* feat: console-lite changes to support new theme

* Feat/927: Centered key-value-table.tsx spacing

* Feat/927: Tweak to Explorer site border colours to be inline with trading

* Feat/927: Tweak to Explorer header

* Feat/927: Theme switcher icon colours

* Feat/927: Fix for Explorer block data styling

* feat: fix tests, add status footer and change logos

* feat: render both theme icons to avoid hydration error

* chore: run migrations for project

* fix: tailwindconfig build to work with new next version

* feat: use document page for next as per documentation

* chore: update build targets to use development mode when serving

* fix: console-lite default text colors

* chore: fix tooltip text break, change submit button

* feat: adjust console-lite styles to work with tabs

* feat: add bespoke dialog for console-lite market-selector

* Feat/927: Theme switcher now has prop for fixed bg colour

* Feat/927: Font size and border radius tweak for toggles

* Feat/927: Cleaned up trade-grid.tsx spacing

* feat: responsive styles for market header and nav

* feat: update designs for market popover

* fix: nav active state

* chore: allow classname to be passed to button

* Feat/927: Fix Token width on desktop (was overflowing)

* Feat/927: Fix token header h1 from wrapping

* Feat/927: Tweak for claim-flow.tsx

* fix: connect button test

* Feat/927: Proposals list styling polish

* Feat/927: key-value-table.tsx spacing tweak

* feat: add copy button to kp dropdown

* Feat/927: Removing old theme params and uses

* Feat/927: Removing old theme params and uses, documenting the now used otb sizes

* feat: use key val table in asset dialog

* feat: align tooltip styles

* fix: orderbook grid alignment

* chore: linting

* fix: dialog sizing in medium mode, node switcher styles

* chore: remove unused color classes

* feat: update radio and checkbox designs

* feat: updates to storybook

* feat: update design system stories

* chore: stories update

* chore: rename resize panels and tidy

* feat: fix checkbox tick

* fix: add poyfills for jest in trading test setup

* chore: fix checkbox tests

* chore: fix tests

* chore: fix tests again

* chore: revert token wallet name test

* fix: tooltip tests on console-lite

* fix: wallet dropdown test

Co-authored-by: sam-keen <samuel.kleinmann@gmail.com>
2022-08-30 21:35:46 -07:00
macqbat
dac9b8b015
feat: [console-lite] - order review - add info tooltips (#1029)
* feat: [console-lite] - order review - add info tooltips

* feat: [console-lite] - order review - add info tooltips - upgrade lib version, fix tests

* feat: [console-lite] - info tooltip improve

* feat: [console-lite] - make tooltip focusable for mobile handling

* feat: [console-lite] - make tooltip add lame int test for mobile

* feat: [console-lite] - make tooltip - refactor component with tooltip

* feat: [console-lite] - make tooltip - fix failling int test

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-08-17 11:46:49 +02:00
Sam Keen
b810042318
Fix/748-correct-order-of-shadows-on-input-fields (#887) 2022-07-28 10:40:31 +01:00
macqbat
6c976a0da3
feat: [console-lite] - trading - order review (#842)
* feat: [console-lite] - trading - order review

* feat: [console-lite] - trading - order review - fix margin calcs

* feat: [console-lite] - add order margin calcs

* feat: [console-lite] - add order margin calcs - improve margin calcs

* feat: [console-lite] - add order margin calcs - add int test

* feat: [console-lite] - add order margin calcs - improve int test

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-07-27 18:09:27 +02:00
macqbat
d5c8892406
feat: [console-lite] - trading - direction selector (#812)
* feat: [console-lite] - trading - direction selector

* feat: [console-lite] - trading - direction selector - add int tests

* feat: [console-lite] - trading - direction selector - fixes after review feedback

* feat: [console-lite] - trading - direction selector - fix accidentaly failling int test

* feat: [console-lite] - trading - direction selector - fix accidentaly failling int test

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-07-20 13:23:15 +02:00
Elmar
cbe3e80e33
chore(console-lite): add new stepper component and change deal ticket… (#788)
* chore(console-lite): add new stepper component and change deal ticket steps

* chore(console-lite): remove @mui/material from project

* chore(console-lite): refactor stepper counter styles to make it more legible

* fix(console-lite): market selector z-index overlap

* fix(console-lite): failing stepper tests

* fix(console-lite): fix linting errors

* feat(console-lite): add selected value to stepper.tsx

* chore(console-lite): change label size stepper
2022-07-19 00:29:52 +01:00
macqbat
6e1d976d08
feat: [console-lite] - market list - a bunch of improvements (#752)
* feat: [console-lite] - market list - a buch of improvements

* feat: [console-lite] - market list - adjust tests, add keyboard navigation

* feat: [console-lite] - market list - adjust tests, add keyboard navigation

* feat: [console-lite] - market list - small fix

* Apply suggestions from code review

Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>

* Update apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.tsx

Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>

* feat: [console-lite] - market list - other small fix

Co-authored-by: maciek <maciek@vegaprotocol.io>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
2022-07-18 11:28:09 +02:00
macqbat
9cfcadd39b
feat: [console-lite] - market selector (#726)
* feat: [console-lite] - market selector - first commit

* feat: [console-lite] - market selector - add strongly different mobile version

* feat: [console-lite] - market selector - fix deal-market lint fail

* feat: [console-lite] - market selector - add a bunch of improvements

* feat: [console-lite] - market selector - add some int tests

* feat: [console-lite] - market selector - fix dialog dimmensions

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-07-11 15:27:28 +02:00
macqbat
2fbecc461b
feat: [console-lite] - trade screen - bunch of animations (#706)
* feat: [console-lite] - trade screen - bunch of animations

* feat: [console-lite] - trade screen - bunch of animations

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-07-04 16:24:26 +02:00
macqbat
5be0a1a85d
feat: [console-lite] - top nav-bar - first commit (#677)
* feat: [console-lite] - top nav-bar - first commit

* feat: [console-lite] - top nav-bar - fixes and improvements

* feat: [console-lite] - top nav-bar - add some netlify conf, change header for always black

* feat: [console-lite] - top nav-bar - add some netlify conf, change header for always black

* feat: [console-lite] - top nav-bar - add home link on logo

* feat: [console-lite] - top nav-bar - add job for copying netlify conf file

* feat: [console-lite] - top nav-bar - add job for copying netlify conf file

* feat: [console-lite] - top nav-bar - add a couple of int tests

* feat: [console-lite] - top nav-bar - fix a typo

* feat: [console-lite] - top nav-bar - remove anims due its inconsist with design concept, css fixes

* feat: [console-lite] - top nav-bar - make v-logo a component, add darken green color

* feat: [console-lite] - top nav-bar - move v-logo to existing dir

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-07-04 08:26:59 +02:00
Sam Keen
282f714d5b
frontend-monorepo-678: Improved text colour for syntax highlighter light theme (#679) 2022-06-30 14:38:32 +01:00
macqbat
51712f4c20
Feat/526 consolelite design update market list (#635)
* feat: [console-lite] - market list - improve list view

* feat: [console-lite] - market list - add column sorting, improve ag-grid styles

* feat: [console-lite] - market list - remove unnecessary changes

* feat: [console-lite] - market list - fixes for eslint errors

* feat: [console-lite] - market list - remove redundant changes

* feat: [console-lite] - market list - add resize handler and other small improvements

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-06-28 11:57:47 +02:00
Elmar
7cc162c57c
Feat/525 update drawer (#611)
* feat(console-lite): add nav icons

* feat(console-lite): refactor resizing into reusable hook

* feat(console-lite): refactor navigation drawer

* feat(console-lite): add blue colour to theme-lite.js

* feat(console-lite): remove liquidity from nav items

* feat(console-lite): make style changes to navbar and add tab-bar for mobile

* chore(console-lite): change div to aside

* fix(console-lite): drawer left to right mode on mobile

* fix(console-lite): add missing className prop to drawer-wrapper.tsx

* feat(console-lite): add accessibility related changes

* fix(console-lite): fix linting errors

* fix(console-lite): fix failing test and add extra accessibility label

* refactor(console-lite): refactor conditional classNames

* refactor(console-lite): move useResize to react-helpers library

* refactor(console-lite): refactor sun and moon classNames

* fix(console-lite): fix broken e2e tests
2022-06-27 16:55:51 +01:00
Sam Keen
2302ef4378
feat(#447): 447 - UI toolkit and theme updates
* feat: 447 Refactored 'progress' intent to be 'prompt' as now white. Added yellow 'selected' intent

* feat: 447 Colour consolidation

* feat: 447 Colour consolidation extra renaming

* feat: 447 Fixing specified red colours

* feat: 447 Removed unused darker red

* feat: 447 Documenting additional colours in storybook

* feat: 447 Buttons updated (except 'accent', which will probably get removed when navs built)

* feat: 447 Text inputs updated

* feat:frontend-monorepo-447: Trading nav

* feat:frontend-monorepo-447: Updated toggle button colours

* feat:frontend-monorepo-447: Custom checkboxes

* feat:frontend-monorepo-447: Tweaks to radio buttons

* feat:frontend-monorepo-447: Input dates get dark color scheme in dark mode

* feat:frontend-monorepo-447: Dropdown updates

* feat:frontend-monorepo-447: Icon menu

* feat:frontend-monorepo-447: Focus visual styles moved to focus-visible for radios and toggle

* feat:frontend-monorepo-447: Tweak to focus styles for text input and textarea

* feat:frontend-monorepo-447: Labeled input

* feat:frontend-monorepo-447: Labeled input description red when in error

* feat:frontend-monorepo-447: Tooltip visual update

* feat:frontend-monorepo-447: Added disabled state to checkbox

* feat:frontend-monorepo-447: Custom select with radix

* feat:frontend-monorepo-447: Reverted back to native Select for a11y concerns

* feat:frontend-monorepo-447: Added visual cue for dropdown items when multiple can be selected

* feat:frontend-monorepo-447: Removed shadow from buttons in Explorer where it looked wrong

* feat:frontend-monorepo-447: Added box shadow classes into tailwind theme

* feat:frontend-monorepo-447: Colour primitives documentation updated

* feat:frontend-monorepo-447: Cleaning up box shadow use further

* feat:frontend-monorepo-447: Intents util updated

* feat:frontend-monorepo-447: Dialog component updated

* feat:frontend-monorepo-447: Callout component updated

* feat:frontend-monorepo-447: Adjusted apps to handle toolkit changes

* feat:frontend-monorepo-447: Moved tabs to ui-toolkit and styled

* feat:frontend-monorepo-447: Fixed ui-toolkit tests

* feat:frontend-monorepo-447: Token eth wallet made dark to support new buttons

* feat:frontend-monorepo-447: Ran prettier

* frontend-monorepo-447: Simplified button class functions and exported for use on other elements

* frontend-monorepo-447: Used newly exported button classes on Link elements in eth-wallet

* frontend-monorepo-447: Moved trading nav from ui-toolkit to trading app

* frontend-monorepo-447: Simplified intents and updated stories

* frontend-monorepo-447: Using classnames in requested spot

* frontend-monorepo-447: Removed unnecessary 'asChild' prop on dropdown triggers

* frontend-monorepo-447: Made use of the XPrimitive Radix naming convention

* frontend-monorepo-447: Simplified types in 'getButtonClasses'

* frontend-monorepo-447: Added 'asChild' to dropdown trigger to avoid nested buttons

* frontend-monorepo-447: Moved input label and description into Formgroup component. Refactored based on tweaked structure

* frontend-monorepo-447: Externally linked input label

* frontend-monorepo-447: Adding correct text colours to Intent.None backgrounds

* frontend-monorepo-447: Improved intent function name

* frontend-monorepo-447: Removed new navbar until implementation ticket is picked up

* frontend-monorepo-447: using testing-library/user-event for tab click unit tests

* frontend-monorepo-447: Removed unused button import

* frontend-monorepo-447: Little extra use of classnames in form-group.tsx

* feat: make navbar pink for light mode

* fix: problem with theme not switching when dependent in js on theme value

* fix: bg of row hover

* fix: dont use vega pink for sell red

* fix: type error in generate orders func

* fix: lint

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-06-23 20:16:01 -07:00
macqbat
52b7a2db59
Feat/359 console lite improve market list toolbar (#575)
* feat: [console-lite] - simple market list toolbar - fixes in unit tests

* feat: [console-lite] - simple market list toolbar - fixes in unit tests

* feat: [console-lite] - simple market list toolbar - fixes in unit tests

* feat: [console-lite] - simple market list toolbar - fixes in unit tests

* feat: [console-lite] - improve simple market list toolbar, improve int and unit test

* feat: [console-lite] - adjust int test

* feat: [console-lite] - add theme-lite, adjust css's to design

* feat: [console-lite] - remove redundant class name

* feat: [console-lite] - market list toolbar - change the concept - use router links

* feat: [console-lite] - market list toolbar - improve some css

* feat: [console-lite] - market list toolbar - improve some css, review feedback

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-06-21 11:21:22 +02:00
Bartłomiej Głownia
72f94d2e6d
feat(#500): colors fixes (#512)
* feat(#500): mute price decimal places

* feat(colors): remove alpha chanel from shades of gray

* feat(colors): simplify intent colors

* feat(colors): fix intent mapping

* feat(colors): fix lint issues

* feat(colors): fix lint issues
2022-06-10 16:07:44 +01:00
Bartłomiej Głownia
d0452aeb81
Feature/303 orderbook improvements (#312)
* [#151] market-depth code cleanup

* [#303] Make ask and bid relative volume bars relative to maximum bid or ask volume

* [#151] align cmulative vol bars to left

* [#151] replace orderbook zoom in zoom out buttons with dropdown

* [#151] fill gaps in orderbook data

* Order book mocks added

* [#151] mark mid price in orderbook

* [303] Show number in orderbook cumulative volume column

* [#808] show indicative uncrossing volume instead of volume if market is in auction mode

* Method for asserting order book style

* [#303] Add test id attributes to orderbook cells

* Cleanup steps after merge

* Order book test passing

* Change method name

* Revert "[#151] fill gaps in orderbook data"

This reverts commit 90ea4e4ab3.

* [#303] Orderbook rows render optimization

* test: update feature with @todo tests

Same tests can be found in Notion

* [#303] Orderbook scroll to mid price

* [#303] orderbook scroll to row pixel perfect alignment

* [#303] Bring back best offer horizontal lines

* [#303] Preserve center price level on row number change, adjust indicativePrice to resoluton

* feat(orderbook): add storybook

Refs: #303

* feat(orderbook): fix no rows handling

Refs: #303

* feat(orderbook): add orderbook stories for auction and continous market

Refs: #303

* feat(orderbook): add stories for empty orderbook

Refs: #303

* feat(orderbook): fix footer position when there is no data

Refs: #303

* feat(orderbook): seperate number of rows for buy and sell in storybook

Refs: #303

* feat(orderbook): keep mid price in middle until user will scroll

Refs: #303

* feat(orderbook): style scrollbar

* feat(orderbook): style scrollbar

* feat(orderbook): adjust gaps

* feat(orderbook): adjust gaps

* test: addition for autofilled order and mid price lines

* fix: lint

* feat(orderbook): make it posiible to write RTL tests

* feat(orderbook): fix price focus, add unit tests

* feat(orderbook): fix price scroll to mid proce, add unit tests

* feat(orderbook): improvements

- fix scrollbar colors in firefox
- bring back resolution dropdown chevron
- hide go to mid button when locked on mid price
- right align ask vol bar
- change grid gap to 5px
- add vertical lines between columns
- display "No data" if theis no orderbook data
- align header labels to right

* feat(orderbook): fix formatting

* feat(orderbook): add 5px gap

* feat(orderbook): improvements after code review

* feat(orderbook): display full height vertical lines

* fix: change in mid position

* feat(orderbook): fix number cannot be converted to BigInt because it is not integer

* feat(orderbook): fix TS2307 in trading-e2e caused by .module.scss import

Co-authored-by: Joe <joe@vega.xyz>
2022-06-10 15:52:39 +02:00
botond
3a27172e04
feat(#175): ui-toolkit links (#453)
* feat: add enviromnemt provider to the ui-toolkit

* chore: replace etherscan links

* chore: wrap trading app into environment provider

* chore: move env provider to react-helpers and wrap every app

* chore: remove more env variables from libs and replace them with the env hook

* fix: lint

* fix: update readme with correct formatting command

* fix: warnings for web3 hook

* fix: wrap warning in conditional, print message only when env keys are missing

* fix: incorrect condition on deposit manager fauceting param

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>

* fix: cleanup token app ethereum config

* chore: add better error handling to the useEnvironment hook

* fix: lint

* fix: formatting

* fix: more lint

* fix: throw error if required env variables are missing

* fix: remove default eth chain id

* fix: add back etherscan testid to withdrawals links

* fix: imports

* fix: try using babel jest for smart contracts test transpilation

* fix: uniform ts syntax

* chore: set resolveJsonModule in base tsconfig

* fix: add missing data-ids for etherscan links

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-31 17:30:02 -07:00
m.ray
9ab6337e42
Feat/305 add console v2 first view screen (#424)
* [#305] add initial landing dialog on markets page and fix some typos

* [#305] market-list utils and generate schema

* [#305] initial styling of the landing dialog and add arrows

* [#305] routing to markets and add hover and market list tests

* [#305] fix z-index on dialog overlay

* [#305] default market shoulde be oldest market that is currently trading in continuous mode

* [#305] refactor market-list library

* [#305] add arrow unit tests

* Update libs/market-list/src/lib/components/landing/landing-dialog.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/market-list/src/lib/components/landing/select-market-list.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/market-list/src/lib/components/landing/select-market-list.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* test: fix failing tests from homepage change

* [#305] sort by id after sorting by date

* test: increase timeout for failing tests in CI

* [#305] destructuring all over the place and some code tweaks, arrows and percentage changes

* [#305] update sparkline to show colour

* [#305] fix order of market list

* [#305] stretchedLink class plus a-tag href for navigation - accessibility updates

* [#305] use href only and remove log

* [#305] use bignumber.js for price calculations

* [#305] change to bg-white/50 on dark mode overlay as asked from UX

* [#305] change to bg-white/50 on dark mode overlay as asked from UX

* [#305] toLocaleString fix

* [#305] toLocaleString fix

* [#305] add price-change-cell and use formatNumber

* [#305] add extra test for select market list

* Update apps/trading/specs/index.spec.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* [#305] use memo, sort by date and id lodash

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-05-23 13:21:54 +01:00
Matthew Russell
38352c511f
Chore/315 remove blueprint from token dapp (#423)
* fix: nav colors

* chore: replace blueprint progress bar

* chore: remove blueprint overlay and no unused components

* feat: add radio group to ui-toolkit

* feat: adjust disabled opacity and use radio in forms on staking flow

* chore: rename RadioItem to just Radio

* chore: replace country selector with plain select

* fix: key prop warnings

* feat: convert token drawer from blueprint drawer to radix dialog

* chore: remove blueprint core and blueprint select dependencies

* fix: add missing data test id for header title

* fix: spacing on token disassociate page

* fix: missing key props on vesting chart

* feat: update radio button design

* style: radio button UI tweaks

Co-authored-by: PeteWilliams <me@petewilliams.info>
2022-05-23 10:04:15 +01:00
Sam Keen
4034e14120
frontend-monorepo-415 Explorer syntax highlighter CSS does not appear to be working (#418) 2022-05-17 15:40:29 +01:00
Elmar
7266ac9b37
Feature/vega core (#376)
* Initial commit after nx create

* Add .env files

* Add working commit for poc

* Make deal-ticket-manager.tsx accept children as props and export more components to be consumed by external apps

* Add stepper component to simple trading app

* Add basic prototype for simple trading app with stepper component

* Remove unnecessary flags and env variables

* Change simple trading app port

* Refactor deal ticket container to be more dry

* Refactor deal ticket to be more dry

* Refactor app loader, remove tendermint socket and change providers for App.tsx in simple trading app

* Remove example cypress files and change config

* Fix linting issues
2022-05-12 10:56:21 +01:00
m.ray
319e14164d
Feat/324 sparkline component (#381)
* move colors in ui-toolkit/config

* fixing tests and add stories

* fixing some tests and edit story

* update sparkline story

* rename story templates for sparkline

* use tailwind colors and rename to *.spec.tsx

* use tailwind only

* remove test.tsx

* Update libs/tailwindcss-config/src/theme.js

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>

* remove gray from tailwind and use black/40 and white/40 for strokeCurrent

Co-authored-by: madalinaraicu <“madalina@raygroup.uk”>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-09 18:19:19 +03:00
m.ray
bd3268adf0
Feat/258 move key value table into monorepo (#320)
* move key-value-table to ui-toolkit and use tailwind

* add key-value-table to storybook

* override border width 1px from the styles of the app, remove td and th from children

* clone muted and numerical props to children elements

* proposal change table remove empty lines

* add Roboto mono to font-mono tailwind config

* remove labels and labelfor

* revert change on token-details-circulating

* export the whole components directory rather than explicitly individual components

* add classNames, add formatNumberPercentage, remove spans, add span in token details circulating

* data-testid=governance-proposal-enactmentDate and use span instead of div

* use custom spacing defined in tailwind & another README.md update for running cypress in watch mode

* update divs to span within the vesting table

* Update README.md

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* borders and text visible on both dark and light themes

* add headingLevel and use dl instead of tables

* update styling for dl inline

* remove added grey from tailwind

* ignore md files

Co-authored-by: madalinaraicu <“madalina@raygroup.uk”>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-04-29 16:27:20 +03:00
Sam Keen
2b910aa04c
Feat/272 syntax highlighter from explorer to ui-toolkit and feat/216 added light theme and feat/283 add to token (#286)
* Moved syntax highlighter from explorer to ui-toolkit

* Update libs/ui-toolkit/src/components/syntax-highlighter/syntax-highlighter.stories.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Added a light theme for syntax highlighter, added the styling for syntax highlighter to our custom classes

* Suboptimal but successful way of ensuring styling is applied to syntax highlighter

* Styling syntax highlighter with scss

* Fix failing test

* Back to applying styling via custom plugin, but with a wrapper on the syntax highlighter ensuring Tailwind doesn't cull the classes

* Preferred class name

* prettier formatting

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-04-29 10:46:31 +01:00
Bartłomiej Głownia
6cbc701384
[#168] Use static resources from static.vega.xyz (#205) 2022-04-06 11:36:36 +01:00
Matthew Russell
15551b65e5
Feat/83 switching vega key (#156)
* add manage dialog to wallet lib, add it to trading app

* add test for wallet button

* add tests for manage dialog

* move tooltip to ui-toolkit, add copy with tooltip component for manage dialog

* add better labelling

* add tooltip story

* add story for copy-with-tooltip

* add tests for tooltip and copy-with-tooltip

* move useFakeTimers call to beforeAll

* adjust design of manage dialog

* fix linting issues
2022-03-31 10:16:30 -07:00
sam-keen
80902e3c30 Added custom module for classes that aren't in Tailwind - allows us to use contextual alternates for Alpha Lyrae 2022-03-30 16:56:48 +01:00
Sam Keen
05d53bbf4c
106 - migrate mainnet stats to monorepo (#107)
* Initial commit of generated mainnet-stats directory

* Migration partly complete

* Migration complete

* Vega logo now in ui toolkit

* Specified a port that stops conflicts with other e2e tests

* Extra config for swapping to port that stops conflicts with other e2e tests. Also file name case change

* Adding the Cypress project ID to allow recording

* fix test

* Mainnet stats manager moved into library

* Mainnet stats project now importing manager element from lib

* Block Explorer has mainnet stats on home route

* Styling tweak to stop mainnet stats tables trying to match heights

* Spacing alignment tweaks

* Changing header text and tests to align with other branches

* Correct header test for mainnet-stats app

* Correct h3 test for mainnet-stats app

* Fix linting issue

* fix casing issue for CI

* Corrected mistake in merge

Co-authored-by: Dexter <dexter.edwards93@gmail.com>
2022-03-23 17:40:15 +00:00
Sam Keen
514b30bebd
Merge branch 'master' into feat/40-tx-styling 2022-03-18 14:55:43 +00:00
Matthew Russell
313e6e1217
Feat/63 Deal ticket (#82)
* scaffold dealticket package, remove trading views from react-helpers

* add deal ticket component, add intent utils, expand dialog and form group styles

* add splash component, show market not found message if market doesnt exist

* tidy up error handling

* add handleError method for vega tx hook

* add better testname for provider test, flesh out tests a bit more for deal ticket

* Add unit tests for useVegaTransaction and useOrderSubmit hooks

* add wrapper component for order dialog styles

* add vega styled loader to ui toolkit and use in order dialog

* add title prop to order dialog

* split limit and market tickets into own files

* add button radio component

* revert dialog styles

* move splash component to ui-toolkit, add story

* convert intent to enum

* Make button always type=button unless type prop is passed

* inline filter logic for tif selector

* add date-fns, add datetime to helpers

* add order types to wallet package, make price undefined if order type is market

* use enums in deal ticket logic

* tidy up order state by moving submit and transaction hooks out of deal ticket

* add comment for dialog styles

* remove decimal from price input

* add types package, delete old generated types from trading project

* rename types package to graphql

* update generate command to point to correct locations

* fix use order submit test

* use intent shadow helper

* remove date-fns and format manually, update submit button error to use input-error

* remove stray console.log
2022-03-17 12:35:46 -07:00
sam-keen
a51a04c97b Added a lozenge to the ui toolkit 2022-03-16 12:57:24 +00:00
Bartłomiej Głownia
e8a795461d Add theme switcher component 2022-03-09 16:09:17 -08:00
Matthew Russell
d7a004d2ee remove unused colors.js, and unused commented out code from the them 2022-03-07 13:57:06 -08:00
Bartłomiej Głownia
682ea8b0ab Add white anfd black palette 2022-03-07 13:57:06 -08:00
Bartłomiej Głownia
20a053a4f5 Adjust ui-toolkit colors 2022-03-07 13:57:06 -08:00
Bartłomiej Głownia
f4a8aaaf23 Use only black and white rgba colors 2022-03-07 13:57:06 -08:00
Bartłomiej Głownia
3f490f03ca Add icon to input 2022-03-07 13:57:06 -08:00
Bartłomiej Głownia
e5f96448fc Add Icon component, use Icon in InputError 2022-03-07 13:57:06 -08:00
Bartłomiej Głownia
1f91ebe86f Add textarea component 2022-03-07 13:57:06 -08:00
Bartłomiej Głownia
cdb5856983 Add button component 2022-03-07 13:57:06 -08:00
Bartłomiej Głownia
6c04475d82 Add colors and typography stories 2022-03-07 13:57:06 -08:00
Matthew Russell
375697a18a use bg colors from theme 2022-03-02 12:21:35 -08:00
Matthew Russell
6ee4a4da72 make navbar use tailwind, remove nx html 2022-02-23 18:08:31 -08:00