From 7823b8ad2e088e7fcdf23671c8c2062fd7fd7d8a Mon Sep 17 00:00:00 2001 From: tresabhi Date: Sun, 6 Aug 2023 19:07:44 +0000 Subject: [PATCH] feat: updated /evolution to new width --- src/commands/debug.ts | 2 +- src/commands/eligible.ts | 2 +- src/commands/evolution.tsx | 2 +- src/commands/fullStats.tsx | 2 +- src/commands/help.ts | 2 +- src/commands/inactive.tsx | 2 +- src/commands/ownedTanks.tsx | 2 +- src/commands/ping.ts | 2 +- src/commands/playerAchievements.ts | 2 +- src/commands/playerInfo.ts | 2 +- src/commands/ratings.tsx | 2 +- src/commands/searchClans.ts | 2 +- src/commands/searchPlayers.ts | 2 +- src/commands/searchTanks.ts | 2 +- src/commands/today.tsx | 2 +- src/commands/verify.ts | 2 +- src/components/Graph/components/Root.tsx | 30 +++++++++++++----------- src/renderers/evolution.tsx | 1 - src/routes/stats.tsx | 2 +- src/routes/today.tsx | 2 +- 20 files changed, 34 insertions(+), 33 deletions(-) diff --git a/src/commands/debug.ts b/src/commands/debug.ts index 76bd7c807..fa7240883 100644 --- a/src/commands/debug.ts +++ b/src/commands/debug.ts @@ -12,7 +12,7 @@ const executionStart = new Date().getTime(); export const debugCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/eligible.ts b/src/commands/eligible.ts index 06ad066fd..eadb83c0b 100644 --- a/src/commands/eligible.ts +++ b/src/commands/eligible.ts @@ -26,7 +26,7 @@ export const SKILLED_CLANS: Record = { export const eligibleCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: false, command: new SlashCommandBuilder() diff --git a/src/commands/evolution.tsx b/src/commands/evolution.tsx index 761623808..797fdb002 100644 --- a/src/commands/evolution.tsx +++ b/src/commands/evolution.tsx @@ -28,7 +28,7 @@ export const evolutionCommand = new Promise( resolve({ inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command, diff --git a/src/commands/fullStats.tsx b/src/commands/fullStats.tsx index c86e97515..e0b87937e 100644 --- a/src/commands/fullStats.tsx +++ b/src/commands/fullStats.tsx @@ -28,7 +28,7 @@ export const fullStatsCommand = new Promise( resolve({ inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command, diff --git a/src/commands/help.ts b/src/commands/help.ts index ce8d76f93..a85d83319 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -30,7 +30,7 @@ function addDocsSubcommands(option: SlashCommandSubcommandsOnlyBuilder) { export const helpCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: addDocsSubcommands( diff --git a/src/commands/inactive.tsx b/src/commands/inactive.tsx index bb4ecf25c..9fc709e57 100644 --- a/src/commands/inactive.tsx +++ b/src/commands/inactive.tsx @@ -17,7 +17,7 @@ const DEFAULT_THRESHOLD = 7; export const inactiveCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/ownedTanks.tsx b/src/commands/ownedTanks.tsx index 91d9764ee..53869e605 100644 --- a/src/commands/ownedTanks.tsx +++ b/src/commands/ownedTanks.tsx @@ -44,7 +44,7 @@ const COMP_TANKS = [ export const ownedTanksCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/ping.ts b/src/commands/ping.ts index 83b65d115..a9fcd5146 100644 --- a/src/commands/ping.ts +++ b/src/commands/ping.ts @@ -3,7 +3,7 @@ import { CommandRegistry } from '../events/interactionCreate'; export const pingCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, handlesInteraction: true, diff --git a/src/commands/playerAchievements.ts b/src/commands/playerAchievements.ts index 60cdf86fa..2a81a2d2d 100644 --- a/src/commands/playerAchievements.ts +++ b/src/commands/playerAchievements.ts @@ -16,7 +16,7 @@ type SortBy = 'name' | 'count'; export const playerAchievementsCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/playerInfo.ts b/src/commands/playerInfo.ts index 704daf3b0..ce26234c5 100644 --- a/src/commands/playerInfo.ts +++ b/src/commands/playerInfo.ts @@ -12,7 +12,7 @@ import { AccountInfo } from '../types/accountInfo'; export const playerInfoCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/ratings.tsx b/src/commands/ratings.tsx index 6b5c8e97f..ae9a64238 100644 --- a/src/commands/ratings.tsx +++ b/src/commands/ratings.tsx @@ -121,7 +121,7 @@ export const DATABASE_REPO = { owner: 'tresabhi', repo: 'blitzkrieg-db' }; export const ratingsCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/searchClans.ts b/src/commands/searchClans.ts index 01ca6061d..a7ca4e6f8 100644 --- a/src/commands/searchClans.ts +++ b/src/commands/searchClans.ts @@ -11,7 +11,7 @@ import { ClanList } from '../types/clanList'; export const searchClansCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/searchPlayers.ts b/src/commands/searchPlayers.ts index 536d5fb18..b6c62b6d2 100644 --- a/src/commands/searchPlayers.ts +++ b/src/commands/searchPlayers.ts @@ -12,7 +12,7 @@ import { AccountList } from '../types/accountList'; export const searchPlayersCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/searchTanks.ts b/src/commands/searchTanks.ts index f02b95c05..f2330aad5 100644 --- a/src/commands/searchTanks.ts +++ b/src/commands/searchTanks.ts @@ -8,7 +8,7 @@ import { CommandRegistry } from '../events/interactionCreate'; export const searchTanksCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/today.tsx b/src/commands/today.tsx index 9a5a7a037..f8505c682 100644 --- a/src/commands/today.tsx +++ b/src/commands/today.tsx @@ -15,7 +15,7 @@ import { AccountInfo } from '../types/accountInfo'; export const todayCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/commands/verify.ts b/src/commands/verify.ts index 1dea0918f..c6682c1cf 100644 --- a/src/commands/verify.ts +++ b/src/commands/verify.ts @@ -14,7 +14,7 @@ import { PlayerClanData } from '../types/playerClanData'; export const verifyCommand: CommandRegistry = { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/components/Graph/components/Root.tsx b/src/components/Graph/components/Root.tsx index cc5d6df8a..7f838ace8 100644 --- a/src/components/Graph/components/Root.tsx +++ b/src/components/Graph/components/Root.tsx @@ -3,7 +3,7 @@ import { ReactNode } from 'react'; import { theme } from '../../../stitches.config'; import { Margin, MarginOrientation } from './Margin'; -export const GRAPH_WIDTH = 544; +export const GRAPH_WIDTH = 384; export const GRAPH_HEIGHT = 320; export interface MarginInputProps { @@ -20,7 +20,7 @@ export interface RootProps { separations?: number; xMinLabel: string; xMaxLabel: string; - xTitle: string; + xTitle?: string; } export function Root({ @@ -91,18 +91,20 @@ export function Root({ /> )} -
- - {xTitle} - -
+ {xTitle !== undefined && ( +
+ + {xTitle} + +
+ )} ); } diff --git a/src/renderers/evolution.tsx b/src/renderers/evolution.tsx index e40dde18c..5d4a7833a 100644 --- a/src/renderers/evolution.tsx +++ b/src/renderers/evolution.tsx @@ -93,7 +93,6 @@ export default async function evolution( {/* goofy ahh bug forces me to call them as functions */} {plot.length > 0 && (