geido commented on code in PR #22419: URL: https://github.com/apache/superset/pull/22419#discussion_r1050041079
########## superset-frontend/packages/superset-ui-chart-controls/src/utils/disabledSectionRules.ts: ########## @@ -0,0 +1,44 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { ensureIsArray, GenericDataType } from '@superset-ui/core'; + +export enum SectionRuleType { + X_AXIS_TEMPORAL = 'XAxisTemporal', +} + +export function isSectionDisabled(rule: SectionRuleType, exploreState: any) { Review Comment: @michael-s-molina we have this same pattern for the visibility of controls. I am just replicating the same pattern here for disabling **control sections**. If we want to change this pattern we can do it but I think that's going to be a different discussion. For now, I believe it makes sense to be consistent with the existing design to avoid even more fragmentation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
