rusackas commented on a change in pull request #11737:
URL:
https://github.com/apache/incubator-superset/pull/11737#discussion_r529807518
##########
File path: superset-frontend/src/SqlLab/components/ColumnElement.tsx
##########
@@ -18,13 +18,47 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
+import { ClassNames } from '@emotion/core';
+import { styled, useTheme } from '@superset-ui/core';
-import { OverlayTrigger, Tooltip } from 'react-bootstrap';
+import { Tooltip } from 'src/common/components/Tooltip';
const propTypes = {
column: PropTypes.object.isRequired,
};
+const StyledTooltip = (props: any) => {
+ const theme = useTheme();
+ return (
+ <ClassNames>
+ {({ css }) => (
+ <Tooltip
+ overlayClassName={css`
+ .ant-tooltip-inner {
+ max-width: ${theme.gridUnit * 125}px;
+ word-wrap: break-word;
+ text-align: center;
+
+ pre {
+ background: transparent;
+ border: none;
+ text-align: left;
+ color: ${theme.colors.grayscale.light5};
+ font-size: ${theme.typography.sizes.xs}px;
+ }
+ }
+ `}
+ {...props}
+ />
+ )}
+ </ClassNames>
+ );
+};
+
+const Hr = styled.hr`
+ margin-top: ${({ theme }) => theme.gridUnit * 1.5}px;
Review comment:
When running into cases like this, I think we should just "snap" to the
nearest grid unit that looks good... in this case either 1 or 2. Then if we
ever change gridUnit to 5px to air things out, we won't be in the strange world
of half pixels.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]