Skip to content
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
2 changes: 1 addition & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtable/dashboard",
"version": "14.58.4",
"version": "14.58.5",
"license": "Apache-2.0",
"repository": {
"url": "https://github.com/merico-dev/table"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
top: 16px;
right: 16px;
}

.panel-root .panel-top-right-actions-placeholder {
width: 1px;
height: 24px;
}
.panel-root .panel-viz-section {
height: 100%;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,26 @@ export const PanelTopRightActions = observer(({ dropdownContent, showDropdownMen

const showDropdown = withPanelTitle && showDropdownMenu;

const hasTopRightActions = panelAddonSlotId || dropdownContent;
return (
<Group
className="panel-top-right-actions"
gap="xs"
wrap="nowrap"
justify="flex-end"
pos="absolute"
sx={{
zIndex: 410,
}}
>
{/* Panel addons portal target */}
{withAddon && panelAddonSlotId && <div id={panelAddonSlotId}></div>}
<>
{hasTopRightActions && <div className="panel-top-right-actions-placeholder"></div>}
<Group
className="panel-top-right-actions"
gap="xs"
wrap="nowrap"
justify="flex-end"
pos="absolute"
sx={{
zIndex: 410,
}}
>
{/* Panel addons portal target */}
{withAddon && panelAddonSlotId && <div id={panelAddonSlotId}></div>}

{/* Panel dropdown menu */}
{showDropdown && dropdownContent}
</Group>
{/* Panel dropdown menu */}
{showDropdown && dropdownContent}
</Group>
</>
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const EditTitle = observer(() => {
label={t('panel.show_title')}
sx={{ userSelect: 'none' }}
/>
<Checkbox size="sm" checked disabled label={t('panel.use_name_as_title')} />
</Group>
</Stack>
);
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ export const en = {
panel_name: 'Panel Name',
panel_description: 'Description',
panel_description_click: 'Click to see description',
show_title: 'Show title',
show_title: 'Show as Panel title',
use_name_as_title: 'Use name as title',
settings: {
change_view: 'Move into Another View',
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/i18n/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ export const zh = {
panel_name: '卡片名',
panel_description: '卡片描述',
panel_description_click: '点击查看卡片描述',
show_title: '展示卡片标题',
show_title: '作为卡片标题展示',
use_name_as_title: '使用卡片名作为标题',
settings: {
change_view: '移至另一个视图下',
Expand Down
2 changes: 1 addition & 1 deletion settings-form/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtable/settings-form",
"version": "14.58.4",
"version": "14.58.5",
"license": "Apache-2.0",
"repository": {
"url": "https://github.com/merico-dev/table"
Expand Down
32 changes: 15 additions & 17 deletions website/src/utils/install-dashboard-website-plugin.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IPanelAddonRenderProps, pluginManager, useVisibleFilters } from '@devtable/dashboard';
import { ActionIcon, Tooltip } from '@mantine/core';
import { IconBug, IconCode } from '@tabler/icons-react';
import { IconCode } from '@tabler/icons-react';
import React from 'react';

export const PrintEChartsOptionAddon = ({ viz, isInEditMode }: IPanelAddonRenderProps) => {
Expand All @@ -20,22 +20,20 @@ export const PrintEChartsOptionAddon = ({ viz, isInEditMode }: IPanelAddonRender
return null;
}
return (
<div style={{ position: 'absolute', bottom: 2, right: 2, zIndex: 400 }}>
<Tooltip label="Print ECharts option to console">
<ActionIcon
onClick={(ev) => {
ev.stopPropagation();
ev.preventDefault();
console.log('debug', renderOptions, 'filters', formattedFilters);
}}
size="sm"
variant="white"
color="gray"
>
<IconCode />
</ActionIcon>
</Tooltip>
</div>
<Tooltip label="Print ECharts option to console">
<ActionIcon
onClick={(ev) => {
ev.stopPropagation();
ev.preventDefault();
console.log('debug', renderOptions, 'filters', formattedFilters);
}}
variant="subtle"
color="black"
size="md"
>
<IconCode size={14} style={{ width: '70%', height: '70%' }} />
</ActionIcon>
</Tooltip>
);
};
pluginManager.install({
Expand Down