Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

fix(chart-controls): temporal col placeholder for hybrid dnd #1317

Merged
merged 1 commit into from
Aug 18, 2021
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 @@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t, validateNonEmpty } from '@superset-ui/core';
import { FeatureFlag, isFeatureEnabled, t, validateNonEmpty } from '@superset-ui/core';
import { ExtraControlProps, SharedControlConfig } from '../types';
import { TIME_COLUMN_OPTION, TIME_FILTER_LABELS } from '../constants';

Expand Down Expand Up @@ -156,7 +156,11 @@ export const dnd_granularity_sqla: typeof dndGroupByControl = {
'expression',
),
canDelete: false,
ghostButtonText: t('Drop temporal column here'),
ghostButtonText: t(
isFeatureEnabled(FeatureFlag.ENABLE_DND_WITH_CLICK_UX)
? 'Drop a temporal column here or click'
: 'Drop temporal column here',
),
mapStateToProps: ({ datasource }) => {
const temporalColumns = datasource?.columns.filter(c => c.is_dttm) ?? [];
const options = Object.fromEntries(temporalColumns.map(option => [option.column_name, option]));
Expand Down