EnxDev commented on code in PR #37304:
URL: https://github.com/apache/superset/pull/37304#discussion_r2717085996
##########
superset-frontend/src/components/ListView/ListView.tsx:
##########
@@ -197,32 +198,38 @@ const ViewModeToggle = ({
}: {
mode: 'table' | 'card';
setMode: (mode: 'table' | 'card') => void;
-}) => (
- <ViewModeContainer>
- <div
- role="button"
- tabIndex={0}
- onClick={e => {
- e.currentTarget.blur();
- setMode('card');
- }}
- className={cx('toggle-button', { active: mode === 'card' })}
- >
- <Icons.AppstoreOutlined iconSize="xl" />
- </div>
- <div
- role="button"
- tabIndex={0}
- onClick={e => {
- e.currentTarget.blur();
- setMode('table');
- }}
- className={cx('toggle-button', { active: mode === 'table' })}
- >
- <Icons.UnorderedListOutlined iconSize="xl" />
- </div>
- </ViewModeContainer>
-);
+}) => {
+ return (
+ <ViewModeContainer>
+ <Tooltip title={t('Grid view'}>
+ <div
+ role="button"
+ tabIndex={0}
+ onClick={e => {
+ e.currentTarget.blur();
+ setMode('card');
+ }}
+ className={cx('toggle-button', { active: mode === 'card' })}
+ >
+ <Icons.AppstoreOutlined iconSize="xl" />
+ </div>
+ </Tooltip>
+ <Tooltip title={t('List view'}>
Review Comment:
```suggestion
<Tooltip title={t('List view')}>
```
##########
superset-frontend/src/components/ListView/ListView.tsx:
##########
@@ -197,32 +198,38 @@ const ViewModeToggle = ({
}: {
mode: 'table' | 'card';
setMode: (mode: 'table' | 'card') => void;
-}) => (
- <ViewModeContainer>
- <div
- role="button"
- tabIndex={0}
- onClick={e => {
- e.currentTarget.blur();
- setMode('card');
- }}
- className={cx('toggle-button', { active: mode === 'card' })}
- >
- <Icons.AppstoreOutlined iconSize="xl" />
- </div>
- <div
- role="button"
- tabIndex={0}
- onClick={e => {
- e.currentTarget.blur();
- setMode('table');
- }}
- className={cx('toggle-button', { active: mode === 'table' })}
- >
- <Icons.UnorderedListOutlined iconSize="xl" />
- </div>
- </ViewModeContainer>
-);
+}) => {
+ return (
+ <ViewModeContainer>
+ <Tooltip title={t('Grid view'}>
Review Comment:
```suggestion
<Tooltip title={t('Grid view')}>
```
--
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]