From dbb1a79219b58e7f503dad23dca34b1f0e7faace Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 16 Dec 2024 10:17:20 +0100 Subject: [PATCH 1/8] fix(TextInput): submit not triggering --- src/common/TextInput/TextInput.tsx | 33 ++++++++++++------------------ 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/src/common/TextInput/TextInput.tsx b/src/common/TextInput/TextInput.tsx index b409f229c..573f69c7d 100644 --- a/src/common/TextInput/TextInput.tsx +++ b/src/common/TextInput/TextInput.tsx @@ -1,32 +1,25 @@ // Copyright (C) 2017-2024 Smart code 203358507 -import React from 'react'; +import React, { forwardRef, useCallback } from 'react'; +import { type KeyboardEvent, type InputHTMLAttributes } from 'react'; import classnames from 'classnames'; import styles from './styles.less'; -type Props = React.InputHTMLAttributes & { +type Props = InputHTMLAttributes & { className?: string; disabled?: boolean; - onKeyDown?: (event: React.KeyboardEvent) => void; - onSubmit?: (event: React.KeyboardEvent) => void; + onKeyDown?: (event: KeyboardEvent) => void; + onSubmit?: (event: KeyboardEvent) => void; }; -const TextInput = React.forwardRef((props, ref) => { - const { onSubmit, className, disabled, ...rest } = props; +const TextInput = forwardRef((props, ref) => { + const onKeyDown = useCallback((event: KeyboardEvent) => { + props.onKeyDown && props.onKeyDown(event); - const onKeyDown = React.useCallback((event: React.KeyboardEvent) => { - if (typeof props.onKeyDown === 'function') { - props.onKeyDown(event); + if (event.key === 'Enter' ) { + props.onSubmit && props.onSubmit(event); } - - if ( - event.key === 'Enter' && - !(event.nativeEvent as any).submitPrevented && - typeof onSubmit === 'function' - ) { - onSubmit(event); - } - }, [props.onKeyDown, onSubmit]); + }, [props.onKeyDown, props.onSubmit]); return ( ((props, ref) => { autoComplete={'off'} spellCheck={false} tabIndex={0} + {...props} ref={ref} - className={classnames(className, styles['text-input'], { disabled })} + className={classnames(props.className, styles['text-input'], { 'disabled': props.disabled })} onKeyDown={onKeyDown} - {...rest} /> ); }); From b45a99296eb53859b1ae69e22c97d3ddfae946dd Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Tue, 10 Dec 2024 20:31:38 +0200 Subject: [PATCH 2/8] fix: speed menu overflow issue --- src/routes/Player/SpeedMenu/styles.less | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/routes/Player/SpeedMenu/styles.less b/src/routes/Player/SpeedMenu/styles.less index 12c3ea725..4305d5d01 100644 --- a/src/routes/Player/SpeedMenu/styles.less +++ b/src/routes/Player/SpeedMenu/styles.less @@ -1,10 +1,9 @@ -// Copyright (C) 2017-2023 Smart code 203358507 +// Copyright (C) 2017-2024 Smart code 203358507 @import (reference) '~@stremio/stremio-colors/less/stremio-colors.less'; .speed-menu-container { width: 14rem; - overflow: visible !important; .title { flex: none; @@ -18,7 +17,6 @@ flex: 0 1 auto; max-height: calc(3.2rem * 8); padding: 0 1rem 0.5rem; - overflow-y: auto; .option { height: 3.2rem; From 07570f99b672339953cd96e9a04ad69b2c5dae07 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 16 Dec 2024 12:40:03 +0200 Subject: [PATCH 3/8] fix: remove blue select box from the buttons --- src/common/Button/styles.less | 1 + src/common/RadioButton/RadioButton.less | 1 + 2 files changed, 2 insertions(+) diff --git a/src/common/Button/styles.less b/src/common/Button/styles.less index 6a26b3b7f..6baf8b7aa 100644 --- a/src/common/Button/styles.less +++ b/src/common/Button/styles.less @@ -6,6 +6,7 @@ outline-width: var(--focus-outline-size); outline-color: @color-surface-light5; outline-offset: calc(-1 * var(--focus-outline-size)); + -webkit-tap-highlight-color: transparent; cursor: pointer; &:focus { diff --git a/src/common/RadioButton/RadioButton.less b/src/common/RadioButton/RadioButton.less index 7e414a521..4f3380147 100644 --- a/src/common/RadioButton/RadioButton.less +++ b/src/common/RadioButton/RadioButton.less @@ -24,6 +24,7 @@ outline-width: var(--focus-outline-size); outline-color: @color-surface-light5; outline-offset: calc(-1 * var(--focus-outline-size)); + -webkit-tap-highlight-color: transparent; input[type='radio'] { opacity: 0; From 5f3a9204b9351ce4f447d154f6b01e106cdcf7f4 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 16 Dec 2024 13:00:09 +0200 Subject: [PATCH 4/8] fix: colorInput component styles --- src/common/ColorInput/styles.less | 1 - src/routes/Settings/styles.less | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/ColorInput/styles.less b/src/common/ColorInput/styles.less index 7ed494061..56bd1f601 100644 --- a/src/common/ColorInput/styles.less +++ b/src/common/ColorInput/styles.less @@ -17,7 +17,6 @@ align-items: center; justify-content: center; padding: 0 0.5rem; - border: thin solid @color-surface-light5-20; pointer-events: none; .transparent-label { diff --git a/src/routes/Settings/styles.less b/src/routes/Settings/styles.less index a8dd1a990..dc0c2f2ef 100644 --- a/src/routes/Settings/styles.less +++ b/src/routes/Settings/styles.less @@ -316,7 +316,14 @@ } &.color-input-container { - padding: 1.75rem 1rem; + padding: 1.3rem 1rem; + border-radius: 3rem; + border: 2px solid transparent; + transition: 0.3s all ease-in-out; + + &:hover { + border-color: var(--overlay-color); + } } &.info-container { From 6b9be4367164cf57378406f2218c62a6aab75a10 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 16 Dec 2024 13:05:29 +0200 Subject: [PATCH 5/8] fix: use the default height set in the component MutliSelect --- src/routes/Settings/styles.less | 1 - 1 file changed, 1 deletion(-) diff --git a/src/routes/Settings/styles.less b/src/routes/Settings/styles.less index a8dd1a990..87defe996 100644 --- a/src/routes/Settings/styles.less +++ b/src/routes/Settings/styles.less @@ -286,7 +286,6 @@ } .multiselect-menu-container { - max-height: calc(3.2rem * 7); overflow: auto; } } From 976992b28efdcfa9745b7c798e3dd26975c3406c Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 16 Dec 2024 12:10:29 +0100 Subject: [PATCH 6/8] fix(BottomSheet): was hidden on ipad pro in portait mode --- src/common/BottomSheet/BottomSheet.less | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/BottomSheet/BottomSheet.less b/src/common/BottomSheet/BottomSheet.less index e0d756477..4ac68ead6 100644 --- a/src/common/BottomSheet/BottomSheet.less +++ b/src/common/BottomSheet/BottomSheet.less @@ -87,7 +87,13 @@ } } -@media only screen and (min-width: @xsmall) { +@media only screen and (min-width: @small) and (orientation: portait) { + .bottom-sheet { + display: none; + } +} + +@media only screen and (min-width: @xsmall) and (orientation: landscape) { .bottom-sheet { display: none; } From aba6c48281e4e4d25ecc304af66c40020f5c2fae Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 16 Dec 2024 12:34:57 +0100 Subject: [PATCH 7/8] fix(Calendar): hover only on pointer fine --- src/routes/Calendar/Table/Cell/Cell.less | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/routes/Calendar/Table/Cell/Cell.less b/src/routes/Calendar/Table/Cell/Cell.less index 1d54855bc..1a0f16d7e 100644 --- a/src/routes/Calendar/Table/Cell/Cell.less +++ b/src/routes/Calendar/Table/Cell/Cell.less @@ -128,8 +128,10 @@ border-color: var(--primary-foreground-color); } - &:not(.active):hover { - border-color: var(--overlay-color); + @media (pointer: fine) { + &:not(.active):hover { + border-color: var(--overlay-color); + } } } From afe21186e35e1d0285c894d02b2f360fe7ae955c Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 16 Dec 2024 12:41:14 +0100 Subject: [PATCH 8/8] 5.0.0-beta.14 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f718128ff..2ac27cb5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "stremio", - "version": "5.0.0-beta.13", + "version": "5.0.0-beta.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "stremio", - "version": "5.0.0-beta.13", + "version": "5.0.0-beta.14", "license": "gpl-2.0", "dependencies": { "@babel/runtime": "7.26.0", diff --git a/package.json b/package.json index 0fb7e8824..bec340a54 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stremio", "displayName": "Stremio", - "version": "5.0.0-beta.13", + "version": "5.0.0-beta.14", "author": "Smart Code OOD", "private": true, "license": "gpl-2.0",