-
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?
Conversation
Hi, thank you for your PR |
It wouldn't be practical to separate it into multiple PRs as all the changes affect each other and dependant on each other. I wrote the long list to detail all the changes and make it easier to CR, but essentially there are 3 main changes:
You can try the live demo of this here: https://iedustu.github.io/stremio-web/ |
I understand that it would not be practical to separate them, we will discuss which changes we want to keep or not before you do that |
Fixed.
You're right, I missed that.
Done.
Try again now, the fix should be live now. |
Thanks for fixing the banner. However, the section buttons still don't highlight correctly (still Brave on Windows 11). Brave (100% zoom) on Windows 11 (100% scaling) gives me this: Screen.Recording.2024-07-25.211246.mp4However, if I set the browser zoom to 125% or 150% it does highlight correctly. If I change the window size to something slightly smaller, it also highlights the correct section. Here is a video showing what I mean: Screen.Recording.2024-07-25.212113.mp4If you need more information please let me know. I am looking forward to this being merged. |
@Viren070 I couldn't reproduce the issue now on my machine, so I've applied a fix that I think may solve this. Also, after clicking on a section button, if the button is not focused, is scrolling down 1 pixel makes the button be focused? If the issue still happens, can you please run this script and share with me its result? console.log("innerWidth", window.innerWidth);
console.log("outerWidth", window.outerWidth);
console.log("innerHeight", window.innerHeight);
console.log("outerHeight", window.outerHeight);
console.log("devicePixelRatio", window.devicePixelRatio);
console.log("scrollTop", document.querySelector('[class^="sections-container"]')?.scrollTop);
console.log("sections", JSON.stringify(
Array.from(document.querySelector('[class^="sections-container"]').children ?? [])
.map((item) => ({
className: item.className,
offsetTop: item.offsetTop
}))
)
);
console.log("scrollPaddingTop", getComputedStyle(document.querySelector('[class^="sections-container"]')).scrollPaddingTop); |
I have tried this again and the issue still occurs
Yes.
After running this, I got the following output:
|
@Viren070 I think I found the issue and fixed it. |
@IEduStu It works! |
I just had to resolve another conflict now :/ |
@kKaskak Do you have any estimation of when will this get merged? |
@kKaskak It seems that using a streaming server stopped working on this branch and also on the development branch (via https://stremio.github.io/stremio-web/development). Do you have an idea of why it happens? |
It should be working the same as it did before |
try adding
to your server-settings.json |
src/App/styles.less
Outdated
@@ -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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
I copied this value from the WebpackPwaManifest
config in webpack.config.js
, so since it has to be hard-coded there, I thought it'd make sense to do the same here.
I've added a comment about that to make it more clear.
This ensures the title bar color is consistence across devices and browsers, instead of fallbacking to each browser's behavior which are inconsistent.
src/routes/Addons/styles.less
Outdated
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.
Here you can use variables like this at the start of the file:
@selectable-inputs-assumed-height: 84px;
@top-overlay-size: @@selectable-inputs-assumed-height;
@bottom-vertical-nav-bar-size: 0px;
@bottom-overlay-size: var(@bottom-vertical-nav-bar-size);
@overlap-size: 6rem;
@transparency-grandient-pad: 3rem;
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.
This will clear up the code of all the vars you will just use
@variable
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 used CSS variables here since I change them on some scopes based on media queries and other parameters, and it affects all the other dependant calculations.
This is impossible to do using preprocessor variables.
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.
Some of the variables are static, though, so I can extract some of them to the top of the file using preprocessor variables like you suggested, but I think it would make it more cumbersome to read when some of the variables are CSS variables and some are preprocessor variables.
Should I change only the static ones to be preprocessor variables?
height: 100%; | ||
background-color: transparent; | ||
|
||
.discover-content { | ||
--selectable-inputs-assumed-height: 84px; |
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.
You can do the same here too, use @variable
at the start of the file and define a value for it.
Then reuse as
@variable
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.
Same issue here with some variables having to be CSS variables.
Let me know what you think I should do in the other comment (#629 (comment)).
padding-right: var(--safe-area-inset-right, 0px); | ||
box-sizing: border-box; | ||
|
||
--navbar-assumed-height: 84px; |
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.
same here
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.
Here the variables are indeed all static, but I think that for consistency with the other files it may make sense to keep them css vars.
Let me know if you agree or want me to change it to preprocessor variables anyway.
I found the cause for this - the latest version of This seems to be the commit that caused this issue: 69a1a8b |
@kKaskak I see that you now fixed the issue with This PR just accrued another conflict that I had to solve... At this point, I think you can just merge it and make all the changes you want afterwards, since small formatting changes shouldn't be the reason to wait for another 2 months before reviewing this PR again, which by then I'll have to solve many more conflicts. I don't mean to be rude, but if you don't plan to merge this then please just let me know so I can stop wasting time resolving conflicts... |
@IEduStu Hi, we need you to split your changes into multiple PRs so we can review and merge them |
@tymmesyde The mobile player depends on the style changes that make the app feel more native, since it goes to great lengths to ensure that the entire screen is used when the website is installed as PWA (including the status bar and the navigation bar areas), and the mobile player heavily depends on that. I'd also like to have some sort of estimation of a timeline for that to be reviewed and merged since I don't want to work again on something and end up waiting again for another 5 months in which I have to maintain it and merge conflicts with the main branch all the time. |
Stremio is awesome and I use it a lot, so I wanted to add the missing features that I think would make its PWA on mobile (and on iOS and iPadOS in particular) first-class.
Changes
<video>
tagLive demo: https://iedustu.github.io/stremio-web/
Related pull requests I created for this effort
Devices and platforms tested with these changes
Add to homescreen
in the share menu in Safari)Add to homescreen
in the share menu in Safari)Screenshots
iOS web app
New mobile player design
New mobile player design on iOS
Mobile web
Desktop web
Screenshots of how it looked before (for reference)
iOS web app
Mobile player
Desktop web