Skip to content
Snippets Groups Projects
Commit c34cb507 authored by hansen's avatar hansen Committed by Kyle Doherty
Browse files

Disable draggable action buttons on cards when editing dashboard (#10206)

* Disable draggable action buttons on cards when editing dashboard

* Card filter parameter mappings should not be draggable either (5365, 7068)

* Filter mapping Prettier
parent dde119b4
No related branches found
No related tags found
No related merge requests found
......@@ -239,7 +239,7 @@ const ChartSettingsButton = ({ series, onReplaceAllVisualizationSettings }) => (
triggerElement={
<Icon name="gear" size={HEADER_ICON_SIZE} style={HEADER_ACTION_STYLE} />
}
triggerClasses="text-light text-medium-hover cursor-pointer flex align-center flex-no-shrink mr1"
triggerClasses="text-light text-medium-hover cursor-pointer flex align-center flex-no-shrink mr1 drag-disabled"
>
<ChartSettingsWithState
series={series}
......@@ -251,7 +251,7 @@ const ChartSettingsButton = ({ series, onReplaceAllVisualizationSettings }) => (
const RemoveButton = ({ onRemove }) => (
<a
className="text-light text-medium-hover "
className="text-light text-medium-hover drag-disabled"
data-metabase-event="Dashboard;Remove Card Modal"
onClick={onRemove}
style={HEADER_ACTION_STYLE}
......@@ -263,7 +263,7 @@ const RemoveButton = ({ onRemove }) => (
const AddSeriesButton = ({ series, onAddSeries }) => (
<a
data-metabase-event={"Dashboard;Edit Series Modal;open"}
className="text-light text-medium-hover cursor-pointer h3 flex-no-shrink relative mr1"
className="text-light text-medium-hover cursor-pointer h3 flex-no-shrink relative mr1 drag-disabled"
onClick={onAddSeries}
style={HEADER_ACTION_STYLE}
>
......
......@@ -146,10 +146,7 @@ export default class DashCardCardParameterMapper extends Component {
}
return (
<div
className="mx1 flex flex-column align-center"
onMouseDown={e => e.stopPropagation()}
>
<div className="mx1 flex flex-column align-center drag-disabled">
{dashcard.series && dashcard.series.length > 0 && (
<div
className="h5 mb1 text-bold"
......
......@@ -211,10 +211,13 @@ const TextActionButtons = ({
>
<a
data-metabase-event={"Dashboard;Text;edit"}
className={cx(" cursor-pointer h3 flex-no-shrink relative mr1", {
"text-light text-medium-hover": isShowingRenderedOutput,
"text-brand": !isShowingRenderedOutput,
})}
className={cx(
"cursor-pointer h3 flex-no-shrink relative mr1 drag-disabled",
{
"text-light text-medium-hover": isShowingRenderedOutput,
"text-brand": !isShowingRenderedOutput,
},
)}
onClick={onEdit}
style={HEADER_ACTION_STYLE}
>
......@@ -231,10 +234,13 @@ const TextActionButtons = ({
<a
data-metabase-event={"Dashboard;Text;preview"}
className={cx(" cursor-pointer h3 flex-no-shrink relative mr1", {
"text-light text-medium-hover": !isShowingRenderedOutput,
"text-brand": isShowingRenderedOutput,
})}
className={cx(
"cursor-pointer h3 flex-no-shrink relative mr1 drag-disabled",
{
"text-light text-medium-hover": !isShowingRenderedOutput,
"text-brand": isShowingRenderedOutput,
},
)}
onClick={onPreview}
style={HEADER_ACTION_STYLE}
>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment