You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/04 14:54:43 UTC

[GitHub] [superset] geido commented on a diff in pull request #19494: refactor: Removes the CSS files from the Sankey Loop plugin

geido commented on code in PR #19494:
URL: https://github.com/apache/superset/pull/19494#discussion_r841834214


##########
superset-frontend/plugins/legacy-plugin-chart-sankey-loop/src/ReactSankeyLoop.jsx:
##########
@@ -0,0 +1,72 @@
+/**
+ * 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 React from 'react';
+import { reactify, styled } from '@superset-ui/core';
+import Component from './SankeyLoop';
+
+const ReactComponent = reactify(Component);
+
+const Sankey = ({ className, ...otherProps }) => (
+  <div className={className}>
+    <ReactComponent {...otherProps} />
+  </div>
+);
+
+export default styled(Sankey)`
+  ${({ theme }) => `
+    .superset-legacy-chart-sankey-loop .node rect {
+      cursor: move;
+      fill-opacity: 0.9;
+      shape-rendering: crispEdges;
+    }
+
+    .superset-legacy-chart-sankey-loop .node text {
+      pointer-events: none;
+      text-shadow: 0 1px 0 ${theme.colors.grayscale.light5};
+    }
+
+    .superset-legacy-chart-sankey-loop .link {
+      fill: none;
+      stroke: ${theme.colors.grayscale.dark2};
+      stroke-opacity: 0.2;
+    }
+
+    .superset-legacy-chart-sankey-loop .link:hover {
+      stroke-opacity: 0.5;
+    }
+
+    .superset-legacy-chart-sankey-loop .link path {
+      opacity: 0.2;
+      stroke-opacity: 0;
+    }
+
+    .superset-legacy-chart-sankey-loop .link:hover path {
+      opacity: 0.5;

Review Comment:
   @michael-s-molina I think all opacities in this style should use the available theme vars



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org