You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by kg...@apache.org on 2022/04/06 04:50:26 UTC
[superset] branch master updated: fix(explore): Chart header icon paddings (#19534)
This is an automated email from the ASF dual-hosted git repository.
kgabryje 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 bb96029c9d fix(explore): Chart header icon paddings (#19534)
bb96029c9d is described below
commit bb96029c9de26d2c581ae498d235956cba6a7fd2
Author: Kamil Gabryjelski <ka...@gmail.com>
AuthorDate: Wed Apr 6 06:50:16 2022 +0200
fix(explore): Chart header icon paddings (#19534)
---
.../src/components/AlteredSliceTag/index.jsx | 5 +---
.../src/components/FaveStar/index.tsx | 6 +----
.../components/ExploreChartHeader/index.jsx | 29 ++++++++++++++--------
3 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/superset-frontend/src/components/AlteredSliceTag/index.jsx b/superset-frontend/src/components/AlteredSliceTag/index.jsx
index 181079a117..3e2d21ab13 100644
--- a/superset-frontend/src/components/AlteredSliceTag/index.jsx
+++ b/superset-frontend/src/components/AlteredSliceTag/index.jsx
@@ -182,10 +182,7 @@ export default class AlteredSliceTag extends React.Component {
renderTriggerNode() {
return (
<Tooltip id="difference-tooltip" title={t('Click to see difference')}>
- <span
- className="label label-warning m-l-5"
- style={{ fontSize: '12px' }}
- >
+ <span className="label label-warning" style={{ fontSize: '12px' }}>
{t('Altered')}
</span>
</Tooltip>
diff --git a/superset-frontend/src/components/FaveStar/index.tsx b/superset-frontend/src/components/FaveStar/index.tsx
index 5953075854..0473e3d9b2 100644
--- a/superset-frontend/src/components/FaveStar/index.tsx
+++ b/superset-frontend/src/components/FaveStar/index.tsx
@@ -68,11 +68,7 @@ const FaveStar = ({
data-test="fave-unfave-icon"
role="button"
>
- {isStarred ? (
- <Icons.FavoriteSelected iconSize="xxl" />
- ) : (
- <Icons.FavoriteUnselected iconSize="xxl" />
- )}
+ {isStarred ? <Icons.FavoriteSelected /> : <Icons.FavoriteUnselected />}
</StyledLink>
);
diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx
index 6c8d3cb799..bbaa34648b 100644
--- a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx
+++ b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx
@@ -96,8 +96,19 @@ const StyledHeader = styled.div`
`;
const StyledButtons = styled.span`
- display: flex;
- align-items: center;
+ ${({ theme }) => css`
+ display: flex;
+ align-items: center;
+ padding-left: ${theme.gridUnit * 2}px;
+
+ & .fave-unfave-icon {
+ padding: 0 ${theme.gridUnit}px;
+
+ &:first-child {
+ padding-left: 0;
+ }
+ }
+ `}
`;
export class ExploreChartHeader extends React.PureComponent {
@@ -236,16 +247,14 @@ export class ExploreChartHeader extends React.PureComponent {
onSave={actions.updateChartTitle}
placeholder={t('Add the name of the chart')}
/>
- {slice?.certified_by && (
- <>
- <CertifiedBadge
- certifiedBy={slice.certified_by}
- details={slice.certification_details}
- />{' '}
- </>
- )}
{slice && (
<StyledButtons>
+ {slice.certified_by && (
+ <CertifiedBadge
+ certifiedBy={slice.certified_by}
+ details={slice.certification_details}
+ />
+ )}
{user.userId && (
<FaveStar
itemId={slice.slice_id}