pierrejeambrun commented on code in PR #56452:
URL: https://github.com/apache/airflow/pull/56452#discussion_r2445310141


##########
airflow-core/src/airflow/ui/src/assets/selection.css:
##########
@@ -0,0 +1,81 @@
+/*!
+ * 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.
+ */
+
+/* 
+ * Fix for text selection contrast issue #56449
+ * Text selection in logs is almost invisible (extremely low contrast in 
airflow 3.1.0)
+ */
+
+/* Global high-contrast text selection */
+::selection {
+  background-color: #3182ce !important; 
+  color: #ffffff !important;
+  text-shadow: none !important;
+}
+
+::-moz-selection {
+  background-color: #3182ce !important;
+  color: #ffffff !important;
+  text-shadow: none !important;
+}
+
+/* Enhanced visibility for log content */
+pre ::selection,
+code ::selection,
+.log-viewer ::selection,
+[data-testid*="log"] ::selection {

Review Comment:
   I don't think we should rely on `data-testid` for production code. We can 
set a real 'id' or use another mechanism to identify those elements.
   
   The reason for that is because I wouldn't expect to break the code by 
modifying test ids. I would expect only tests to fail.



##########
airflow-core/src/airflow/ui/src/theme.ts:
##########
@@ -35,6 +35,107 @@ const generateSemanticTokens = (color: string, 
darkContrast: string = "white") =
 
 export const customConfig = defineConfig({
   // See https://chakra-ui.com/docs/theming/colors for more information on the 
colors used here.
+
+  // Fix for text selection contrast issue #56449
+
+  globalCss: {
+
+    "::selection": {
+
+      backgroundColor: "blue.500",
+
+      color: "white",
+
+      textShadow: "none",
+
+    },
+
+    "::-moz-selection": {
+
+      backgroundColor: "blue.500",
+
+      color: "white",
+
+      textShadow: "none",
+
+    },
+
+    "::-webkit-selection": {
+
+      backgroundColor: "blue.500",

Review Comment:
   Is this piece necessary since we now have a separate css file ? 



##########
airflow-core/src/airflow/ui/src/assets/selection.css:
##########
@@ -0,0 +1,81 @@
+/*!
+ * 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.
+ */
+
+/* 
+ * Fix for text selection contrast issue #56449
+ * Text selection in logs is almost invisible (extremely low contrast in 
airflow 3.1.0)
+ */
+
+/* Global high-contrast text selection */
+::selection {
+  background-color: #3182ce !important; 
+  color: #ffffff !important;
+  text-shadow: none !important;
+}
+
+::-moz-selection {
+  background-color: #3182ce !important;

Review Comment:
   Do we need all those `!important` we tend to try to avoid them.



##########
providers/fab/src/airflow/providers/fab/www/static/css/main.css:
##########
@@ -17,6 +17,7 @@
  * under the License.
  */
 
+

Review Comment:
   ```suggestion
   ```



-- 
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]

Reply via email to