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

Remove FieldHint flag usage #1030

Merged
merged 1 commit into from
May 23, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export default createFeatureConfig({
name: Feature.FieldHint,
state: {
development: true,
production: false,
production: true,
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React from 'react';

import {I18n} from 'i18n';

import {Feature} from '../../../../../../../../shared';
import Utils from '../../../../../../../../ui/utils';
import {SectionWrapper} from '../../../../../../../components/SectionWrapper/SectionWrapper';

import {HintRow} from './Rows/HintRow/HintRow';
Expand All @@ -15,13 +13,11 @@ import './AppearanceSection.scss';
const i18n = I18n.keyset('dash.control-dialog.edit');

const AppearanceSection = () => {
const canSetHint = Utils.isEnabledFeature(Feature.FieldHint);

return (
<SectionWrapper title={i18n('label_section-appearance')}>
<TitleRow />
<InnerTitleRow />
{canSetHint && <HintRow />}
<HintRow />
</SectionWrapper>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import {FormRow} from '@gravity-ui/components';
import block from 'bem-cn-lite';
import {I18n} from 'i18n';

import {Feature} from '../../../../../../../shared';
import {Utils} from '../../../../../../../ui';
import {HintRow} from '../../Control2/Sections/AppearanceSection/Rows/HintRow/HintRow';
import {InnerTitleRow} from '../../Control2/Sections/AppearanceSection/Rows/InnerTitleRow/InnerTitleRow';
import {TitleRow} from '../../Control2/Sections/AppearanceSection/Rows/TitleRow/TitleRow';
Expand All @@ -18,8 +16,6 @@ const b = block('group-control-dialog');
const i18n = I18n.keyset('dash.group-controls-dialog.edit');

export const GroupControlBody = () => {
const canSetHint = Utils.isEnabledFeature(Feature.FieldHint);

return (
<React.Fragment>
<FormRow label={i18n('label_source')}>
Expand All @@ -31,11 +27,9 @@ export const GroupControlBody = () => {
<div className={b('section')}>
<InnerTitleRow />
</div>
{canSetHint && (
<div className={b('section')}>
<HintRow />
</div>
)}
<div className={b('section')}>
<HintRow />
</div>
<div className={b('section')}>
<CommonSettingsSection />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {connect} from 'react-redux';
import {Dispatch, bindActionCreators} from 'redux';
import {
CommonSharedExtraSettings,
Feature,
HintSettings,
Placeholder,
PlaceholderId,
Expand Down Expand Up @@ -38,7 +37,6 @@ import {
Field as TField,
TableBarsSettings,
} from '../../../../../../shared/types';
import {Utils} from '../../../../../../ui';
import {registry} from '../../../../../registry';
import {
AVAILABLE_DATETIMETZ_FORMATS,
Expand Down Expand Up @@ -389,17 +387,12 @@ class DialogField extends React.PureComponent<DialogFieldInnerProps, DialogField

private renderHintSettings() {
const {item, placeholderId} = this.props;
const canSetHint = Utils.isEnabledFeature(Feature.FieldHint);
const availablePlaceholders = [
PlaceholderId.FlatTableColumns,
PlaceholderId.PivotTableRows,
];

if (
!item ||
!availablePlaceholders.includes(placeholderId as PlaceholderId) ||
!canSetHint
) {
if (!item || !availablePlaceholders.includes(placeholderId as PlaceholderId)) {
return null;
}

Expand Down
Loading