rusackas commented on code in PR #37141:
URL: https://github.com/apache/superset/pull/37141#discussion_r3651903181
##########
superset-frontend/src/dashboard/components/DashboardBuilder/state.ts:
##########
@@ -121,5 +121,6 @@ export const useNativeFilters = () => {
dashboardFiltersOpen,
toggleDashboardFiltersOpen,
nativeFiltersEnabled,
+ hasFilters: filterValues.length > 0,
Review Comment:
filterValues here is `Object.values(filters)` from `useFilters()`, which
returns the configured native filter definitions, not user-selected values (the
name's a bit misleading). So `hasFilters` is already counting configured
filters, not populated ones.
##########
docker/pythonpath_dev/superset_config.py:
##########
@@ -110,6 +110,7 @@ class CeleryConfig:
"ALERT_REPORTS": True,
"DATASET_FOLDERS": True,
"ENABLE_EXTENSIONS": True,
+ "MOBILE_CONSUMPTION_MODE": True,
Review Comment:
This dev config already flips on every experimental flag for local testing
(ALERT_REPORTS, DATASET_FOLDERS, ENABLE_EXTENSIONS...), so
MOBILE_CONSUMPTION_MODE joining that list is consistent, not a mismatch with
the default-off behavior elsewhere.
##########
superset-frontend/playwright/tests/mobile/mobile-dashboard.spec.ts:
##########
@@ -0,0 +1,326 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { test, expect, devices } from '@playwright/test';
+
+// NOTE: These tests exercise the mobile consumption experience and require
+// the MOBILE_CONSUMPTION_MODE feature flag to be enabled in the target
+// environment (FEATURE_FLAGS = {"MOBILE_CONSUMPTION_MODE": True}).
Review Comment:
superset-playwright.yml sets SUPERSET_FEATURE_MOBILE_CONSUMPTION_MODE=true
for the job that runs mobile/, so these aren't running against the flag off.
Just not visible from the spec file alone.
##########
superset-frontend/playwright/tests/mobile/mobile-navigation.spec.ts:
##########
@@ -0,0 +1,192 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { test, expect, devices } from '@playwright/test';
+
+// NOTE: These tests exercise the mobile consumption experience and require
+// the MOBILE_CONSUMPTION_MODE feature flag to be enabled in the target
+// environment (FEATURE_FLAGS = {"MOBILE_CONSUMPTION_MODE": True}).
+import { URL } from '../../utils/urls';
+import { TIMEOUT } from '../../utils/constants';
+
+/**
+ * Mobile navigation tests verify the MobileRouteGuard behavior
+ * and mobile-specific navigation patterns.
+ *
+ * These tests run with a mobile viewport to trigger mobile-specific behavior.
+ */
+
+// Use iPhone 12 viewport for mobile tests
+const mobileViewport = devices['iPhone 12'];
+
+test.describe('Mobile Navigation', () => {
+ test.use({
+ viewport: mobileViewport.viewport,
+ userAgent: mobileViewport.userAgent,
+ });
Review Comment:
Same as the mobile-dashboard.spec.ts thread, the playwright workflow sets
SUPERSET_FEATURE_MOBILE_CONSUMPTION_MODE=true for the job that runs mobile/, so
this suite does have the flag on in CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]