Skip to content

Commit

Permalink
fix(explore): Chart header icon paddings (apache#19534)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje authored and philipher29 committed Jun 9, 2022
1 parent 17dfbf9 commit f3d3bbc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
5 changes: 1 addition & 4 deletions superset-frontend/src/components/AlteredSliceTag/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 1 addition & 5 deletions superset-frontend/src/components/FaveStar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit f3d3bbc

Please sign in to comment.