You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2026/02/05 16:14:15 UTC
(superset) branch enxdev/fix/save-chart-info-icon-alignment created (now 98a83903685)
This is an automated email from the ASF dual-hosted git repository.
diegopucci pushed a change to branch enxdev/fix/save-chart-info-icon-alignment
in repository https://gitbox.apache.org/repos/asf/superset.git
at 98a83903685 fix(save-chart): fix info icon alignment in save chart modal
This branch includes the following new commits:
new 98a83903685 fix(save-chart): fix info icon alignment in save chart modal
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: fix(save-chart): fix info icon alignment in save chart modal
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
diegopucci pushed a commit to branch enxdev/fix/save-chart-info-icon-alignment
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 98a839036854d07ba5ead19bf970252ba4082f99
Author: Diego Pucci <di...@gmail.com>
AuthorDate: Thu Feb 5 18:14:04 2026 +0200
fix(save-chart): fix info icon alignment in save chart modal
Moved InfoTooltip from being a sibling of the Input to being part
of the FormItem label prop. This fixes the misalignment where the
icon appeared below the label instead of inline next to "Dataset Name".
Co-Authored-By: Claude Opus 4.5 <no...@anthropic.com>
---
.../src/explore/components/SaveModal.test.jsx | 15 ++++++++++++
.../src/explore/components/SaveModal.tsx | 28 ++++++++++++++++++----
2 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/superset-frontend/src/explore/components/SaveModal.test.jsx b/superset-frontend/src/explore/components/SaveModal.test.jsx
index be445884f17..c5cd4c125b3 100644
--- a/superset-frontend/src/explore/components/SaveModal.test.jsx
+++ b/superset-frontend/src/explore/components/SaveModal.test.jsx
@@ -25,6 +25,8 @@ import {
render,
waitFor,
within,
+ screen,
+ userEvent,
} from 'spec/helpers/testing-library';
import fetchMock from 'fetch-mock';
@@ -307,6 +309,19 @@ test('set dataset name when chart source is query', () => {
expect(getByTestId('new-dataset-name')).toHaveValue('test');
});
+test('renders InfoTooltip icon next to Dataset Name label when datasource type is query', () => {
+ const { getByTestId, getByText } = setup({}, queryStore);
+
+ const datasetNameLabel = getByText('Dataset Name');
+ expect(datasetNameLabel).toBeInTheDocument();
+
+ const infoTooltip = getByTestId('info-tooltip-icon');
+ expect(infoTooltip).toBeInTheDocument();
+
+ const labelContainer = datasetNameLabel.parentElement;
+ expect(labelContainer).toContainElement(infoTooltip);
+});
+
test('make sure slice_id in the URLSearchParams before the redirect', () => {
const myProps = {
...defaultProps,
diff --git a/superset-frontend/src/explore/components/SaveModal.tsx b/superset-frontend/src/explore/components/SaveModal.tsx
index 3b70e70a3ad..a96b8bfa243 100644
--- a/superset-frontend/src/explore/components/SaveModal.tsx
+++ b/superset-frontend/src/explore/components/SaveModal.tsx
@@ -33,6 +33,7 @@ import {
Input,
Loading,
Divider,
+ Flex,
TreeSelect,
} from '@superset-ui/core/components';
import { t, logging } from '@apache-superset/core';
@@ -618,11 +619,28 @@ class SaveModal extends Component<SaveModalProps, SaveModalState> {
/>
</FormItem>
{this.props.datasource?.type === 'query' && (
- <FormItem label={t('Dataset Name')} required>
- <InfoTooltip
- tooltip={t('A reusable dataset will be saved with your chart.')}
- placement="right"
- />
+ <FormItem
+ label={
+ <div>
+ {t('Dataset Name')}
+ <Flex
+ css={theme => css`
+ display: inline-flex;
+ margin-left: ${theme.sizeUnit}px;
+ `}
+ >
+ <InfoTooltip
+ data-test="info-tooltip-icon"
+ tooltip={t(
+ 'A reusable dataset will be saved with your chart.',
+ )}
+ placement="right"
+ />
+ </Flex>
+ </div>
+ }
+ required
+ >
<Input
name="dataset_name"
type="text"