pierrejeambrun commented on code in PR #69159:
URL: https://github.com/apache/airflow/pull/69159#discussion_r3499763651
##########
airflow-core/src/airflow/ui/src/theme.test.ts:
##########
Review Comment:
To remove, this test is useless.
##########
airflow-core/src/airflow/ui/src/theme.ts:
##########
@@ -40,7 +40,7 @@ const generateSemanticTokens = (color: string, darkContrast:
string = "white") =
focusRing: { value: { _light: `{colors.${color}.800}`, _dark:
`{colors.${color}.200}` } },
});
-const defaultAirflowTheme: ThemingConfig = {
+export const defaultAirflowTheme: ThemingConfig = {
Review Comment:
```suggestion
const defaultAirflowTheme: ThemingConfig = {
```
Not needed if test is removed.
##########
airflow-core/src/airflow/ui/src/theme.test.ts:
##########
@@ -0,0 +1,41 @@
+/*!
+ * 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 { describe, expect, it } from "vitest";
+
+import { defaultAirflowTheme } from "src/theme";
+
+type SlotRecipeWithBase = {
+ readonly base?: unknown;
+};
+
+describe("defaultAirflowTheme", () => {
+ it("adds a dark-mode outline to switch controls", () => {
+ const switchRecipe = defaultAirflowTheme.slotRecipes?.switch as
SlotRecipeWithBase | undefined;
+
+ expect(switchRecipe?.base).toMatchObject({
+ control: {
+ _checked: {
+ borderColor: "colorPalette.solid",
+ },
+ borderColor: { _dark: "border.emphasized", _light: "transparent" },
Review Comment:
I would use the same for both theme.
##########
airflow-core/src/airflow/ui/src/theme.test.ts:
##########
@@ -0,0 +1,41 @@
+/*!
+ * 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 { describe, expect, it } from "vitest";
+
+import { defaultAirflowTheme } from "src/theme";
+
+type SlotRecipeWithBase = {
+ readonly base?: unknown;
+};
+
+describe("defaultAirflowTheme", () => {
+ it("adds a dark-mode outline to switch controls", () => {
+ const switchRecipe = defaultAirflowTheme.slotRecipes?.switch as
SlotRecipeWithBase | undefined;
+
+ expect(switchRecipe?.base).toMatchObject({
+ control: {
+ _checked: {
+ borderColor: "colorPalette.solid",
+ },
Review Comment:
This doesn't seem applied.
##########
airflow-core/newsfragments/69159.bugfix.rst:
##########
Review Comment:
Yes remove the newsfragment
--
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]