You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ju...@apache.org on 2023/10/17 19:33:15 UTC
[superset] branch master updated: fix: warning of nth-child (#23638)
This is an automated email from the ASF dual-hosted git repository.
justinpark pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 16cc089b19 fix: warning of nth-child (#23638)
16cc089b19 is described below
commit 16cc089b198dcdebc2422845aa08d18233c6b3a4
Author: JUST.in DO IT <ju...@airbnb.com>
AuthorDate: Tue Oct 17 15:33:07 2023 -0400
fix: warning of nth-child (#23638)
---
.../src/ReactParallelCoordinates.jsx | 2 +-
.../plugins/legacy-preset-chart-nvd3/src/ReactNVD3.jsx | 2 +-
.../src/SqlLab/components/SaveDatasetActionButton/index.tsx | 2 +-
superset-frontend/src/components/ButtonGroup/index.tsx | 6 +++---
superset-frontend/src/components/DropdownButton/index.tsx | 2 +-
superset-frontend/src/components/DropdownSelectableIcon/index.tsx | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx
index 4a7675d555..7f30716057 100644
--- a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx
+++ b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/ReactParallelCoordinates.jsx
@@ -106,7 +106,7 @@ export default styled(ParallelCoordinates)`
height: 18px;
margin: 0px;
}
- .parcoords .row:nth-child(odd) {
+ .parcoords .row:nth-of-type(odd) {
background: ${addAlpha(theme.colors.grayscale.dark2, 0.05)};
}
.parcoords .header {
diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.jsx b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.jsx
index 9a9962e8aa..f7f219a05d 100644
--- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.jsx
+++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.jsx
@@ -152,7 +152,7 @@ export default styled(NVD3)`
white-space: nowrap;
font-weight: ${({ theme }) => theme.typography.weights.bold};
}
- tbody tr:not(.tooltip-header) td:nth-child(2) {
+ tbody tr:not(.tooltip-header) td:nth-of-type(2) {
word-break: break-word;
}
}
diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx b/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx
index dbb25b138a..79a3bf0b8e 100644
--- a/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx
+++ b/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/index.tsx
@@ -44,7 +44,7 @@ const SaveDatasetActionButton = ({
font-weight: ${theme.gridUnit * 150};
background-color: ${theme.colors.primary.light4};
color: ${theme.colors.primary.dark1};
- &:nth-child(2) {
+ &:nth-of-type(2) {
&:before,
&:hover:before {
border-left: 2px solid ${theme.colors.primary.dark2};
diff --git a/superset-frontend/src/components/ButtonGroup/index.tsx b/superset-frontend/src/components/ButtonGroup/index.tsx
index 463a042066..78e29714cd 100644
--- a/superset-frontend/src/components/ButtonGroup/index.tsx
+++ b/superset-frontend/src/components/ButtonGroup/index.tsx
@@ -30,18 +30,18 @@ export default function ButtonGroup(props: ButtonGroupProps) {
role="group"
className={className}
css={{
- '& :nth-child(1):not(:nth-last-child(1))': {
+ '& :nth-of-type(1):not(:nth-last-of-type(1))': {
borderTopRightRadius: 0,
borderBottomRightRadius: 0,
borderRight: 0,
marginLeft: 0,
},
- '& :not(:nth-child(1)):not(:nth-last-child(1))': {
+ '& :not(:nth-of-type(1)):not(:nth-last-of-type(1))': {
borderRadius: 0,
borderRight: 0,
marginLeft: 0,
},
- '& :nth-last-child(1):not(:nth-child(1))': {
+ '& :nth-last-of-type(1):not(:nth-of-type(1))': {
borderTopLeftRadius: 0,
borderBottomLeftRadius: 0,
marginLeft: 0,
diff --git a/superset-frontend/src/components/DropdownButton/index.tsx b/superset-frontend/src/components/DropdownButton/index.tsx
index c6293f66a3..a35e66b5d7 100644
--- a/superset-frontend/src/components/DropdownButton/index.tsx
+++ b/superset-frontend/src/components/DropdownButton/index.tsx
@@ -42,7 +42,7 @@ const StyledDropdownButton = styled.div`
background-color: ${({ theme }) => theme.colors.grayscale.light2};
color: ${({ theme }) => theme.colors.grayscale.base};
}
- &:nth-child(2) {
+ &:nth-of-type(2) {
margin: 0;
border-radius: ${({ theme }) =>
`0 ${theme.gridUnit}px ${theme.gridUnit}px 0`};
diff --git a/superset-frontend/src/components/DropdownSelectableIcon/index.tsx b/superset-frontend/src/components/DropdownSelectableIcon/index.tsx
index 582bc182e3..f668aa720d 100644
--- a/superset-frontend/src/components/DropdownSelectableIcon/index.tsx
+++ b/superset-frontend/src/components/DropdownSelectableIcon/index.tsx
@@ -46,7 +46,7 @@ const StyledDropdownButton = styled(
button.ant-btn:first-of-type {
display: none;
}
- > button.ant-btn:nth-child(2) {
+ > button.ant-btn:nth-of-type(2) {
display: inline-flex;
background-color: transparent !important;
height: unset;