From a6b973c7127d5d4745277ae098de149befcdc8db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Wed, 2 Aug 2023 11:53:59 +0200 Subject: [PATCH 1/7] fixed undraggable desktop window bug --- src/components/Pressable/GenericPressable/index.js | 4 +++- web/index.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Pressable/GenericPressable/index.js b/src/components/Pressable/GenericPressable/index.js index 859552e10cf3..34924d1791ec 100644 --- a/src/components/Pressable/GenericPressable/index.js +++ b/src/components/Pressable/GenericPressable/index.js @@ -14,7 +14,9 @@ const WebGenericPressable = forwardRef((props, ref) => ( aria-label={props.accessibilityLabel} aria-labelledby={props.accessibilityLabelledBy} aria-valuenow={props.accessibilityValue} - nativeID={props.nativeID || 'no-drag-area'} + nativeID={props.nativeID} + dataSet={{id: 'pressable'}} + className="ASDASD" /> )); diff --git a/web/index.html b/web/index.html index d207fa54b97a..8507b990848b 100644 --- a/web/index.html +++ b/web/index.html @@ -41,7 +41,7 @@ #drag-area { -webkit-app-region: drag; } - #no-drag-area { + #no-drag-area, #drag-area [class*="touchAction"] { -webkit-app-region: no-drag; } input::placeholder { From 653099be1456b56c49155d302b2abf6272652a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Fri, 4 Aug 2023 10:28:16 +0200 Subject: [PATCH 2/7] removed unnecessary changes + fixed ThreePaneView --- src/components/Pressable/GenericPressable/index.js | 2 -- .../createResponsiveStackNavigator/ThreePaneView.js | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Pressable/GenericPressable/index.js b/src/components/Pressable/GenericPressable/index.js index 34924d1791ec..ec5976a6db0b 100644 --- a/src/components/Pressable/GenericPressable/index.js +++ b/src/components/Pressable/GenericPressable/index.js @@ -15,8 +15,6 @@ const WebGenericPressable = forwardRef((props, ref) => ( aria-labelledby={props.accessibilityLabelledBy} aria-valuenow={props.accessibilityValue} nativeID={props.nativeID} - dataSet={{id: 'pressable'}} - className="ASDASD" /> )); diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/ThreePaneView.js b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/ThreePaneView.js index 2f9a899191bf..5b92a1304c26 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/ThreePaneView.js +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/ThreePaneView.js @@ -71,6 +71,7 @@ function ThreePaneView(props) { onPress={() => props.navigation.goBack()} accessibilityLabel={translate('common.close')} accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON} + nativeID="no-drag-area" /> {props.descriptors[route.key].render()} From be90cd0fb047583da962655e7238f2965ac6e5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Tue, 8 Aug 2023 08:42:12 +0200 Subject: [PATCH 3/7] review changes --- src/components/Pressable/GenericPressable/index.js | 1 + web/index.html | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Pressable/GenericPressable/index.js b/src/components/Pressable/GenericPressable/index.js index ec5976a6db0b..83514320f84f 100644 --- a/src/components/Pressable/GenericPressable/index.js +++ b/src/components/Pressable/GenericPressable/index.js @@ -15,6 +15,7 @@ const WebGenericPressable = forwardRef((props, ref) => ( aria-labelledby={props.accessibilityLabelledBy} aria-valuenow={props.accessibilityValue} nativeID={props.nativeID} + dataSet={{tag: 'pressable'}} /> )); diff --git a/web/index.html b/web/index.html index 8507b990848b..cef8056dcc02 100644 --- a/web/index.html +++ b/web/index.html @@ -41,8 +41,9 @@ #drag-area { -webkit-app-region: drag; } - #no-drag-area, #drag-area [class*="touchAction"] { + #no-drag-area, #drag-area [data-tag="pressable"] { -webkit-app-region: no-drag; + } input::placeholder { user-select: none; From cd12636ebece3a40b02fa6d6bddafcd7c32d154c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Tue, 8 Aug 2023 09:27:31 +0200 Subject: [PATCH 4/7] changed nativeIDs to data-drag-area --- src/components/Modal/BaseModal.js | 2 +- src/components/Pressable/GenericPressable/index.js | 2 +- .../createResponsiveStackNavigator/ThreePaneView.js | 2 +- src/pages/home/HeaderView.js | 2 +- src/pages/home/sidebar/SidebarLinks.js | 2 +- web/index.html | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/Modal/BaseModal.js b/src/components/Modal/BaseModal.js index 6d5bd5390416..5be90386baac 100644 --- a/src/components/Modal/BaseModal.js +++ b/src/components/Modal/BaseModal.js @@ -171,7 +171,7 @@ class BaseModal extends PureComponent { ...modalPaddingStyles, }} ref={this.props.forwardedRef} - nativeID="no-drag-area" + dataSet={{dragArea: false}} > {this.props.children} diff --git a/src/components/Pressable/GenericPressable/index.js b/src/components/Pressable/GenericPressable/index.js index 83514320f84f..65fca85bc324 100644 --- a/src/components/Pressable/GenericPressable/index.js +++ b/src/components/Pressable/GenericPressable/index.js @@ -15,7 +15,7 @@ const WebGenericPressable = forwardRef((props, ref) => ( aria-labelledby={props.accessibilityLabelledBy} aria-valuenow={props.accessibilityValue} nativeID={props.nativeID} - dataSet={{tag: 'pressable'}} + dataSet={{tag: 'pressable', ...(props.noDragArea && {dragArea: false})}} /> )); diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/ThreePaneView.js b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/ThreePaneView.js index 5b92a1304c26..d6b1d19e52bf 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/ThreePaneView.js +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/ThreePaneView.js @@ -71,7 +71,7 @@ function ThreePaneView(props) { onPress={() => props.navigation.goBack()} accessibilityLabel={translate('common.close')} accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON} - nativeID="no-drag-area" + noDragArea /> {props.descriptors[route.key].render()} diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 85cdd239dae7..f8f137d86039 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -138,7 +138,7 @@ function HeaderView(props) { return ( {props.isSmallScreenWidth && ( diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 5747ed0e1d4a..b9d52d9ab357 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -165,7 +165,7 @@ class SidebarLinks extends React.PureComponent {
-
+