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

Tooltips for partial positions in triggers modal #326

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions config/localization/en/tooltips.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
"TITLE": "Buying Power",
"BODY": "Total available buying power to increase your position on {MARKET}. Your buying power will change based on the market you have selected."
},
"CUSTOM_AMOUNT": {
"TITLE": "Custom Amount",
"BODY": "Adjusting your custom amount will apply to both Take Profit and Stop Loss orders."
},
"DEFAULT_EXECUTION": {
"TITLE": "Default Execution",
"BODY": "Your order will fill any crossing orders at the time of opening. If your order is not fully filled, it will remain open until it is filled, cancelled, or expires."
Expand Down Expand Up @@ -91,6 +95,10 @@
"TITLE": "Limit Price",
"BODY": "This order can only be filled at the specified limit price or better. If your order crosses at the time of placement, your order will fill any crossing orders at the most favorable price."
},
"LIMIT_PRICE_LEARN_MORE": {
"TITLE": "Limit Price",
"BODY": "By identifying a limit price, you are placing a Take Profit Limit Order and/or a Stop Limit Order. Click {DOCUMENTATION_LINK} for more details."
},
"LIMIT_PRICE_SLIPPAGE": {
"TITLE": "Slippage",
"BODY": "Percentage difference between your trigger price and limit price."
Expand Down Expand Up @@ -151,6 +159,14 @@
"TITLE": "Order Amount",
"BODY": "Amount of {SYMBOL} in USD to buy or sell. This is the amount your position will increase or decrease by when the order is filled, not your resulting position amount."
},
"PARTIAL_CLOSE_STOP_LOSS": {
"TITLE": "Stop Loss is a Partial Close",
"BODY": "Your stop loss is not configured to close your entire position. This could be because you set a custom amount, or because you have changed your position size after adding this trigger."
},
"PARTIAL_CLOSE_TAKE_PROFIT": {
"TITLE": "Take Profit is a Partial Close",
"BODY": "Your take profit is not configured to close your entire position. This could be because you set a custom amount, or because you have changed your position size after adding this trigger."
},
"POST_ONLY": {
"TITLE": "Post-Only",
"BODY": "Orders with post-only enabled can only be placed as maker orders. If the order crosses other orders at the time of placement, it will be automatically cancelled."
Expand Down Expand Up @@ -187,6 +203,10 @@
"TITLE": "Step Size",
"BODY": "Step size is the smallest factor allowed for order amounts on this market."
},
"STOP_LOSS": {
"TITLE": "Stop Loss",
"BODY": "Protects against losses by closing a trader’s position once the oracle price crosses the trigger price."
},
"STOP_LOSS_ABOVE_LIQUIDATION_PRICE": {
"TITLE": "Stop Loss Above Liquidation Price",
"BODY": "The stop-loss price has risen above the liquidation price. This can happen due to funding changes, due to withdrawing funds, or due to changing margin requirements."
Expand All @@ -199,6 +219,10 @@
"TITLE": "Taker Fee",
"BODY": "Trades that take liquidity from the book (e.g. market or crossing limit orders) execute as taker orders. Taker orders have a higher fee than maker orders."
},
"TAKE_PROFIT": {
"TITLE": "Take Profit",
"BODY": "Allows traders to set targets and protects profits on positions by specifying a price at which to close an open position for profit."
},
"TICK_SIZE": {
"TITLE": "Tick Size",
"BODY": "Tick size is the minimum price movement on this market."
Expand Down
25 changes: 2 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dydxprotocol/v4-localization",
"version": "1.1.45",
"version": "1.1.46",
"description": "v4 localization",
"main": "index.ts",
"scripts": {
Expand Down
12 changes: 12 additions & 0 deletions scripts/generated/tooltips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export const TOOLTIP_STRING_KEYS = {
BRACKET_ORDER_TP_TITLE: 'TOOLTIPS.TRADE.BRACKET_ORDER_TP.TITLE',
BUYING_POWER_BODY: 'TOOLTIPS.TRADE.BUYING_POWER.BODY',
BUYING_POWER_TITLE: 'TOOLTIPS.TRADE.BUYING_POWER.TITLE',
CUSTOM_AMOUNT_BODY: 'TOOLTIPS.TRADE.CUSTOM_AMOUNT.BODY',
CUSTOM_AMOUNT_TITLE: 'TOOLTIPS.TRADE.CUSTOM_AMOUNT.TITLE',
DEFAULT_EXECUTION_BODY: 'TOOLTIPS.TRADE.DEFAULT_EXECUTION.BODY',
DEFAULT_EXECUTION_TITLE: 'TOOLTIPS.TRADE.DEFAULT_EXECUTION.TITLE',
EQUITY_BODY: 'TOOLTIPS.TRADE.EQUITY.BODY',
Expand All @@ -83,6 +85,8 @@ export const TOOLTIP_STRING_KEYS = {
LEVERAGE_TITLE: 'TOOLTIPS.TRADE.LEVERAGE.TITLE',
LIMIT_PRICE_BODY: 'TOOLTIPS.TRADE.LIMIT_PRICE.BODY',
LIMIT_PRICE_TITLE: 'TOOLTIPS.TRADE.LIMIT_PRICE.TITLE',
LIMIT_PRICE_LEARN_MORE_BODY: 'TOOLTIPS.TRADE.LIMIT_PRICE_LEARN_MORE.BODY',
LIMIT_PRICE_LEARN_MORE_TITLE: 'TOOLTIPS.TRADE.LIMIT_PRICE_LEARN_MORE.TITLE',
LIMIT_PRICE_SLIPPAGE_BODY: 'TOOLTIPS.TRADE.LIMIT_PRICE_SLIPPAGE.BODY',
LIMIT_PRICE_SLIPPAGE_TITLE: 'TOOLTIPS.TRADE.LIMIT_PRICE_SLIPPAGE.TITLE',
LIQUIDATION_PRICE_BODY: 'TOOLTIPS.TRADE.LIQUIDATION_PRICE.BODY',
Expand Down Expand Up @@ -113,6 +117,10 @@ export const TOOLTIP_STRING_KEYS = {
ORDER_AMOUNT_TITLE: 'TOOLTIPS.TRADE.ORDER_AMOUNT.TITLE',
ORDER_AMOUNT_USD_BODY: 'TOOLTIPS.TRADE.ORDER_AMOUNT_USD.BODY',
ORDER_AMOUNT_USD_TITLE: 'TOOLTIPS.TRADE.ORDER_AMOUNT_USD.TITLE',
PARTIAL_CLOSE_STOP_LOSS_BODY: 'TOOLTIPS.TRADE.PARTIAL_CLOSE_STOP_LOSS.BODY',
PARTIAL_CLOSE_STOP_LOSS_TITLE: 'TOOLTIPS.TRADE.PARTIAL_CLOSE_STOP_LOSS.TITLE',
PARTIAL_CLOSE_TAKE_PROFIT_BODY: 'TOOLTIPS.TRADE.PARTIAL_CLOSE_TAKE_PROFIT.BODY',
PARTIAL_CLOSE_TAKE_PROFIT_TITLE: 'TOOLTIPS.TRADE.PARTIAL_CLOSE_TAKE_PROFIT.TITLE',
POST_ONLY_BODY: 'TOOLTIPS.TRADE.POST_ONLY.BODY',
POST_ONLY_TITLE: 'TOOLTIPS.TRADE.POST_ONLY.TITLE',
POST_ONLY_TIMEINFORCE_GTT_BODY: 'TOOLTIPS.TRADE.POST_ONLY_TIMEINFORCE_GTT.BODY',
Expand All @@ -132,12 +140,16 @@ export const TOOLTIP_STRING_KEYS = {
SPREAD_TITLE: 'TOOLTIPS.TRADE.SPREAD.TITLE',
STEP_SIZE_BODY: 'TOOLTIPS.TRADE.STEP_SIZE.BODY',
STEP_SIZE_TITLE: 'TOOLTIPS.TRADE.STEP_SIZE.TITLE',
STOP_LOSS_BODY: 'TOOLTIPS.TRADE.STOP_LOSS.BODY',
STOP_LOSS_TITLE: 'TOOLTIPS.TRADE.STOP_LOSS.TITLE',
STOP_LOSS_ABOVE_LIQUIDATION_PRICE_BODY: 'TOOLTIPS.TRADE.STOP_LOSS_ABOVE_LIQUIDATION_PRICE.BODY',
STOP_LOSS_ABOVE_LIQUIDATION_PRICE_TITLE: 'TOOLTIPS.TRADE.STOP_LOSS_ABOVE_LIQUIDATION_PRICE.TITLE',
STOP_LOSS_BELOW_LIQUIDATION_PRICE_BODY: 'TOOLTIPS.TRADE.STOP_LOSS_BELOW_LIQUIDATION_PRICE.BODY',
STOP_LOSS_BELOW_LIQUIDATION_PRICE_TITLE: 'TOOLTIPS.TRADE.STOP_LOSS_BELOW_LIQUIDATION_PRICE.TITLE',
TAKER_FEE_BODY: 'TOOLTIPS.TRADE.TAKER_FEE.BODY',
TAKER_FEE_TITLE: 'TOOLTIPS.TRADE.TAKER_FEE.TITLE',
TAKE_PROFIT_BODY: 'TOOLTIPS.TRADE.TAKE_PROFIT.BODY',
TAKE_PROFIT_TITLE: 'TOOLTIPS.TRADE.TAKE_PROFIT.TITLE',
TICK_SIZE_BODY: 'TOOLTIPS.TRADE.TICK_SIZE.BODY',
TICK_SIZE_TITLE: 'TOOLTIPS.TRADE.TICK_SIZE.TITLE',
TIME_IN_FORCE_BODY: 'TOOLTIPS.TRADE.TIME_IN_FORCE.BODY',
Expand Down
Loading