Skip to content

Frontend migration to the new visual language#3436

Open
zurdi15 wants to merge 256 commits into
masterfrom
chore/frontend-v2
Open

Frontend migration to the new visual language#3436
zurdi15 wants to merge 256 commits into
masterfrom
chore/frontend-v2

Conversation

@zurdi15

@zurdi15 zurdi15 commented May 26, 2026

Copy link
Copy Markdown
Member

Description
Explain the changes or enhancements you are proposing with this pull request.

  • New RomM UI library built from scratch with a new design language and optimized specifically for RomM. Removed Vuetify entirely.
  • Developed with Storybook as a build, test and document components framework.
  • Redesigned the whole frontend to improve UX and UI flow. Released as alpha
  • New soundtrack feature: now RomM will detect soundtracks inside the soundtrack folder for a multi-part game and will be able to play them directly from RomM
  • New screenshots folder detection: now RomM will be able to detect images inside the screenshots folder and show them in the game details
  • Added new widget section at the home page (New UI only)
  • Merged the console mode into the standard RomM UI: now the standard UI is controller friendly. Will be worked and improved over time (New UI only)
  • Added a gamepad debug section in the settings to check the controler works properly (New UI only)
  • Added a changelog dialog to avoid going to github to check new features/bug fixes (New UI only)

NOTE
New UI is not responsive yet. Mobile version is on the works but won't be released with the first iteration of the New UI.

Next step
Migrate the New UI from plain css to tailwind

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Screenshots (if applicable)

home platform_index collection_index details settings scan play

zurdi15 and others added 30 commits April 20, 2026 15:29
Bring in manual/soundtrack backend + shared frontend code so v2 can expose
the new media features. Resolved RomM.vue by keeping both the v2 gate and
the app-wide SoundtrackMiniPlayer; took the branch's uv.lock.
…ton styles

feat: add PlatformsIndex.vue for displaying a grid of platforms with loading skeletons

fix: update bcrypt version to 4.0.1 and adjust dependencies in uv.lock
… and usability

- Introduced AuthCard component to standardize the layout of authentication views.
- Added AuthBackLink component for consistent navigation back to the login page.
- Replaced password input fields in Login, Register, and ResetPassword views with PasswordField component for better encapsulation of show/hide functionality.
- Removed GameContextMenu component and related context menu logic, transitioning to MoreMenu for per-ROM actions.
- Updated AppLayout and AuthLayout to utilize useThemeClass for theme management.
- Cleaned up unused variables and styles across various components to enhance maintainability.
…ndex and PlatformsIndex to use new components
…brary management, metadata sources, server stats, user interface, and user profile

- Implemented Administration view with UsersTable, TokensTable, and Tasks components.
- Created ClientApiTokens view with ClientTokensTable component.
- Developed LibraryManagement view with tabs for FolderMappings, Excluded, and MissingGames.
- Added MetadataSources view displaying API key and connection status for various metadata providers.
- Introduced ServerStats view for displaying library-wide totals and per-platform breakdowns.
- Established UserInterface view for toggling between v1 and v2 UI versions, theme selection, and language settings.
- Rewrote UserProfile view for managing account details, avatar, and linked services, integrating RetroAchievements component.
- Implemented RSliderBtnGroup as a segmented/tab control with a sliding indicator.
- Created stories for different variants: Segmented, Tab, and Disabled.
- Added types for SliderBtnGroupItem to define item structure.
- Introduced RSpinner component for inline loading states with stories.
- Developed RList and RListItem components with stories for list display.
- Created RToolbar component for toolbar layout with customizable properties.
- Added RTooltip component for tooltips with various activator patterns.
- Updated imports in EmulatorJS and LibraryManagement views to reflect new component paths.
…m styling

Co-authored-by: Copilot <copilot@github.com>
…meCard and useGameActions

Co-authored-by: Copilot <copilot@github.com>
Add Vitest 4 with happy-dom, @vue/test-utils, and a single
test/storybook.test.ts that auto-discovers every story under
src/v2/lib and runs its play() via composeStories — no Playwright,
just composition-based interaction tests. 89 stories now smoke-pass
in CI.

Scripts: lint:fix (auto-fix), lint (now scoped to ./src/v2; v1 is
frozen), lint:all (legacy sweep), test, test:watch, test:ui,
storybook:test.

eslint.config.js gets argsIgnorePattern: "^_" so unused-by-design
parameters can use the underscore convention.

