You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/09/16 16:38:19 UTC

[GitHub] [superset] ktmud commented on a change in pull request #16393: refactor: Changes the list views to use the new Select component

ktmud commented on a change in pull request #16393:
URL: https://github.com/apache/superset/pull/16393#discussion_r709667817



##########
File path: superset-frontend/src/components/DatePicker/index.tsx
##########
@@ -17,6 +17,12 @@
  * under the License.
  */
 import { DatePicker as AntdDatePicker } from 'antd';
+import { styled } from '@superset-ui/core';
+
+const AntdRangePicker = AntdDatePicker.RangePicker;
+
+export const RangePicker = styled(AntdRangePicker)`
+  border-radius: ${({ theme }) => theme.gridUnit}px;
+`;

Review comment:
       Is this change intended?

##########
File path: superset-frontend/src/components/ListView/Filters/Select.tsx
##########
@@ -16,137 +16,76 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import React, { useState } from 'react';
-import { withTheme, SupersetThemeProps } from '@superset-ui/core';
-import {
-  Select,
-  PaginatedSelect,
-  PartialThemeConfig,
-} from 'src/components/Select';
+import React, { useState, useMemo } from 'react';
+import { withTheme, SupersetThemeProps, t } from '@superset-ui/core';

Review comment:
       It seems theme variables are not used directly by this component anymore. Can we clean up `withTheme`?
   
   On a separate note, I think we should prefer `useTheme` in all future refactoring, too---unless for wrapping legacy class-based components. I added an entry in the [CSS Styled Guide](https://github.com/apache/superset/wiki/Emotion-Styling-Guidelines-and-Best-Practices/_compare/4ea6764f497f352bff4742b3dfa192b4c46d633a...9cd7da713051b2b98eeb512fd92da2b707145c02#diff-5d6646c4ad4792858d153e144bf5fac28133c6005ed3bfd54ccaddde9c22732eR11).
   
   cc. @evans @etr2460 Lmk if you have different opinions.




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org