Commit graph

17 commits

Author SHA1 Message Date
Botzy
1617b6d2ab Merge branch 'development' into feat/react-router 2026-05-08 13:28:06 +03:00
Timothy Z.
0785fbfc51 feat: improve detection fullscreen compAtibility 2026-05-04 19:49:14 +03:00
Botzy
79c9fa475d fix: apply suggested fixes 2026-04-30 17:39:00 +03:00
Botzy
7547348332 Merge branch 'development' into feat/react-router 2026-04-30 16:40:35 +03:00
AK
b2eec31114 Merge branch 'development' into fix/fullscreen-state-desync-on-route-change
Resolves a conflict in src/App/App.js between the new GamepadProvider
(landed via #882 on development) and FullscreenProvider on this branch.
Both wrap parts of the app tree at the same point.

Resolution: nest as <GamepadProvider> > <ShortcutsProvider> >
<FullscreenProvider>. FullscreenProvider stays innermost so it remains
inside ShortcutsProvider — required for the onShortcut('fullscreen', ...)
subscription added in 35b100767. Both ShortcutsModal and GamepadModal
render as siblings inside FullscreenProvider. NavBar conflict
auto-merged cleanly (kept useFullscreen import, added gamepad-nav hook).

Lint and types clean on App.js, HorizontalNavBar.js, FullscreenProvider.tsx.
2026-04-29 09:45:59 -04:00
Timothy Z.
0c1af71aa9 Merge remote-tracking branch 'origin/development' into feat/gamepad-support
# Conflicts:
#	package-lock.json
#	package.json
#	src/App/App.js
#	src/routes/Player/Player.js
#	src/routes/Settings/General/General.tsx
2026-04-28 16:47:48 +03:00
AK
b7f7a3d2ed fix(fullscreen): consume FullscreenProvider, remove per-instance state
useFullscreen is now a thin useContext consumer of FullscreenProvider,
so all callers share a single fullscreen state owned by the app root.

Why this fixes the desync bug:

stremio-router keeps multiple route layers mounted at once, and each
top-level route (Board, Discover, Library, Calendar, Addons, Settings,
Search) renders its own MainNavBars -> HorizontalNavBar -> useFullscreen.
The previous hook held local useState plus its own listeners, so each
route had an independent boolean. Entering fullscreen, then navigating
to another tab, mounted a fresh hook initialized to false; the icon
flipped back to "enter fullscreen" and clicking it re-requested
fullscreen on top of the existing one, leaving the UI unresponsive
until a route remount happened to coincide with reality.

With one provider above the router, state outlives route remounts and
listeners are attached exactly once. The hook's return tuple shape
([fullscreen, requestFullscreen, exitFullscreen, toggleFullscreen]) is
preserved, so all three call sites (HorizontalNavBar, NavMenuContent,
Player) keep working with no API change.

Also removes the legacy src/common/useFullscreen.ts and routes its
imports through stremio/common/Fullscreen (and the stremio/common
barrel for App.js / Player).

Note: MainNavBars is still rendered per-route. Lifting it to a single
app-level layout above the router is a worthwhile follow-up (eliminates
6+ duplicate mounts) but carries non-trivial CSS / useRouteFocused /
stacked-route risk and is out of scope for this PR; tracking separately.

Made-with: Cursor
2026-04-27 01:52:02 -04:00
Timothy Z.
c8592d5610 feat: use an icon for hdr badge 2026-04-21 13:22:35 +03:00
Tim
64b13d6092 chore: move assets to dedicated folder 2026-01-14 04:39:34 +01:00
Botzy
75f0820a10 fix(MetaItem): horizontal nav - go back to main origin instead using window history 2025-07-21 19:40:37 +03:00
Botzy
7b92a11727 feat: use navigate instead of window.history 2025-05-15 14:25:05 +03:00
Botzy
39bfd7cc22 fix: issue with hook imports 2025-04-02 13:46:46 +03:00
Botzy
83571fdd26 Merge branch 'development' into feat/gamepad-support 2025-04-01 16:53:01 +03:00
Tim
e0d1662f86 feat(shell): implement escape key fullscreen behavior 2025-04-01 12:23:42 +02:00
Botzy
91ee610023 feat(MetaDetails): added gamepad support 2025-03-28 17:26:50 +02:00
Botzy
96164511b5 feat(GamepadSupport): added support for HorizontalNavBar 2025-03-28 15:24:38 +02:00
Tim
003881d06d refactor: move components to their own folder 2024-12-31 18:34:22 +01:00
Renamed from src/common/NavBar/HorizontalNavBar/HorizontalNavBar.js (Browse further)