CI: new frontend.yml runs lint, test, build in parallel on
frontend/** changes; typecheck.yml bumped to Node 22 with cached
npm ci. Existing typecheck job preserved for branch protection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop unused imports (RTooltip in MetadataProviderChips, BackBtn in
GameDetails). Add aria-label to NotesTab textarea and proper
for/id pairing to its public-toggle checkbox label. Mark Home's
favoriteRoms with eslint-disable-next-line (false positive: used
in <template> but @typescript-eslint/no-unused-vars with
projectService doesn't see Vue templates).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
scripts/build-tokens.ts emits src/v2/styles/tokens.css with explicit
naming overrides for the special cases (--r-row-pad, --r-elev-*,
--r-nav-h, abbreviated layout vars). tsx wired into devDeps;
build:tokens script + predev/prebuild hooks keep the CSS in sync.

Backfill missing tokens that lived only in CSS: --r-color-fav
joins colorBrand, and the focus colors in colorDark / colorLight
match the translucent values components actually consume (not the
unused #ffffff / #111117 they used to declare). Drop the orphan
--r-focus-ring-color (zero references in the codebase).

Adopt --r-radius-card (14px) for RMenuPanel and RDialog instead of
hard-coded 14px; switch a NotesTab badge from 10px to --r-radius-lg.
Closes the "panels use 14px not --r-radius-lg" pitfall — the
constitution no longer needs that footnote.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ancy

build-tokens.ts: import the source as .js (compatible with vue-tsc
without enabling allowImportingTsExtensions), wrap top-level await
in main(), drop a leftover unused helper. Doc strings now point to
"npm run build:tokens" — the script name avoids npm's reserved
"token" subcommand. Header in the regenerated tokens.css matches.

AppLayout, AuthLayout and PairShell: drop the redundant
"r-v2 r-v2-{dark|light}" classes from their root divs. RomM.vue
already toggles those on <html>, which covers both the in-tree
shell and any teleported overlays — anchoring them again on the
layout root was harmless duplication that complicated the v1 →
v2-only cleanup. Each layout keeps its own BEM root class
(.r-v2-shell, .r-v2-auth, .r-v2-pair-shell) for its scoped styles.
useThemeClass becomes unused and is removed; when v1 is deleted,
the only thing left to clean is the toggle in RomM.vue.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gantoine gantoine added the on-hold Pending further research or blocked by another issue label May 31, 2026
zurdi15 and others added 14 commits June 4, 2026 18:55
…croll remains at the top for better user experience
…s layout and remove LibraryToolsLayout component
- Updated localization files for multiple languages to include new keys for collection kinds (standard, smart, virtual) and visibility (public, private).
- Enhanced CollectionListHeader and CollectionListRow components to support sorting by visibility and display appropriate labels.
- Modified CollectionTile component to show visibility status for owner-managed collections.
- Updated CollectionsIndex view to implement segmented filters for kind and visibility, allowing users to filter collections based on these criteria.
- Adjusted styles for new visibility and kind indicators in collection components.
Adopt master's ROM schema design (sibling_roms + files, batched
get_files_for_roms / get_siblings_for_roms) while preserving the v2-branch
features master lacks: per-user is_main_sibling on siblings and audio_meta
on rom files.

Conflict resolution:
- responses/rom.py: keep master's sibling_roms/files fields; re-graft
  is_main_sibling via SiblingRomSchema.from_rom(rom, is_main_sibling=...);
  restore the eager-relationship fallback in
  SimpleRomSchema.from_orm_with_request (None sentinel) so the v2
  /{id}/simple endpoint still returns siblings/files.
- roms_handler.py: get_siblings_for_roms now left-joins RomUser and returns
  (Rom, is_main_sibling) tuples; keep both branch and master file helpers.
- drop the redundant branch-only sibling_ids field and
  get_sibling_data_for_roms.
- generated types resolved to match (sibling_roms + files; RomFileSchema
  keeps audio_meta and gains archive_members).
- update v2 components and the RelatedGameCard mock to read sibling_roms.
- fix stale exclude={"siblings"} -> "sibling_roms" in scan emit payloads.
- re-chain the audio_meta migration as 0083 (after master's 0082) to keep a
  single Alembic head.
- package.json: union of branch tooling + master dependency bumps; lock
  regenerated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gantoine gantoine changed the title feat: Frontend full migration to the new visual language Frontend migration to the new visual language Jun 16, 2026
@gantoine gantoine removed the on-hold Pending further research or blocked by another issue label Jun 16, 2026
zurdi15 added 5 commits June 16, 2026 10:24
…timization

- Deleted the V2_PLAN.md file which contained the full UI overhaul plan for the RomM frontend.
- Updated vite.config.js to exclude vue-i18n from pre-bundling to fix issues with Vite 8's Rolldown dependency optimizer.
- Updated `useGameActions` to improve navigation handling during game play.
- Modified `RMenu` to allow modifier-clicks on links to open in new tabs without closing the menu.
- Added new stories and tests for `RMenuItem` to ensure correct behavior for new-tab gestures.
- Introduced `colorCoverArt` for procedural cover-art generation, ensuring consistent styling across missing and unmatched cover images.
- Implemented SVG generation for cover art in `covers.ts`, providing unique visuals for identified and unidentified ROMs.
- Enhanced `EmulatorJS` and `Ruffle` views to support dynamic cover art based on selected styles, improving user experience during gameplay.
- Refactored cover image handling to support animations and maintain aspect ratios.
- Added new dependencies including @one-ini/wasm and @oxc-parser bindings for various platforms in package-lock.json.
- Updated vitest to version 4.1.8 with its dependencies.
- Removed exclusion of vue-i18n from Vite's optimizeDeps configuration to improve dependency optimization.

@gantoine gantoine left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished backend for now, will do frontend later

# `with_details` decorator) pass neither and fall back to the
# eager-loaded relationships. `None` (not provided) is distinct from an
# explicit empty list (e.g. the gallery list, which intentionally omits
# files unless `with_files` is set).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could probably improve this case, but AFTER this is merged

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah for sure. A lot of the stuff I needed to do in the backend for some of the new features needs to be revisited 100%

Comment thread backend/endpoints/roms/manual.py Outdated
router = APIRouter()

MANUAL_FOLDER = "manual"
ALLOWED_MANUAL_EXTENSIONS = frozenset({".pdf"})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe markdown .md files too?

@zurdi15 zurdi15 Jun 16, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! great idea, but then more logic needs to be added to render the pdf reader component or the markdown renderer

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for manuals and any other similar media (guide books, art books, etc.) we should allow .cbr and .cbz, in addition to .pdf. When I worked on my guide book PR I thought about markdown files but then just figured anything like that can be captured in the Notes section, probably a more appropriate place for things where markdown is desirable.

Comment thread backend/endpoints/roms/soundtrack.py Outdated
zurdi15 added 2 commits June 17, 2026 01:27
- Added "esbuild" version "^0.28.1" to frontend package overrides.
- Updated "exclude-newer-package" in pyproject.toml to include "vcrpy" with a date of "2026-06-17".
- Modified uv.lock to reflect the new "vcrpy" version "8.2.1" and removed platform-specific markers for dependencies.
* entry below if the default convention does not produce the desired CSS
* variable name. Re-run `npm run build:tokens`.
*/
import { writeFile, readFile } from "node:fs/promises";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're uh, gonna have to explain the purpose of this file in human form

