From 6a307ce59efec35ccf8f565eb9b2b3e0b74ed4c5 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Wed, 2 Sep 2026 21:02:01 +0300 Subject: [PATCH] Simplify comments --- app/components/AbilitiesSelector.tsx | 10 +- app/components/Ability.tsx | 1 - app/components/ActionButton.tsx | 9 +- app/components/BuildCard.tsx | 2 +- app/components/Catcher.tsx | 7 +- app/components/Chart.tsx | 15 +- app/components/EmptyState.tsx | 2 +- app/components/FormWithConfirm.tsx | 6 +- app/components/GameTimeline.tsx | 10 +- app/components/LocaleTime.tsx | 19 +- app/components/LocaleTimeRange.tsx | 18 +- app/components/NoteAvatar.tsx | 10 +- app/components/ObjectiveTimeline.tsx | 26 +- app/components/Pagination.test.ts | 4 +- app/components/Pagination.tsx | 13 +- app/components/Placeholder.tsx | 2 +- app/components/PlayerStatusTimeline.tsx | 18 +- app/components/RankTable.tsx | 5 +- app/components/SpDelta.tsx | 6 +- app/components/StageBannerBox.tsx | 6 +- app/components/SubmitButton.tsx | 5 +- app/components/UserLink.tsx | 2 +- app/components/WeaponSelect.tsx | 11 +- app/components/elements/Button.tsx | 5 +- app/components/elements/Calendar.tsx | 2 +- app/components/elements/Dialog.tsx | 32 +- app/components/elements/Popover.tsx | 20 +- app/components/elements/SearchSelect.tsx | 15 +- app/components/elements/Select.tsx | 24 +- app/components/elements/SelectShell.tsx | 6 +- app/components/elements/Tabs.tsx | 41 +- app/components/elements/TeamSearch.tsx | 2 +- app/components/elements/TournamentSearch.tsx | 6 +- app/components/elements/UserSearch.tsx | 6 +- app/components/elements/useEntitySearch.ts | 16 +- app/components/layout/ChatSidebar.module.css | 7 +- app/components/layout/ChatSidebar.tsx | 8 +- app/components/layout/SearchResults.tsx | 6 +- app/components/layout/WeaponSearch.tsx | 6 +- app/components/layout/index.tsx | 14 +- app/components/match-page/MatchBanner.tsx | 5 +- .../match-page/MatchBannerStartedAt.tsx | 2 +- app/components/match-page/MatchRosterTab.tsx | 4 +- app/components/match-page/MatchTabs.tsx | 2 +- app/components/match-page/MatchTimeline.tsx | 24 +- app/components/match-page/SecondaryAction.tsx | 18 +- app/components/match-page/WeaponReporter.tsx | 3 +- .../match-page/ingested-scoreboard.ts | 18 +- .../match-page/useMatchWeaponReport.ts | 11 +- app/components/match-page/utils.ts | 15 +- app/components/objective-timeline-utils.ts | 34 +- app/config-helpers.ts | 17 +- app/config.server.ts | 36 +- app/config.ts | 30 +- app/db/empty-values-noop-plugin.ts | 7 +- app/db/json-columns.ts | 7 +- app/db/json-selections.test.ts | 6 +- app/db/json-selections.ts | 6 +- app/db/node-sqlite-dialect.ts | 55 +-- app/db/reset.ts | 9 +- app/db/seed/core/SplatoonFaker.ts | 18 +- app/db/seed/core/actAs.ts | 6 +- app/db/seed/core/backdate.ts | 8 +- app/db/seed/core/defineFactory.ts | 20 +- app/db/seed/core/faker.ts | 11 +- app/db/seed/core/pinUserId.ts | 11 +- app/db/seed/core/reseason.ts | 7 +- app/db/seed/core/showcaseNames.ts | 3 +- app/db/seed/dev/availability.ts | 22 +- app/db/seed/dev/highlights.ts | 8 +- app/db/seed/dev/misc.ts | 2 +- app/db/seed/dev/sendouq.ts | 14 +- app/db/seed/dev/teams.ts | 3 +- app/db/seed/dev/tournaments.ts | 52 +-- app/db/seed/dev/trophies.ts | 6 +- app/db/seed/dev/users.ts | 3 +- app/db/seed/factories/ApiTokenFactory.ts | 6 +- app/db/seed/factories/ArtFactory.ts | 7 +- .../seed/factories/AvailabilityWeekFactory.ts | 6 +- app/db/seed/factories/BuildFactory.ts | 6 +- app/db/seed/factories/CalendarEventFactory.ts | 5 +- .../factories/CalendarEventResultFactory.ts | 8 +- app/db/seed/factories/FriendRequestFactory.ts | 5 +- app/db/seed/factories/FriendshipFactory.ts | 6 +- .../GroupMatchContinueVoteFactory.ts | 7 +- app/db/seed/factories/ImageFactory.ts | 10 +- app/db/seed/factories/LiveStreamFactory.ts | 7 +- app/db/seed/factories/LogInLinkFactory.ts | 5 +- .../seed/factories/PlusSuggestionFactory.ts | 5 +- app/db/seed/factories/PlusVoteFactory.ts | 10 +- .../seed/factories/ResultHighlightFactory.ts | 6 +- app/db/seed/factories/SQGroupFactory.ts | 9 +- app/db/seed/factories/SQMatchFactory.ts | 19 +- app/db/seed/factories/SQReadyCheckFactory.ts | 6 +- .../seed/factories/SQReportedWeaponFactory.ts | 8 +- .../factories/SavedCalendarEventFactory.ts | 5 +- app/db/seed/factories/ScrimPostFactory.ts | 8 +- app/db/seed/factories/SkillFactory.ts | 9 +- .../seed/factories/SplatoonRotationFactory.ts | 5 +- app/db/seed/factories/TeamFactory.ts | 10 +- app/db/seed/factories/TournamentFactory.ts | 73 +--- .../TournamentOrganizationFactory.ts | 8 +- .../TournamentReportedWeaponFactory.ts | 7 +- .../seed/factories/TournamentTeamFactory.ts | 8 +- app/db/seed/factories/TrophyFactory.ts | 12 +- app/db/seed/factories/UserFactory.ts | 66 +-- app/db/seed/factories/VodFactory.ts | 7 +- .../seed/factories/XRankPlacementFactory.ts | 14 +- app/db/sql.ts | 29 +- app/db/tables-json.ts | 30 +- app/db/tables.ts | 59 +-- app/db/wipe.ts | 8 +- app/db/write-tracker.ts | 7 +- app/entry.client.tsx | 7 +- app/entry.server.tsx | 10 +- .../admin/AdminRepository.server.test.ts | 3 +- app/features/admin/AdminRepository.server.ts | 25 +- .../admin/ExternalStreamRepository.server.ts | 10 +- .../admin/core/discord-webhook.server.ts | 12 +- app/features/admin/core/plus-tier.server.ts | 4 +- app/features/admin/routes/admin.test.ts | 3 +- .../admin/routes/og-images.module.css | 5 +- app/features/admin/routes/og-images.tsx | 7 +- .../api-private/core/refresh-caches.server.ts | 6 +- .../api-public/api-action-wrapper.server.ts | 10 +- app/features/api-public/schema.ts | 233 +++-------- app/features/api/core/perms.ts | 9 +- app/features/art/ArtRepository.server.ts | 5 +- app/features/art/art-image.server.ts | 6 +- app/features/art/art-image.ts | 37 +- .../art/components/ArtImageFormField.tsx | 6 +- .../art/components/ArtTagsFormField.tsx | 5 +- .../associations/associations-types.ts | 4 +- .../auth/LogInLinkRepository.server.ts | 6 +- app/features/auth/core/routes.server.ts | 11 +- app/features/auth/core/user.server.ts | 11 +- .../AvailabilityRepository.server.ts | 55 +-- .../availability/availability-constants.ts | 6 +- .../availability/availability-schemas.ts | 5 +- .../availability/availability-types.ts | 51 +-- .../availability/components/MySchedule.tsx | 13 +- .../RegistrationAvailabilityPanel.tsx | 17 +- .../components/ScheduleDayCell.tsx | 12 +- .../availability/components/ScheduleNudge.tsx | 7 +- .../components/ScheduleTracks.tsx | 24 +- .../components/ScheduleWeekDialog.tsx | 5 +- .../components/WeekAvailabilityEditor.tsx | 19 +- .../availability/core/Availability.ts | 126 ++---- .../availability/core/Commitments.server.ts | 15 +- .../core/FriendSchedule.server.ts | 11 +- .../availability/core/MySchedule.server.ts | 6 +- .../core/RegistrationAvailability.server.ts | 12 +- .../core/RosterSchedule.server.ts | 27 +- .../availability/core/ScheduleWeek.ts | 10 +- .../core/TournamentDuration.server.ts | 6 +- .../loaders/t.$customUrl.schedule.server.ts | 5 +- .../routes/t.$customUrl.schedule.module.css | 11 +- app/features/badges/BadgeRepository.server.ts | 3 +- .../components/BadgeDisplay.browser.test.tsx | 3 +- .../badges/components/BadgeDisplay.tsx | 2 +- .../bracket-test/routes/bracket-test.tsx | 2 +- app/features/build-analyzer/analyzer-hooks.ts | 6 +- app/features/build-analyzer/analyzer-types.ts | 7 +- .../components/PerInkTankGrid.tsx | 8 +- .../build-analyzer/core/ability-points.ts | 10 +- .../core/abilityChunksCalc.test.ts | 3 +- .../build-analyzer/core/abilityChunksCalc.ts | 24 +- .../build-analyzer/core/serializer.ts | 7 +- app/features/build-analyzer/core/stats.ts | 15 +- app/features/build-analyzer/core/utils.ts | 7 +- .../build-analyzer/routes/analyzer.module.css | 9 +- .../build-analyzer/routes/analyzer.tsx | 17 +- app/features/build-stats/build-stats-utils.ts | 2 - .../builds/BuildRepository.server.test.ts | 7 +- app/features/builds/BuildRepository.server.ts | 22 +- app/features/builds/builds-constants.ts | 13 +- app/features/builds/core/filter.server.ts | 6 +- .../calendar/CalendarRepository.server.ts | 13 +- .../calendar/actions/calendar.new.server.ts | 5 +- app/features/calendar/calendar-constants.ts | 4 +- app/features/calendar/calendar-hooks.ts | 9 +- app/features/calendar/calendar-new-schemas.ts | 11 +- .../calendar/calendar-progression-form.ts | 12 +- .../calendar/calendar-search-params.ts | 3 +- app/features/calendar/calendar-types.ts | 8 +- .../BracketProgressionFormFields.tsx | 16 +- app/features/calendar/components/Tags.tsx | 4 +- .../calendar/components/TournamentCard.tsx | 3 +- app/features/calendar/core/CalendarEvent.ts | 14 +- app/features/calendar/core/ICal.server.ts | 2 +- .../calendar/loaders/calendar.new.server.ts | 3 +- .../calendar/loaders/calendar.server.test.ts | 9 +- .../calendar/loaders/calendar.server.ts | 8 +- .../calendar/loaders/calendar[.]ics.server.ts | 2 +- app/features/calendar/routes/calendar.new.tsx | 3 +- app/features/changelog/changelog-constants.ts | 6 +- app/features/changelog/core/entries.server.ts | 11 +- app/features/chat/ChatProvider.tsx | 15 +- app/features/chat/ChatRepository.server.ts | 24 +- app/features/chat/ChatRoomResolver.server.ts | 17 +- app/features/chat/ChatSystemMessage.server.ts | 33 +- app/features/chat/chat-hooks.ts | 25 +- app/features/chat/components/Chat.tsx | 2 +- .../chat/revalidate-broadcast-throttle.ts | 21 +- app/features/chat/revalidation-scope.ts | 30 +- app/features/chat/routes/api.chat.rooms.ts | 6 +- .../components/RangeVisualization.tsx | 4 +- .../comp-analyzer/core/damage-combinations.ts | 15 +- .../core/special-weapon-range.ts | 15 +- .../form-examples-schema.ts | 9 - app/features/events/core/EventBus.server.ts | 4 +- .../events/events-hooks.browser.test.tsx | 6 +- app/features/events/events-hooks.ts | 41 +- app/features/events/routes/sse.ts | 2 +- app/features/friends/friends-utils.server.ts | 17 +- .../core/ShowcaseTournaments.server.ts | 5 +- .../img-export/components/Graphic.module.css | 19 +- .../img-export/components/Graphic.tsx | 15 +- .../components/ImageExportDialog.tsx | 22 +- .../SeasonSummaryGraphic.module.css | 5 +- .../components/SeasonSummaryGraphic.tsx | 11 +- app/features/img-export/core/RunComps.ts | 16 +- app/features/img-export/core/SeasonSummary.ts | 45 +-- .../img-upload/ImageRepository.server.ts | 22 +- app/features/img-upload/image-bytes.server.ts | 6 +- app/features/img-upload/image-field.server.ts | 14 +- app/features/layout/LayoutDataProvider.tsx | 20 +- app/features/layout/core/layout.server.ts | 7 +- app/features/layout/routes/api.layout.ts | 6 +- .../LeaderboardRepository.server.ts | 4 +- .../core/leaderboards.server.test.ts | 6 +- .../leaderboards/core/leaderboards.server.ts | 9 +- app/features/lfg/LFGRepository.server.test.ts | 5 +- app/features/lfg/core/timezone.ts | 17 +- .../LiveStreamRepository.server.ts | 6 +- .../map-list-generator/core/MapList.test.ts | 14 +- .../map-list-generator/core/MapList.ts | 34 +- .../map-planner/components/Planner.tsx | 10 +- app/features/map-planner/plans-global.css | 6 +- .../routes/match-page-test.tsx | 10 +- .../MatchProfileRepository.server.ts | 5 +- app/features/mmr/SkillRepository.server.ts | 44 +- app/features/mmr/components/SeasonSelect.tsx | 6 +- app/features/mmr/core/Seasons.ts | 82 +--- app/features/mmr/mmr-utils.server.ts | 17 +- app/features/mmr/mmr-utils.ts | 8 +- app/features/mmr/tiered.server.ts | 3 +- .../NotificationRepository.server.ts | 25 +- .../notifications/NotificationsProvider.tsx | 20 +- .../notifications/core/notify.server.ts | 22 +- .../notifications/core/pushSubscription.ts | 20 +- .../notifications/core/resolve.server.ts | 19 +- .../notifications-hooks.browser.test.tsx | 7 +- .../notifications/notifications-hooks.ts | 21 +- .../notifications/routes/api.notifications.ts | 6 +- .../calculator-constants.ts | 17 +- .../core/objectDamage.test.ts | 5 +- .../core/objectDamage.ts | 6 +- .../components/ParamComparisonDialog.tsx | 6 +- .../params/components/WeaponParamsTable.tsx | 5 +- .../params/components/WeaponPatchHistory.tsx | 14 +- app/features/params/core/WeaponParams.ts | 102 ++--- app/features/params/core/param-directions.ts | 50 +-- .../params/weapon-params-constants.ts | 22 +- app/features/params/weapon-params-types.ts | 34 +- .../PlusSuggestionRepository.server.ts | 8 +- ...plus.suggestions.comment.$tier.$userId.tsx | 3 +- .../PlusVotingRepository.server.ts | 6 +- .../plus-voting/actions/plus.voting.server.ts | 3 +- app/features/plus-voting/core/voting-time.ts | 14 +- .../ScannerIngestRepository.server.ts | 111 ++--- .../actions/scanner-ingest.server.ts | 33 +- app/features/scanner-ingest/core/Matches.ts | 52 +-- .../scanner-ingest/core/Scoreboards.ts | 187 +++------ .../scanner-ingest/core/VodMatches.test.ts | 5 +- .../scanner-ingest/core/VodMatches.ts | 6 +- .../scanner-ingest/scanner-ingest-schemas.ts | 13 +- .../scanner-ingest-vod-schemas.ts | 21 +- app/features/scanner-ingest/tests/harness.ts | 68 +--- app/features/scanner/capture/sampler.ts | 16 +- app/features/scanner/capture/ticker.worker.ts | 7 +- app/features/scanner/capture/vod-frames.ts | 19 +- .../scanner/components/AbilityGrid.tsx | 10 +- app/features/scanner/components/EventCard.tsx | 11 +- .../scanner/components/EventsSummary.tsx | 6 +- .../scanner/components/FrameThumb.tsx | 7 +- app/features/scanner/components/LivePage.tsx | 54 +-- app/features/scanner/components/MatchCard.tsx | 33 +- .../scanner/components/MatchLobbyTabs.tsx | 15 +- app/features/scanner/components/MetaChips.tsx | 5 +- .../scanner/components/ScannerChrome.tsx | 5 +- .../components/ScreenshotPage.module.css | 6 - app/features/scanner/components/VodPage.tsx | 48 +-- .../scanner/components/dedupe-events.ts | 12 +- app/features/scanner/components/events-csv.ts | 8 +- .../scanner/components/fixture-export.ts | 15 +- app/features/scanner/components/format.ts | 10 +- app/features/scanner/components/labels.ts | 5 +- .../scanner/components/player-status-view.ts | 5 +- .../scanner/components/sendou-ingest.ts | 83 ++-- .../scanner/components/sendou-upload.ts | 26 +- app/features/scanner/core/ability-harvest.ts | 40 +- app/features/scanner/core/canonical.ts | 6 +- app/features/scanner/core/cv.ts | 24 +- .../scanner/core/detectors/death/abilities.ts | 23 +- .../scanner/core/detectors/death/index.ts | 191 +++------ .../scanner/core/detectors/death/rois.ts | 74 +--- .../scanner/core/detectors/map-start/index.ts | 58 +-- .../scanner/core/detectors/map-start/rois.ts | 59 +-- .../core/detectors/minimap/abilities.ts | 6 +- .../scanner/core/detectors/minimap/index.ts | 123 ++---- .../scanner/core/detectors/minimap/rois.ts | 111 ++--- .../scanner/core/detectors/minimap/stage.ts | 40 +- .../scanner/core/detectors/objective/index.ts | 94 ++--- .../core/detectors/objective/player-status.ts | 180 +++------ .../scanner/core/detectors/objective/rois.ts | 381 ++++++------------ .../core/detectors/objective/strip-weapons.ts | 53 +-- .../scanner/core/detectors/registry.ts | 12 +- .../scanner/core/detectors/scheduler.ts | 44 +- .../scoreboard-battle-log-replay/code.ts | 33 +- .../scoreboard-battle-log-replay/header.ts | 60 +-- .../scoreboard-battle-log-replay/index.ts | 64 +-- .../scoreboard-battle-log-replay/rois.ts | 78 +--- .../detectors/scoreboard-battle-log/index.ts | 54 +-- .../detectors/scoreboard-battle-log/rois.ts | 70 +--- .../detectors/scoreboard-own/abilities.ts | 6 +- .../core/detectors/scoreboard-own/index.ts | 40 +- .../core/detectors/scoreboard-own/rois.ts | 42 +- .../core/detectors/scoreboard/banner.ts | 124 ++---- .../core/detectors/scoreboard/digits.ts | 14 +- .../core/detectors/scoreboard/header.ts | 42 +- .../core/detectors/scoreboard/index.ts | 91 ++--- .../scanner/core/detectors/scoreboard/kits.ts | 9 +- .../core/detectors/scoreboard/names.ts | 77 ++-- .../scanner/core/detectors/scoreboard/pov.ts | 20 +- .../scanner/core/detectors/scoreboard/rois.ts | 57 +-- .../scanner/core/detectors/scoreboard/row.ts | 17 +- .../core/detectors/scoreboard/specials.ts | 58 +-- .../core/detectors/scoreboard/weapons.ts | 85 ++-- .../scanner/core/detectors/telemetry.ts | 7 +- app/features/scanner/core/detectors/types.ts | 80 ++-- app/features/scanner/core/glyphs.ts | 192 ++++----- app/features/scanner/core/image.ts | 33 +- app/features/scanner/core/ink-color.ts | 15 +- app/features/scanner/core/localized.ts | 11 +- app/features/scanner/core/match-builder.ts | 364 +++++++---------- app/features/scanner/core/match-sets.ts | 36 +- app/features/scanner/core/replay-time.ts | 41 +- app/features/scanner/core/resources.ts | 14 +- app/features/scanner/core/scanner-match.ts | 66 ++- .../scanner/core/slot-row-assignment.ts | 48 +-- app/features/scanner/core/text.ts | 32 +- app/features/scanner/core/timeline/index.ts | 44 +- .../scanner/core/timeline/same-scoreboard.ts | 24 +- app/features/scanner/node/assets-dir.ts | 11 +- app/features/scanner/node/fixtures.ts | 19 +- app/features/scanner/node/image-io.ts | 8 +- app/features/scanner/node/resources.ts | 10 +- .../scanner/routes/scanner.fixtures.ts | 7 +- app/features/scanner/routes/scanner.tsx | 7 +- app/features/scanner/scanner-schemas.ts | 16 +- app/features/scanner/scanner-search-params.ts | 5 +- app/features/scanner/scanner-types.ts | 11 +- app/features/scanner/store/db.ts | 21 +- app/features/scanner/store/events.ts | 38 +- app/features/scanner/store/inspect.ts | 10 +- app/features/scanner/store/vods.ts | 17 +- .../scanner/tests/ability-harvest.test.ts | 8 +- app/features/scanner/tests/banner.test.ts | 5 +- .../scanner/tests/logic/frame-queue.test.ts | 7 +- .../scanner/tests/logic/match-builder.test.ts | 12 +- .../scanner/tests/logic/scheduler.test.ts | 6 +- app/features/scanner/tests/map-start.test.ts | 12 +- app/features/scanner/tests/minimap.test.ts | 11 +- .../scanner/tests/node-test-compat.ts | 8 +- app/features/scanner/tests/objective.test.ts | 25 +- .../scanner/tests/player-status.test.ts | 10 +- .../scoreboard-battle-log-replay.1.test.ts | 5 +- .../scoreboard-battle-log-replay.2.test.ts | 5 +- .../tests/scoreboard-battle-log.test.ts | 11 +- .../scanner/tests/scoreboard-own.test.ts | 4 +- app/features/scanner/tests/scoreboard.test.ts | 14 +- .../scanner/tests/strip-weapons.test.ts | 28 +- app/features/scanner/tests/suites/death.ts | 15 +- .../suites/scoreboard-battle-log-replay.ts | 15 +- .../scanner/worker/analyzer.worker.ts | 31 +- app/features/scanner/worker/client.ts | 36 +- app/features/scanner/worker/frame-queue.ts | 22 +- app/features/scanner/worker/protocol.ts | 28 +- app/features/scanner/worker/resources.ts | 22 +- .../scrims/ScrimMapListRepository.server.ts | 13 +- .../scrims/ScrimMapRepository.server.ts | 26 +- .../ScrimPickupRosterRepository.server.ts | 12 +- .../scrims/ScrimPostRepository.server.ts | 34 +- .../scrims/actions/scrims.new.server.ts | 4 +- .../actions/scrims.request.server.test.ts | 5 +- .../scrims/components/ScrimAvailability.tsx | 18 +- .../scrims/components/ScrimSchedulePicker.tsx | 10 +- app/features/scrims/core/Scrim.ts | 61 +-- app/features/scrims/core/ScrimMapByMap.ts | 20 +- app/features/scrims/loaders/scrims.server.ts | 6 +- app/features/scrims/scrims-types.ts | 3 +- app/features/scrims/scrims-utils.ts | 17 +- ...GroupMatchContinueVoteRepository.server.ts | 10 +- .../MatchSkillRepository.server.ts | 4 +- .../PlayerStatRepository.server.ts | 35 +- .../ReportedWeaponRepository.server.ts | 17 +- .../SQMatchRepository.server.test.ts | 5 +- .../sendouq-match/SQMatchRepository.server.ts | 36 +- .../actions/q.match.$id.server.ts | 10 +- app/features/sendouq-match/core/RejoinVote.ts | 26 +- .../sendouq-match/core/SendouQMatch.ts | 17 +- .../sendouq-match/core/SkillDifference.ts | 15 +- .../core/discord-webhook.server.ts | 5 +- .../sendouq-match/core/match-timeline.ts | 6 +- .../sendouq-match/core/match.server.test.ts | 9 +- .../sendouq-match/core/match.server.ts | 21 +- .../core/reported-weapons.server.ts | 4 +- .../sendouq-match/core/skills.server.ts | 2 - .../sendouq-streams/core/streams.server.ts | 3 - .../sendouq/SQGroupRepository.server.ts | 38 +- .../sendouq/actions/q.looking.server.ts | 10 +- .../sendouq/actions/q.preparing.server.ts | 5 +- app/features/sendouq/actions/q.server.ts | 15 +- .../components/GroupCard.browser.test.tsx | 7 - app/features/sendouq/components/GroupCard.tsx | 6 +- .../sendouq/core/SendouQ.server.test.ts | 6 +- app/features/sendouq/core/SendouQ.server.ts | 82 +--- app/features/sendouq/core/groups.ts | 11 +- app/features/sendouq/core/likes.server.ts | 7 +- .../sendouq/core/ready-check.server.ts | 28 +- app/features/sendouq/q-constants.ts | 7 +- app/features/sendouq/q-utils.server.ts | 1 - app/features/sendouq/routes/q.looking.tsx | 14 +- app/features/sendouq/tests/season-clock.ts | 6 +- .../settings/actions/settings.server.ts | 3 +- .../settings/components/ModeMapPoolPicker.tsx | 3 - .../settings/match-profile-schemas.ts | 4 +- app/features/sidebar/core/StreamRanking.ts | 5 +- app/features/sidebar/core/sidebar.server.ts | 7 +- app/features/team/TeamRepository.server.ts | 25 +- app/features/team/routes/t.$customUrl.tsx | 3 +- app/features/team/team-constants.ts | 2 +- app/features/team/team-utils.ts | 16 +- app/features/theme/theme-constants.ts | 2 +- .../components/TierListGraphic.module.css | 2 +- .../tier-list-maker/hooks/useTierList.ts | 9 +- .../tier-list-maker-constants.ts | 2 +- .../tier-list-maker/tier-list-maker-utils.ts | 22 +- .../timezone/timezone-context.server.ts | 5 +- app/features/timezone/timezone-cookie.ts | 11 +- .../timezone/timezone-middleware.server.ts | 5 +- .../XRankPlacementRepository.server.ts | 21 +- app/features/top-search/routes/xsearch.tsx | 5 +- .../actions/to.$id.admin.index.server.ts | 9 +- .../to.$id.admin.registration.server.ts | 12 +- .../components/ExportDialog.test.ts | 16 +- .../components/ExportDialog.tsx | 11 +- .../routes/to.$id.admin.brackets.tsx | 5 +- .../routes/to.$id.admin.import-teams.ts | 5 +- .../routes/to.$id.admin.index.tsx | 6 +- ...d.admin.registration.$tid.browser.test.tsx | 14 +- ...ration.$tid.captain-label.browser.test.tsx | 5 +- .../routes/to.$id.admin.registration.$tid.tsx | 30 +- .../routes/to.$id.admin.staff.tsx | 5 +- ...ament-admin-registration-schemas.server.ts | 14 +- .../tournament-admin-registration-schemas.ts | 19 +- .../tournament-admin-schemas.ts | 6 +- .../BracketRepository.server.ts | 49 +-- .../actions/to.$id.brackets.server.ts | 6 +- .../components/Bracket/Elimination.tsx | 12 +- .../components/Bracket/Swiss.tsx | 6 +- .../components/Bracket/index.module.css | 12 +- .../components/Bracket/index.tsx | 8 +- .../components/BracketMapListDialog.tsx | 22 +- .../tournament-bracket/core/AbDivisions.ts | 14 +- .../core/Bracket/Bracket.ts | 57 +-- .../core/Bracket/RoundRobinBracket.ts | 6 +- .../core/Bracket/SingleEliminationBracket.ts | 9 +- .../core/Bracket/SwissBracket.ts | 22 +- .../tournament-bracket/core/Bracket/utils.ts | 7 +- .../tournament-bracket/core/Deadline.ts | 25 +- .../tournament-bracket/core/PickBan.ts | 44 +- .../core/PreparedMaps.test.ts | 5 +- .../tournament-bracket/core/PreparedMaps.ts | 19 +- .../core/Progression.test.ts | 4 +- .../tournament-bracket/core/Progression.ts | 97 ++--- .../tournament-bracket/core/Seeding.ts | 39 +- .../core/Tournament.server.ts | 96 ++--- .../core/Tournament.test.ts | 6 +- .../core/Tournament.timezone.test.ts | 3 +- .../tournament-bracket/core/Tournament.ts | 156 ++----- .../core/engine/create/builder.ts | 76 +--- .../core/engine/create/double-elimination.ts | 11 +- .../core/engine/create/helpers.test.ts | 13 - .../core/engine/create/helpers.ts | 143 ++----- .../core/engine/create/index.ts | 15 +- .../core/engine/create/round-robin.test.ts | 4 +- .../core/engine/create/round-robin.ts | 22 +- .../core/engine/create/seeding.ts | 18 +- .../core/engine/create/settings.ts | 16 +- .../core/engine/create/single-elimination.ts | 10 +- .../core/engine/create/swiss.ts | 20 +- .../tournament-bracket/core/engine/index.ts | 6 +- .../core/engine/propagation/dropped-teams.ts | 9 +- .../core/engine/propagation/helpers.ts | 167 +------- .../core/engine/propagation/report-result.ts | 7 +- .../core/engine/propagation/reset-result.ts | 6 +- .../engine/propagation/round-robin.test.ts | 27 +- .../core/engine/propagation/set.ts | 25 +- .../core/engine/propagation/store.ts | 9 +- .../core/engine/propagation/traversal.ts | 186 +-------- .../core/engine/propagation/update.test.ts | 1 - .../tournament-bracket/core/engine/status.ts | 51 +-- .../core/engine/swiss/pairing.ts | 62 +-- .../core/engine/swiss/team-status.ts | 36 +- .../tournament-bracket/core/engine/types.ts | 105 +---- .../core/executeBracketOperation.server.ts | 10 +- .../core/finalizeTournament.server.ts | 6 +- .../core/summarizer.server.ts | 28 +- .../core/tests/test-utils.ts | 6 +- .../tournament-bracket/core/toMapList.ts | 16 +- .../loaders/to.$id.brackets.server.ts | 20 +- .../routes/to.$id.brackets.tsx | 15 +- .../tournament-bracket-utils.ts | 28 +- .../TournamentLFGRepository.server.test.ts | 7 +- .../TournamentLFGRepository.server.ts | 3 +- .../TournamentMatchRepository.server.test.ts | 3 +- .../TournamentMatchRepository.server.ts | 7 +- .../actions/to.$id.matches.$mid.server.ts | 40 +- .../components/TournamentMatchActionTab.tsx | 6 +- .../components/TournamentMatchAdminTab.tsx | 10 +- .../components/TournamentMatchBanner.tsx | 7 +- .../components/TournamentMatchTabs.tsx | 2 +- .../tournament-match/core/mapList.server.ts | 11 +- .../core/reportScore.server.ts | 20 +- .../loaders/to.$id.matches.$mid.server.ts | 3 +- .../tournament-match/match-page-context.tsx | 14 +- .../routes/to.$id.matches.$mid.test.ts | 6 +- .../tournament-match-utils.ts | 1 - ...amentOrganizationRepository.server.test.ts | 3 +- ...TournamentOrganizationRepository.server.ts | 50 +-- .../actions/org.$slug.edit.server.ts | 5 +- .../tournament-organization/core/Series.ts | 5 +- .../core/SeriesTeamCount.server.ts | 6 +- .../loaders/org.$slug.edit.server.ts | 3 +- .../loaders/org.$slug.stats.server.ts | 3 +- .../routes/org.$slug.stats.test.ts | 3 +- .../tournament-organization/test-utils.ts | 17 +- .../TournamentAuditLogRepository.server.ts | 29 +- .../TournamentRepository.finalize.test.ts | 6 +- .../tournament/TournamentRepository.server.ts | 92 ++--- .../TournamentTeamRepository.server.test.ts | 5 +- .../TournamentTeamRepository.server.ts | 74 +--- .../actions/to.$id.register.server.test.ts | 8 +- .../actions/to.$id.register.server.ts | 3 +- .../tournament/components/TournamentNav.tsx | 10 +- .../tournament/core/Standings.test.ts | 15 +- app/features/tournament/core/Standings.ts | 47 +-- .../tournament/core/layout-payload.ts | 19 +- app/features/tournament/core/permissions.ts | 11 +- .../tournament/core/sets.server.test.ts | 6 +- app/features/tournament/core/sets.server.ts | 7 +- app/features/tournament/core/tiering.ts | 5 +- .../tournament/routes/to.$id.register.tsx | 6 +- app/features/tournament/routes/to.$id.tsx | 9 +- .../tournament/tournament-constants.ts | 8 +- .../tournament/tournament-context.tsx | 11 +- .../tournament-register-schemas.server.ts | 7 +- .../tournament/tournament-utils.server.ts | 18 +- .../tournament/tournament-utils.test.ts | 6 +- app/features/tournament/tournament-utils.ts | 80 +--- .../trophies/TrophyRepository.server.ts | 10 +- app/features/trophies/components/Trophy.tsx | 32 +- app/features/trophies/core/model-analysis.ts | 5 +- .../user-card/UserCardRepository.server.ts | 129 ++---- .../components/AddPrivateNoteDialog.tsx | 6 +- .../user-card/components/UserCard.tsx | 44 +- .../routes/user-card.$id.friendship.ts | 7 +- .../user-card/routes/user-card.edit.tsx | 3 +- app/features/user-card/user-card-constants.ts | 5 +- app/features/user-card/user-card-types.ts | 11 +- app/features/user-card/user-card-utils.ts | 5 +- .../user-page/UserRepository.server.ts | 33 +- .../actions/u.$identifier.art.server.ts | 4 +- .../user-page/bio-json.server.test.ts | 5 +- .../user-page/components/MutualFriends.tsx | 2 +- .../user-page/components/UserResultsTable.tsx | 5 +- .../core/build-sorting.server.test.ts | 2 - .../core/widgets/leaderboard-cache.test.ts | 4 +- .../user-page/core/widgets/utils.server.ts | 2 +- .../custom-theme-json.server.test.ts | 3 +- app/features/user-page/in-game-name.ts | 18 +- ...entifier.seasons.summary-graphic.server.ts | 3 +- .../user-page/routes/u.$identifier.builds.tsx | 3 +- .../routes/u.$identifier.seasons.stats.tsx | 3 +- app/features/user-page/user-page-constants.ts | 8 +- .../UserReportRepository.server.ts | 10 +- .../components/ReportUserDialog.tsx | 16 +- .../components/ReportsBarChart.tsx | 5 +- .../core/discord-webhook.server.ts | 5 +- .../user-report/user-report-constants.ts | 8 +- .../user-report/user-report-schemas.server.ts | 3 +- app/features/vods/VodRepository.server.ts | 3 +- app/features/vods/loaders/vods.new.server.ts | 7 +- app/features/vods/routes/vods.new.module.css | 9 +- app/features/vods/routes/vods.new.tsx | 19 +- app/features/vods/vods-constants.ts | 2 +- app/features/vods/vods-utils.test.ts | 6 +- app/form/FormField.tsx | 26 +- app/form/SendouForm.browser.test.tsx | 27 +- app/form/SendouForm.tsx | 115 ++---- app/form/UnsavedChangesGuard.tsx | 20 +- app/form/fields.ts | 40 +- app/form/fields/ArrayFormField.tsx | 22 +- app/form/fields/FormFieldWrapper.tsx | 5 +- app/form/fields/InputGroupFormField.tsx | 3 +- app/form/fields/SelectFormField.tsx | 4 +- app/form/fields/TextareaFormField.tsx | 6 +- app/form/image-field.ts | 23 +- app/form/index.ts | 2 - app/form/parse.server.ts | 42 +- app/form/types.ts | 49 +-- app/form/utils.ts | 48 +-- app/hooks/intl/useDateTimeFormat.ts | 20 +- app/hooks/intl/useFormatDistanceToNow.ts | 13 +- app/hooks/intl/useUserIntlPreference.ts | 8 +- app/hooks/useActionSubmit.ts | 8 +- app/hooks/useAutoRerender.ts | 12 +- app/hooks/useBackgroundResource.ts | 10 +- app/hooks/useCopyToClipboard.ts | 12 +- app/hooks/useDebounce.ts | 8 +- app/hooks/useDragToScroll.ts | 15 +- app/hooks/useHydrated.ts | 18 +- app/hooks/usePagination.ts | 3 +- app/hooks/usePrefersReducedMotion.ts | 6 +- app/hooks/useRecentlyReportedWeapons.ts | 9 +- app/hooks/useReloadOnNewDeploy.ts | 10 +- app/hooks/useSearchParamPagination.ts | 9 +- app/hooks/useThemeColors.ts | 6 +- app/hooks/useUnseenFriendRequests.ts | 17 +- app/hooks/useVisualViewportHeight.ts | 8 +- app/hooks/useWindowSize.ts | 6 +- app/modules/cache/index.ts | 6 +- app/modules/csv.ts | 29 +- app/modules/discord-webhook.server.ts | 16 +- app/modules/i18n/i18next.server.ts | 32 +- app/modules/i18n/loader.ts | 7 +- app/modules/i18n/locale-preload.server.ts | 6 +- app/modules/i18n/useChangeLanguage.ts | 8 +- app/modules/in-game-lists/weapon-ids.ts | 53 +-- app/modules/patreon/updater.ts | 2 +- app/modules/permissions/guards.server.ts | 12 +- app/modules/permissions/hooks.ts | 12 +- app/modules/permissions/utils.ts | 9 +- app/modules/persisted-state/hooks.ts | 5 +- .../persisted-state-test-utils.ts | 6 +- .../persisted-state/persisted-state.ts | 11 +- app/modules/redirects/core/Redirect.ts | 12 +- .../redirects/redirects-middleware.server.ts | 8 +- app/modules/redirects/routes/$.ts | 3 +- app/modules/search-params/hooks.ts | 20 +- .../search-params/search-params-test-utils.ts | 7 +- app/modules/search-params/search-params.ts | 74 +--- app/modules/search-params/store.ts | 11 +- .../balanced-map-list.ts | 37 +- .../generation.test.ts | 2 - .../starter-map.ts | 7 +- .../tournament-map-list-generator/types.ts | 5 +- app/modules/twitch/streams.ts | 66 --- app/root.tsx | 16 +- app/routines/computeLutiDivs.ts | 6 +- app/routines/list.server.ts | 7 +- app/routines/notifyScheduleTeamReminder.ts | 6 +- app/routines/syncLiveStreams.test.ts | 6 +- app/routines/syncTournamentVods.test.ts | 6 +- app/routines/vacuumDatabase.ts | 13 +- app/styles/common.css | 11 +- app/styles/vars.css | 78 +--- app/test-setup.ts | 8 +- app/utils/Test.ts | 40 +- app/utils/arrays.ts | 22 +- app/utils/compression.ts | 11 +- app/utils/dates.test.ts | 9 +- app/utils/dates.ts | 47 +-- app/utils/e2e.ts | 7 +- app/utils/git-commit.ts | 6 +- app/utils/i18n.ts | 31 +- app/utils/id.ts | 3 - app/utils/kysely.server.ts | 119 ++---- app/utils/number.ts | 65 +-- app/utils/random.ts | 14 +- app/utils/remix.server.ts | 48 +-- app/utils/remix.ts | 10 +- app/utils/request-context.server.ts | 9 +- app/utils/schema.ts | 11 +- app/utils/strings.ts | 8 +- app/utils/team-name.ts | 2 +- app/utils/types.ts | 9 +- app/utils/urls.ts | 10 +- e2e/analyzer.spec.ts | 3 - e2e/builds.spec.ts | 2 +- e2e/calendar.spec.ts | 3 - e2e/comp-analyzer.spec.ts | 17 +- e2e/global-setup.ts | 21 +- e2e/global-teardown.ts | 5 +- e2e/helpers/chat.ts | 6 +- e2e/helpers/counterpick-map-pool.ts | 5 +- e2e/helpers/factories.ts | 11 +- e2e/helpers/playwright-form.ts | 1 - e2e/helpers/playwright.ts | 44 +- e2e/helpers/tournament.ts | 12 +- e2e/object-damage-calculator.spec.ts | 2 - e2e/org.spec.ts | 9 - e2e/pages/auth/discord-authorize.ts | 7 +- e2e/pages/calendar/calendar-new-event-page.ts | 3 +- e2e/pages/calendar/events-page.ts | 6 +- e2e/pages/layout/chat-sidebar.ts | 14 +- e2e/pages/layout/mobile-nav.ts | 11 +- e2e/pages/layout/side-nav.ts | 8 +- e2e/pages/sendouq/sendouq-looking-page.ts | 5 +- e2e/pages/sendouq/sendouq-match-page.ts | 28 +- e2e/pages/team/team-page.ts | 5 +- .../tournament/tournament-brackets-page.ts | 13 +- e2e/pages/tournament/tournament-match-page.ts | 48 +-- e2e/pages/tournament/tournament-seeds-page.ts | 3 +- e2e/params.spec.ts | 11 +- e2e/scrims.spec.ts | 17 +- e2e/sendouq-match.spec.ts | 3 +- e2e/settings.spec.ts | 13 +- e2e/team.spec.ts | 3 - e2e/tournament-bracket-elimination.spec.ts | 43 +- e2e/tournament-bracket-multi-stage.spec.ts | 5 +- e2e/tournament-bracket-pick-ban.spec.ts | 15 +- e2e/tournament-bracket-round-robin.spec.ts | 25 +- e2e/tournament-bracket-swiss.spec.ts | 2 - e2e/tournament-bracket.spec.ts | 8 +- e2e/tournament-staff.spec.ts | 4 +- e2e/tournament-streams.spec.ts | 5 +- e2e/user-page.spec.ts | 4 - playwright.config.ts | 63 +-- react-router.config.ts | 4 +- scripts/benchmark-db/cases.ts | 55 +-- scripts/benchmark-db/fixtures.ts | 6 +- scripts/check-translation-jsons.ts | 8 +- scripts/collapse-single-plural-keys.ts | 30 +- scripts/create-analyzer-json.ts | 17 +- scripts/create-object-dmg-json.ts | 10 +- scripts/ensure-test-db.ts | 16 +- scripts/generate-changelog-image.ts | 5 +- scripts/generate-og-images.ts | 3 +- scripts/org-monthly-active-players.ts | 6 +- scripts/refresh-prod-db.ts | 4 - .../scanner/bootstrap-atlas-from-fixture.ts | 83 ++-- scripts/scanner/build-glyph-atlas.ts | 117 +++--- scripts/scanner/build-localized-entries.ts | 32 +- scripts/scanner/build-planner-signatures.ts | 19 +- scripts/scanner/otf-cmap.ts | 11 +- scripts/scanner/replay-frames.ts | 7 +- scripts/scanner/report.ts | 9 +- scripts/scanner/scan-vod.ts | 15 +- scripts/scanner/status-audit.ts | 38 +- scripts/scanner/vite-node.config.ts | 9 +- scripts/setup.ts | 5 +- scripts/splat3-types.ts | 11 +- scripts/swap-users.ts | 1 - scripts/sync-homemade-badges.ts | 2 - vite.config.ts | 27 +- vitest.scanner.config.ts | 11 +- vitest.unit.config.ts | 7 +- 770 files changed, 4302 insertions(+), 11417 deletions(-) diff --git a/app/components/AbilitiesSelector.tsx b/app/components/AbilitiesSelector.tsx index 041366d11..7105ea58f 100644 --- a/app/components/AbilitiesSelector.tsx +++ b/app/components/AbilitiesSelector.tsx @@ -176,28 +176,21 @@ function addAbility({ ) as BuildAbilitiesTupleWithUnknown; if (atRowIndex !== undefined && atAbilityIndex !== undefined) { - // Attempt to place the ability at a specific slot since we - // were given an atRowIndex and atAbilityIndex if (canPlaceAbilityAtSlot(atRowIndex, atAbilityIndex, ability)) { - // Assign this ability to the slot abilitiesClone[atRowIndex][atAbilityIndex] = ability.name; } } else { - // Loop through all slots and attempt to place this ability - // in the first empty one + // place in the first empty valid slot for (const [rowIndex, row] of abilitiesClone.entries()) { for (const [abilityIndex, oldAbility] of row.entries()) { if (oldAbility !== "UNKNOWN") { - // Skip any filled slots in this loop until we arrive at an empty one. continue; } if (!canPlaceAbilityAtSlot(rowIndex, abilityIndex, ability)) { - // This ability isn't valid for this slot continue; } - // Assign this ability to the slot abilitiesClone[rowIndex][abilityIndex] = ability.name; return abilitiesClone; @@ -205,6 +198,5 @@ function addAbility({ } } - // no-op if no available slots return abilitiesClone; } diff --git a/app/components/Ability.tsx b/app/components/Ability.tsx index 7f997487f..7a37edfa4 100644 --- a/app/components/Ability.tsx +++ b/app/components/Ability.tsx @@ -47,7 +47,6 @@ export function Ability({ const readonly = typeof onClick === "undefined" || ability === "UNKNOWN"; // Force "UNKNOWN" ability icons to be readonly - // Render an ability as a button only if it is meant to be draggable (i.e., not readonly) const AbilityTag = readonly ? "div" : "button"; const altText = diff --git a/app/components/ActionButton.tsx b/app/components/ActionButton.tsx index dbe76c341..2ab2acae1 100644 --- a/app/components/ActionButton.tsx +++ b/app/components/ActionButton.tsx @@ -14,16 +14,15 @@ interface ActionButtonBaseProps< TSchema extends AnySchema, TAction extends ActionsOf, > extends Omit { - /** Action schema of the route the button submits to. Only used for typing `action` and `fields`. */ + /** Route's action schema, only used for typing `action` and `fields`. */ schema: TSchema; - /** `_action` to submit, narrowed to the literals of the schema. */ action: TAction; - /** Route to submit to. Defaults to the current route. */ + /** Defaults to the current route. */ formAction?: string; formClassName?: string; - /** Fetcher to submit with, e.g. to share submitting state between buttons. Defaults to own fetcher. */ + /** e.g. to share submitting state between buttons */ fetcher?: FetcherWithComponents; - /** When set, submits only after the user confirms via a dialog. */ + /** submits only after the user confirms via a dialog */ confirm?: { dialogHeading: string; description?: React.ReactNode; diff --git a/app/components/BuildCard.tsx b/app/components/BuildCard.tsx index 124b4d598..d0bc6fec0 100644 --- a/app/components/BuildCard.tsx +++ b/app/components/BuildCard.tsx @@ -65,7 +65,7 @@ interface BuildProps { Partial< Pick >; - /** Set to false when the page context already shows the owner (e.g. their own builds page) */ + /** false when the page already shows the owner (e.g. their own builds page) */ showOwner?: boolean; canEdit?: boolean; } diff --git a/app/components/Catcher.tsx b/app/components/Catcher.tsx index 9ad37bebe..10cead5ca 100644 --- a/app/components/Catcher.tsx +++ b/app/components/Catcher.tsx @@ -29,7 +29,7 @@ export function Catcher() { window.scrollTo(0, 0); }, []); - // refresh user data to make sure it's up to date (e.g. cookie might have been removed, let's show the prompt to log back in) + // refresh user data so e.g. a removed cookie shows the prompt to log back in const hasRevalidated = React.useRef(false); React.useEffect(() => { if (!isRouteErrorResponse(error) || error.status !== 401) return; @@ -144,10 +144,7 @@ export function Catcher() { } } -/** - * A client side navigation to an URL matching no route never reaches the server, so the - * redirects (normally resolved by `redirectsMiddleware`) are checked here as well. - */ +/** Client side navigation to an unmatched URL never reaches the server, so `redirectsMiddleware`'s redirects are checked here too. */ function PageNotFound() { const location = useLocation(); const navigate = useNavigate(); diff --git a/app/components/Chart.tsx b/app/components/Chart.tsx index f192b26b0..fd049159f 100644 --- a/app/components/Chart.tsx +++ b/app/components/Chart.tsx @@ -49,14 +49,14 @@ export default function Chart({ xTicksLimit?: number; yTicksLimit?: number; xAbilityLimit?: number; - /** Marks current positions on the curve, each at ability point `x` and stat value `y` (e.g. one per build being compared). */ + /** Markers on the curve at ability point `x` / stat value `y`, e.g. one per build compared. */ highlight?: Array<{ x: number; y: number }>; - /** When true, draws dashed guide lines from the hovered point to the x- and y-axes. */ + /** dashed guide lines from the hovered point to both axes */ crosshair?: boolean; }) { const isHydrated = useHydrated(); - // Ref to the Chart.js instance, allows proper cleanup between renders to prevent "Canvas is already in use" errors + // cleanup between renders prevents "Canvas is already in use" errors const chartRef = useRef | null>(null); const chartId = React.useId(); // Chart.js re-fires the external tooltip on every redraw; track the last value to skip redundant state updates @@ -74,22 +74,19 @@ export default function Chart({ header: string; } | null>(null); - // Format dates in the tooltip header using the user's locale const { formatter: headerFormatter } = useDateTimeFormat({ weekday: "short", day: "numeric", month: "numeric", }); - // Format dates on the xAxis const { formatter: scaleFormatter } = useDateTimeFormat({ day: "numeric", month: "numeric", }); - // Get the chart colors from CSS variables const colors = useThemeColors({ - // bright "high" variants for the curve lines so they stay legible on the dark chart + // "high" variants for the curve lines so they stay legible on the dark chart accentHigh: "--color-text-accent", infoHigh: "--color-info-high", secondHigh: "--color-second-high", @@ -110,13 +107,12 @@ export default function Chart({ [colors.border, colors.borderHigh, colors.text], ); - // Make a color list to use inside ChartData for the borderColor and the external tooltip const colorList = React.useMemo( () => [colors.accentHigh, colors.infoHigh, colors.secondHigh], [colors.accentHigh, colors.infoHigh, colors.secondHigh], ); - // Distinct accent/secondary pair so the highlight markers (e.g. build 1 vs build 2) stay tellable apart in both themes + // distinct pair so highlight markers (e.g. build 1 vs build 2) stay apart in both themes const markerColors = React.useMemo( () => [colors.accentLow, colors.secondLow], [colors.accentLow, colors.secondLow], @@ -169,7 +165,6 @@ export default function Chart({ [options, datasetColors, highlight, markerColors, colors.text], ); - // Draws dashed guide lines from the hovered point to the y-axis (left) and x-axis (bottom) const crosshairPlugin = React.useMemo( () => ({ id: "crosshair", diff --git a/app/components/EmptyState.tsx b/app/components/EmptyState.tsx index 2ed9a3a24..52beace7c 100644 --- a/app/components/EmptyState.tsx +++ b/app/components/EmptyState.tsx @@ -9,7 +9,7 @@ interface EmptyStateProps { children: React.ReactNode; } -/** Renders the message shown by a page or tab that has no content, with the feature's nav icon above it. */ +/** Message for a page or tab with no content, with the feature's nav icon above it. */ export function EmptyState({ navItem, children }: EmptyStateProps) { return (
diff --git a/app/components/FormWithConfirm.tsx b/app/components/FormWithConfirm.tsx index bc06fa3bb..cc0dbb038 100644 --- a/app/components/FormWithConfirm.tsx +++ b/app/components/FormWithConfirm.tsx @@ -37,17 +37,17 @@ export function FormWithConfirm({ )[]; children?: React.ReactElement; dialogHeading: string; - /** Optional explanatory text shown below the heading in the confirm dialog */ + /** shown below the heading in the confirm dialog */ description?: React.ReactNode; submitButtonText?: string; action?: string; submitButtonTestId?: string; submitButtonVariant?: SendouButtonProps["variant"]; fetcher?: FetcherWithComponents; - /** Controls the dialog open state. When provided, no child trigger is needed. */ + /** controlled open state, no child trigger needed */ isOpen?: boolean; onOpenChange?: (isOpen: boolean) => void; - /** Confirming runs this callback instead of submitting a form (client only action) */ + /** runs instead of submitting a form (client only action) */ onConfirm?: () => void; }) { const componentsFetcher = useFetcher(); diff --git a/app/components/GameTimeline.tsx b/app/components/GameTimeline.tsx index 152e11217..5d4238079 100644 --- a/app/components/GameTimeline.tsx +++ b/app/components/GameTimeline.tsx @@ -1,11 +1,7 @@ /** - * A game's two scanned-timeline charts stacked on one shared time axis and - * plot width: per-player status bands above the objective-counter chart. - * Hovering scrubs over both — a dotted cursor line spans the charts and a - * readout next to the cursor shows the moment's elapsed time, match clock, - * scores, penalties, who was in control, who was splatted and who had their - * special ready. The chart's own tooltip is turned off in favor of the - * readout. + * A game's two scanned-timeline charts (player status bands above the objective-counter chart) + * on one shared time axis. Hovering scrubs both: a cursor line spans the charts and a readout + * shows the moment's state, replacing the chart's own tooltip. */ import clsx from "clsx"; import { memo, useRef, useState } from "react"; diff --git a/app/components/LocaleTime.tsx b/app/components/LocaleTime.tsx index 67514e95b..df95f99e2 100644 --- a/app/components/LocaleTime.tsx +++ b/app/components/LocaleTime.tsx @@ -3,24 +3,18 @@ import { useDateTimeFormat } from "~/hooks/intl/useDateTimeFormat"; import { databaseTimestampToDate } from "~/utils/dates"; interface LocaleTimeProps { - /** The date to render. Accepts a `Date` or a database timestamp (number), which is converted via `databaseTimestampToDate`. */ + /** `Date` or database timestamp */ date: Date | number; - /** Formatting options forwarded to `Intl.DateTimeFormat`. Combined with the user's locale and hour cycle preferences. */ options: Intl.DateTimeFormatOptions; - /** Optional extra class names appended to the rendered `