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(dashboard-edge-cutting): make to be not cut without Filter #19080

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const StyledContent = styled.div<{
const StyledDashboardContent = styled.div<{
dashboardFiltersOpen: boolean;
editMode: boolean;
nativeFiltersEnabled: boolean;
}>`
display: flex;
flex-direction: row;
Expand All @@ -171,8 +172,13 @@ const StyledDashboardContent = styled.div<{
margin-top: ${({ theme }) => theme.gridUnit * 6}px;
margin-right: ${({ theme }) => theme.gridUnit * 8}px;
margin-bottom: ${({ theme }) => theme.gridUnit * 6}px;
margin-left: ${({ theme, dashboardFiltersOpen, editMode }) => {
if (!dashboardFiltersOpen && !editMode) {
margin-left: ${({
theme,
dashboardFiltersOpen,
editMode,
nativeFiltersEnabled,
}) => {
if (!dashboardFiltersOpen && !editMode && nativeFiltersEnabled) {
return 0;
}
return theme.gridUnit * 8;
Expand Down Expand Up @@ -289,9 +295,10 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {

const draggableStyle = useMemo(
() => ({
marginLeft: dashboardFiltersOpen || editMode ? 0 : -32,
marginLeft:
dashboardFiltersOpen || editMode || !nativeFiltersEnabled ? 0 : -32,
}),
[dashboardFiltersOpen, editMode],
[dashboardFiltersOpen, editMode, nativeFiltersEnabled],
);

const renderDraggableContent = useCallback(
Expand Down Expand Up @@ -402,6 +409,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
className="dashboard-content"
dashboardFiltersOpen={dashboardFiltersOpen}
editMode={editMode}
nativeFiltersEnabled={nativeFiltersEnabled}
>
{showDashboard ? (
<DashboardContainer topLevelTabs={topLevelTabs} />
Expand Down