@gantoine gantoine left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the frontend is looking like a real serious codebase 🔥 🔥 🔥 🔥 🔥

@@ -67,6 +70,7 @@ export function getUnmatchedCoverImage(name: string): string {
return strToObjUrl(svgString);
}

/** @deprecated v2 forks this in `@/v2/utils/covers`. Use that from v2 code. */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice marking these as deprecated 👍🏼

Comment thread frontend/package.json
"lint": "eslint ./src --ext .vue,.js,.ts --quiet"
"lint": "eslint ./src/v2 --ext .vue,.js,.ts --quiet",
"lint:fix": "eslint ./src/v2 --ext .vue,.js,.ts --fix",
"lint:all": "eslint ./src --ext .vue,.js,.ts --quiet",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these necessary when trunk handles linting?

Comment thread CLAUDE.md
- Player canvas → `--r-color-canvas-bg`, `--r-color-canvas-bg-deep`.
- Emphasis pill (always-white-on-dark "Play" CTA over cover art) → `--r-color-overlay-emphasis-bg/-fg/-bg-hover`.

If a literal would otherwise be needed, the answer is: **add a token**. Update `src/v2/tokens/index.ts`, run `npm run build:tokens`, then consume via `var(--r-color-...)` (CSS) or by importing the named export (TS/JS — e.g., `colorCanvas`, `colorOverlay`).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is great but a little long, let's merge it as-is and i'll massage these into separate skills

Comment thread pyproject.toml
@@ -57,6 +60,7 @@ dependencies = [
"watchfiles ~= 1.1",
"yarl ~= 1.14",
"zipfile-inflate64 ~= 0.1",
"bcrypt<4.1",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brcypt twice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants