korbit-ai[bot] commented on code in PR #34515: URL: https://github.com/apache/superset/pull/34515#discussion_r2248958954
########## superset-frontend/packages/superset-ui-core/src/components/Drawer/index.tsx: ########## @@ -0,0 +1,22 @@ +/** + * 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 type { DrawerProps } from './types'; + +export { Drawer } from 'antd'; +export type { DrawerProps }; Review Comment: ### Missing Abstraction Layer for External Component <sub></sub> <details> <summary>Tell me more</summary> ###### What is the issue? Direct re-export of antd Drawer component without abstraction or customization layer creates tight coupling to the external library. ###### Why this matters If the application needs to change UI libraries or modify Drawer behavior globally, changes would be required across all components using this import. This violates the dependency inversion principle. ###### Suggested change ∙ *Feature Preview* Create a wrapper component that encapsulates antd's Drawer and defines the application's specific interface: ```typescript import { Drawer as AntdDrawer } from 'antd'; import type { DrawerProps as AntdDrawerProps } from 'antd'; export interface SupersetDrawerProps extends AntdDrawerProps { // Add custom props here } export const Drawer: React.FC<SupersetDrawerProps> = (props) => { return <AntdDrawer {...props} />; }; ``` ###### Provide feedback to improve future suggestions [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7ea7392e-108d-4999-8ae8-1720f50a11c4/upvote) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7ea7392e-108d-4999-8ae8-1720f50a11c4?what_not_true=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7ea7392e-108d-4999-8ae8-1720f50a11c4?what_out_of_scope=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7ea7392e-108d-4999-8ae8-1720f50a11c4?what_not_in_standard=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7ea7392e-108d-4999-8ae8-1720f50a11c4) </details> <sub> 💬 Looking for more details? Reply to this comment to chat with Korbit. </sub> <!--- korbi internal id:8fb9ca16-1ee7-47f2-9717-b2f5d0e99348 --> [](8fb9ca16-1ee7-47f2-9717-b2f5d0e99348) -- 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]
