Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(explore): Chart header icon paddings #19534

Merged
merged 1 commit into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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