|
48 bytes,
text/x-phabricator-request
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
| Assignee | |
Description•1 month ago
|
Lands the Nova-only Games widget infrastructure without any actual games
registered, as the first patch in a stack that will add games one per
follow-up commit.
What ships in this shell:
- Widget registry entry (id "games") with validSizes: ["large"], plus
PREF_WIDGETS_GAMES_ENABLED, PREF_GAMES_SIZE, and
PREF_WIDGETS_SYSTEM_GAMES_ENABLED. resolveWidgetSize() now respects
validSizes for all widgets. - PREFS_CONFIG entries for widgets.games.{enabled,size,interaction,
highScores,popoutOnly} and widgets.system.games.enabled, plus matching
AboutPreferences wiring. - Games widget container (Games.jsx) with game selection, popout
(window.name "games-popout"), context menu, high-score map, and
celebration. With an empty GAME_REGISTRY it renders the welcome state. - GameEndOverlay shared component for per-game use later.
- GamesSizePromptToast: shown when the user tries to shrink Games
below its valid sizes; offers a pop-out action. Animation duration
bumped to 12s so the user can read and act. - Customize menu Games toggle (Nova WidgetsManagementPanel) gated on
mayHaveGamesWidget, with a WIDGET_GAMES telemetry event source. - Nimbus + trainhop wiring in Base.jsx (mayHaveGamesWidget,
enabledWidgets.gamesEnabled), propagated through CustomizeMenu and
ContentSection. - newtab.ftl: shell + generic gameplay strings only. preferences.ftl:
home-prefs-games-header. - Tests: WidgetsRegistry order, Widgets render-and-toggle, and
WidgetsManagementPanel toggle behaviour extended for "games".
Out of scope (follow-up commits, one per game): the 10 game modules
under Games/titles/, the per-game l10n strings, the mozmatch asset
folder, and the per-game SCSS @imports.
Adds the first game to the Games widget: MozTacToe, a 3x3 tic-tac-toe
against a CPU opponent. No high score.
- Adds Games/titles/MozTacToe/ with the React component, SCSS, and
game-logic module. - Registers it in Games/titles/index.mjs (first GAME_REGISTRY entry).
- Re-introduces the per-game SCSS @import in _Games.scss.
- Adds per-game l10n strings (game label + win/loss/draw).
Parent: Bug 2039394 Games widget shell.
Updated•20 days ago
|
Updated•20 days ago
|
Adds the second game to the Games widget: Mozong, a small Pong-style
game played against a CPU opponent. First to 5 points wins. No
persistent high score.
- Adds Games/titles/Mozong/ with the React component, SCSS, and
game-logic module. - Registers it in Games/titles/index.mjs.
- Adds the per-game SCSS @import in _Games.scss.
- Adds per-game l10n strings (game label, canvas aria-label, win/loss).
Parent: Bug 2039394 Add MozTacToe game.
Adds the third game to the Games widget: MozFour, a Connect Four-style
game played against a CPU opponent on a 7x6 board. No persistent high
score.
- Adds Games/titles/MozFour/ with the React component, SCSS, and
game-logic module. - Registers it in Games/titles/index.mjs.
- Adds the per-game SCSS @import in _Games.scss.
- Adds per-game l10n strings (game label, win/loss/draw).
Parent: Bug 2039394 Add Mozong game.
Adds the fourth game to the Games widget: MozBattle, a Battleship-style
fog-of-war game against a CPU opponent. 7x7 board with three small
ships (1x3, 1x2, 1x2). Player only sees their shots on the CPU grid;
remaining ship counts are shown for both sides above the board. No
persistent high score.
- Adds Games/titles/MozBattle/ with the React component, SCSS, and
game-logic module (auto-placement, pure shot reducers, hunt-and-
target CPU AI). - Registers it in Games/titles/index.mjs.
- Adds the per-game SCSS @import in _Games.scss and includes the
game in the shared position-relative selector list. - Adds per-game l10n strings (game label, fleet labels, status
messages for player/CPU miss/hit/sunk, win/loss).
Parent: Bug 2039394 Add MozFour game.
Updated•20 days ago
|
Updated•20 days ago
|
Updated•20 days ago
|
Updated•20 days ago
|
Updated•20 days ago
|
Updated•20 days ago
|
Updated•20 days ago
|
Updated•20 days ago
|
Updated•20 days ago
|
Updated•20 days ago
|
Lays the foundation for card-based games in the Games widget (War,
Blackjack, Poker). No new game is added in this commit; this is pure
scaffolding.
- Adds Games/deck.mjs with createDeck/shuffle/deal helpers and shared
suit/rank constants. Random is injectable for deterministic tests. - Adds Games/Card.jsx — a small renderer for a single playing card,
with face-up and face-down (diagonal-hatch back) variants. - Adds Games/_cards.scss — shared card visual treatment used by all
card-based games (border, shadow, corner labels, big center pip,
red/black colors based on suit). - Adds GameRegistryEntry.hasDifficulty (typedef in titles/types.mjs)
so games whose CPU makes no decisions (e.g. War) can suppress the
Difficulty submenu. - Wires Games.jsx to gate the Difficulty submenu by activeGame's
hasDifficulty (default true preserves existing behavior). - Adds the Card.jsx karma coverage override matching the pattern used
by other Games .jsx files.
Parent: Bug 2039394 Add MozBattle game.
Adds the fifth game to the Games widget: MozWar, a classic two-player
card game where higher rank wins both cards, with the "war" tie-break
when both players draw the same rank. No CPU strategy — outcomes are
fully determined by the shuffled deck — so the widget's Difficulty
submenu is hidden while MozWar is active.
- Adds Games/titles/MozWar/ with the React component, SCSS, and pure
game-logic module (createInitialState, playRound, getStatusId). - War declaration is a separate click: ties pause in a "warPending"
phase and show "WAR!" before the player clicks "Declare war" to
resolve the 3-face-down + 1-face-up tribute. - Registers MozWar with hasDifficulty: false in titles/index.mjs.
- Adds the per-game SCSS @import in _Games.scss.
- Adds per-game l10n strings (game label, status messages, button
labels for the war-declared state). - Adds MozWar.test.jsx covering createInitialState, playRound for
both idle and warPending phases (including war chains and
insufficient-cards edge cases), wasWar, and getStatusId. - Adds the MozWar.jsx karma coverage override matching the pattern
used by other Games .jsx files.
Parent: Bug 2039394 Add card-game shared infrastructure.
Updated•13 days ago
|
Updated•13 days ago
|
Updated•13 days ago
|
Updated•13 days ago
|
Updated•13 days ago
|
Updated•13 days ago
|
Updated•13 days ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
