-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve webapp, improve mobile player, improve design ✨ #629
base: development
Are you sure you want to change the base?
Changes from 81 commits
8f350dc
1089a62
e45db84
054bb8e
382eb44
2eb8d3d
c4c7f20
d8b9f10
a9090ca
ff90922
14e5d6c
8d529ad
45bfd45
c99a649
6e22348
c74879b
2769b03
3d14818
6a636c9
d6806fb
d405cf3
18d66fa
0e2b259
2abceb3
e6061f1
aea1518
de54300
d00e6b1
46d439c
d50e02c
ac078a3
09efeff
d5bab29
912f0ed
ff4c2f5
34c4411
782df15
ca278bb
ae1f859
8dbd63e
72bfd86
f308360
9834ac4
02d011c
cf5ff44
7ab52f9
50668c9
7a0a992
691fc7a
474c004
014e90d
b16ae81
f6da39e
8c69dd2
101c461
ac072ee
51ce1b1
584acb8
e4cba7a
06130ea
edd2d8d
1081a1e
9e31fda
48198a4
097af8d
e380c7e
ba55ea9
ff2d9a9
b2fdded
a744f02
f005cc8
c817d6f
b9304b4
0fccb85
1e0a56c
51fe50f
6392137
2911efd
30f0346
25a62ad
85544ca
b791e7e
ed078e1
3513606
f357299
f15e365
596190a
1aa1c11
06e0f3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node | ||
{ | ||
"name": "Stremio Web dev container", | ||
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye", | ||
"features": { | ||
"ghcr.io/devcontainers/features/git:1": {}, | ||
"ghcr.io/devcontainers/features/git-lfs:1": {} | ||
}, | ||
"forwardPorts": [8080], | ||
"portsAttributes": { | ||
"8080": { | ||
"label": "Web Server (don't forget to manually change this port to public in the Ports tab in VS Code to access it externally)", | ||
"onAutoForward": "notify", | ||
"protocol": "https" | ||
} | ||
}, | ||
"postCreateCommand": "npm install", | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"window.menuBarVisibility": "visible", | ||
"files.autoSave" : "afterDelay", | ||
"window.commandCenter": true | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,8 @@ | |
--modal-background-color: rgba(15, 13, 32, 1); | ||
--outer-glow: 0px 0px 30px rgba(123, 91, 245, 0.37); | ||
--border-radius: 0.75rem; | ||
|
||
background-color: #161523; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you use one of the existing variables instead of creating a new one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I understood correctly, this used to change the "apple-mobile-web-app-status-bar" style? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I copied this value from the This ensures the title bar color is consistence across devices and browsers, instead of fallbacking to each browser's behavior which are inconsistent. |
||
} | ||
|
||
* { | ||
|
@@ -58,6 +60,16 @@ | |
box-shadow: none; | ||
overflow: hidden; | ||
word-break: break-word; | ||
|
||
@supports not selector(::-webkit-scrollbar) { | ||
scrollbar-width: thin; | ||
scrollbar-color: var(--overlay-color) transparent; | ||
} | ||
} | ||
|
||
html:global(.os-overlay-scrollbar) { | ||
// this makes the browser ignore the custom scrollbar styles when it bahves as an overlay on this platform | ||
// and fallbacks to using the OS scrollbar with the given properties when it's not an overlay scrollbar | ||
scrollbar-width: thin; | ||
scrollbar-color: var(--overlay-color) transparent; | ||
} | ||
|
@@ -85,12 +97,30 @@ svg { | |
} | ||
|
||
html { | ||
width: 100%; | ||
height: 100%; | ||
width: ~"calc(max(100svw, 100dvw))"; | ||
height: ~"calc(max(100svh, 100dvh))"; | ||
min-width: 640px; | ||
min-height: 480px; | ||
font-family: 'PlusJakartaSans', 'sans-serif'; | ||
overflow: auto; | ||
overscroll-behavior: none; | ||
user-select: none; | ||
touch-action: manipulation; | ||
-webkit-tap-highlight-color: transparent; | ||
|
||
--safe-area-inset-top: env(safe-area-inset-top, 0px); | ||
--safe-area-inset-right: env(safe-area-inset-right, 0px); | ||
--safe-area-inset-bottom: env(safe-area-inset-bottom, 0px); | ||
--safe-area-inset-left: env(safe-area-inset-left, 0px); | ||
--calculated-bottom-safe-inset: var(--safe-area-inset-bottom); | ||
|
||
@media (display-mode: standalone) { | ||
width: ~"calc(max(100%, 100lvw))"; | ||
height: ~"calc(max(100%, 100lvh))"; | ||
|
||
// iOS pads the bottom inset more than needed, so we deduce the actual inset size when using the webapp | ||
--calculated-bottom-safe-inset: ~"calc(min(env(safe-area-inset-bottom, 0px), max(16px, calc(100lvh - 100svh - env(safe-area-inset-top, 0px)))))"; | ||
} | ||
|
||
body { | ||
width: 100%; | ||
|
@@ -105,16 +135,19 @@ html { | |
|
||
.toasts-container { | ||
position: absolute; | ||
top: calc(1.2 * var(--horizontal-nav-bar-size)); | ||
right: 0; | ||
bottom: calc(1.2 * var(--horizontal-nav-bar-size)); | ||
top: calc(1.2 * var(--horizontal-nav-bar-size) + var(--safe-area-inset-top, 0px)); | ||
right: var(--safe-area-inset-right, 0px); | ||
bottom: calc(1.2 * var(--horizontal-nav-bar-size) + var(--calculated-bottom-safe-inset, 0px)); | ||
left: auto; | ||
z-index: 1; | ||
padding: 0 calc(0.5 * var(--horizontal-nav-bar-size)); | ||
overflow-y: auto; | ||
scrollbar-width: none; | ||
pointer-events: none; | ||
|
||
@supports not selector(::-webkit-scrollbar) { | ||
scrollbar-width: none; | ||
} | ||
|
||
&::-webkit-scrollbar { | ||
display: none; | ||
} | ||
|
@@ -183,7 +216,12 @@ html { | |
body { | ||
:global(#app) { | ||
.toasts-container { | ||
padding: 0 1rem; | ||
padding-top: 3rem; | ||
padding-left: 3rem; | ||
padding-bottom: 3rem; | ||
margin-top: -3rem; | ||
margin-left: -3rem; | ||
margin-bottom: -3rem; | ||
} | ||
|
||
.tooltip-container { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IEduStu Could you create one more branch out of mobileImprovements branch in your fork, for me to see how the new CD pipeline will behave?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
You can see the CI of a commit on the forked branch here.
I've make this change to the CI to make it deploy the build to GitHub Pages, since the existing action for this didn't work.
This new code uses GitHub Action's official actions to deploy to GitHub Pages.
To make it work for any fork, you just have to enable GitHub Actions on the fork and enable GitHub Pages in the repo settings and it would work without configuring any environment variable or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expected result is a new directory in the gh-pages branch, with the name of the new branch so that we can access it at
https://stremio.github.io/stremio-web/<new-branch-name>/
The goal is to have all branches deployed to gh pages simultaniously
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally made this change because I thought the deployment didn't work, but it seems that it did just in a different manner than I anticipated.
This is really cool :)
I see how useful it is to have it for a repo with multiple developers working on it, but I think it may lead other forks the same path that I went - thinking the deployment didn't work.
So I made another change for the CI to use the previous action when an environment variable named
GITHUB_PAGES_MULTI_BRANCH
is set totrue
, and otherwise use the simpler deploy action.This way you can set
GITHUB_PAGES_MULTI_BRANCH
totrue
in this repo settings and preserve the current behavior, and forks that people create won't inherit this environment variable and thus will have the simpler deploy action.The idea of this is to remove friction in developing this repo on forks, while preserving the current CI behavior.
Let me know if you think it's a good idea or whether should I just revert this whole CI change.