You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rebenitez1802 (via GitHub)" <gi...@apache.org> on 2025/08/07 14:51:00 UTC

[PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

rebenitez1802 opened a new pull request, #34602:
URL: https://github.com/apache/superset/pull/34602

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Fixes some visual issues introduced with theming:
   
   - Tabs in dashboard  highlight border missaligned
   - Datasets lists physical tag contrast was off using dark theme.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   BEFORE:
   <img width="1512" height="507" alt="image" src="https://github.com/user-attachments/assets/0961ce6b-6f50-4782-b33c-778b8bf07f1d" />
   
   AFTER:
   <img width="1509" height="515" alt="image" src="https://github.com/user-attachments/assets/f0ba6eab-dded-48b2-b947-76afcc0311c1" />
   
   BEFORE:
   <img width="1485" height="192" alt="image" src="https://github.com/user-attachments/assets/3f749bba-4f2f-4e87-b517-f1032819ff4b" />
   AFTER:
   <img width="2972" height="476" alt="image" src="https://github.com/user-attachments/assets/629ac594-c9f1-48ee-9bc6-7917dd08ef62" />
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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


Re: [PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

Posted by "Antonio-RiveroMartnez (via GitHub)" <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #34602:
URL: https://github.com/apache/superset/pull/34602#discussion_r2260994410


##########
superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx:
##########
@@ -45,7 +45,16 @@ export const DatasetTypeLabel: React.FC<DatasetTypeLabelProps> = ({
   const labelType = datasetType === 'physical' ? 'primary' : 'default';
 
   return (
-    <Label icon={icon} type={labelType}>
+    <Label
+      icon={icon}
+      type={labelType}
+      style={{
+        color:
+          labelType === 'primary'
+            ? theme.colors.primary.dark2
+            : theme.colorPrimary,

Review Comment:
   Is it possible to rename these? because the condition is `=== 'primary'` and then both colors are called primary, actually it's counterintuitive that i f`=== 'primary'` we use dark2 and when not primary we use `colorPrimary`? 



-- 
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


Re: [PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

Posted by "rebenitez1802 (via GitHub)" <gi...@apache.org>.
rebenitez1802 commented on code in PR #34602:
URL: https://github.com/apache/superset/pull/34602#discussion_r2261277718


##########
superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx:
##########
@@ -45,7 +45,16 @@ export const DatasetTypeLabel: React.FC<DatasetTypeLabelProps> = ({
   const labelType = datasetType === 'physical' ? 'primary' : 'default';
 
   return (
-    <Label icon={icon} type={labelType}>
+    <Label
+      icon={icon}
+      type={labelType}
+      style={{
+        color:
+          labelType === 'primary'
+            ? theme.colors.primary.dark2
+            : theme.colorPrimary,

Review Comment:
   I changed the condition for better readability



##########
superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx:
##########
@@ -45,7 +45,16 @@ export const DatasetTypeLabel: React.FC<DatasetTypeLabelProps> = ({
   const labelType = datasetType === 'physical' ? 'primary' : 'default';
 
   return (
-    <Label icon={icon} type={labelType}>
+    <Label
+      icon={icon}
+      type={labelType}
+      style={{
+        color:
+          labelType === 'primary'
+            ? theme.colors.primary.dark2

Review Comment:
   fixed



-- 
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


Re: [PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

Posted by "Antonio-RiveroMartnez (via GitHub)" <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #34602:
URL: https://github.com/apache/superset/pull/34602#discussion_r2260994410


##########
superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx:
##########
@@ -45,7 +45,16 @@ export const DatasetTypeLabel: React.FC<DatasetTypeLabelProps> = ({
   const labelType = datasetType === 'physical' ? 'primary' : 'default';
 
   return (
-    <Label icon={icon} type={labelType}>
+    <Label
+      icon={icon}
+      type={labelType}
+      style={{
+        color:
+          labelType === 'primary'
+            ? theme.colors.primary.dark2
+            : theme.colorPrimary,

Review Comment:
   Is it possible to rename these? because the condition is `=== 'primary'` and then both colors are called being accessed with a `primary` key, actually it's counterintuitive that if `=== 'primary'` we use dark2 and when not primary we use `colorPrimary`? 



-- 
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


Re: [PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

Posted by "Antonio-RiveroMartnez (via GitHub)" <gi...@apache.org>.
Antonio-RiveroMartnez merged PR #34602:
URL: https://github.com/apache/superset/pull/34602


-- 
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


Re: [PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

Posted by "Antonio-RiveroMartnez (via GitHub)" <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #34602:
URL: https://github.com/apache/superset/pull/34602#discussion_r2260994410


##########
superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx:
##########
@@ -45,7 +45,16 @@ export const DatasetTypeLabel: React.FC<DatasetTypeLabelProps> = ({
   const labelType = datasetType === 'physical' ? 'primary' : 'default';
 
   return (
-    <Label icon={icon} type={labelType}>
+    <Label
+      icon={icon}
+      type={labelType}
+      style={{
+        color:
+          labelType === 'primary'
+            ? theme.colors.primary.dark2
+            : theme.colorPrimary,

Review Comment:
   Is it possible to rename these? because the condition is `=== 'primary'` and then both colors are being called with a `primary` key, actually it's counterintuitive that if `=== 'primary'` we use dark2 and when not primary we use `colorPrimary`? 



-- 
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


Re: [PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

Posted by "Antonio-RiveroMartnez (via GitHub)" <gi...@apache.org>.
Antonio-RiveroMartnez commented on code in PR #34602:
URL: https://github.com/apache/superset/pull/34602#discussion_r2260994410


##########
superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx:
##########
@@ -45,7 +45,16 @@ export const DatasetTypeLabel: React.FC<DatasetTypeLabelProps> = ({
   const labelType = datasetType === 'physical' ? 'primary' : 'default';
 
   return (
-    <Label icon={icon} type={labelType}>
+    <Label
+      icon={icon}
+      type={labelType}
+      style={{
+        color:
+          labelType === 'primary'
+            ? theme.colors.primary.dark2
+            : theme.colorPrimary,

Review Comment:
   Is it possible to rename these? because the condition is `=== 'primary'` and then both colors are called being accessed with a `primary` key, actually it's counterintuitive that i f`=== 'primary'` we use dark2 and when not primary we use `colorPrimary`? 



-- 
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


Re: [PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on PR #34602:
URL: https://github.com/apache/superset/pull/34602#issuecomment-3164523451

   Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment `/korbit-review`.
   
   > Your admin can change your review schedule in the [Korbit Console](https://app.korbit.ai/settings)
   
   
   
   [](aab4c0a3-93e6-4a05-99ef-08ea3a513a1c)


-- 
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


Re: [PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on code in PR #34602:
URL: https://github.com/apache/superset/pull/34602#discussion_r2260964835


##########
superset-frontend/packages/superset-ui-core/src/components/Label/reusable/DatasetTypeLabel.tsx:
##########
@@ -45,7 +45,16 @@ export const DatasetTypeLabel: React.FC<DatasetTypeLabelProps> = ({
   const labelType = datasetType === 'physical' ? 'primary' : 'default';
 
   return (
-    <Label icon={icon} type={labelType}>
+    <Label
+      icon={icon}
+      type={labelType}
+      style={{
+        color:
+          labelType === 'primary'
+            ? theme.colors.primary.dark2

Review Comment:
   Can we use another first level token here?



-- 
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


Re: [PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on code in PR #34602:
URL: https://github.com/apache/superset/pull/34602#discussion_r2263238244


##########
superset-frontend/src/dashboard/components/gridComponents/Tab.jsx:
##########
@@ -79,7 +79,7 @@ const defaultProps = {
 
 const TabTitleContainer = styled.div`
   ${({ isHighlighted, theme: { sizeUnit, colors } }) => `
-    padding: ${sizeUnit}px ${sizeUnit * 2}px;
+    padding: ${sizeUnit}px ${sizeUnit * 8}px ${sizeUnit}px ${sizeUnit * 2}px;

Review Comment:
   ### Tab title overflow risk due to excessive padding <sub>![category Functionality](https://img.shields.io/badge/Functionality-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The significant increase in right padding (from 2x to 8x sizeUnit) could cause tab titles to overlap or be cut off when there are multiple tabs with long titles.
   
   
   ###### Why this matters
   With excessive right padding, tabs might not fit properly in the available space, leading to layout issues and poor user experience in the tab navigation.
   
   ###### Suggested change ∙ *Feature Preview*
   Consider using a more moderate padding value or implementing text truncation. Example solution:
   ```jsx
   padding: ${sizeUnit}px ${sizeUnit * 4}px ${sizeUnit}px ${sizeUnit * 2}px;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/79e56fd4-8bac-4ddd-8feb-92cd0356a04a/upvote) [![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/79e56fd4-8bac-4ddd-8feb-92cd0356a04a?what_not_true=true)  [![Not in Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/79e56fd4-8bac-4ddd-8feb-92cd0356a04a?what_out_of_scope=true) [![Not in coding standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/79e56fd4-8bac-4ddd-8feb-92cd0356a04a?what_not_in_standard=true) [![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/79e56fd4-8bac-4ddd-8feb-92cd0356a04a)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:22a411e0-2aad-45e9-a14c-4fbe547c88b7 -->
   
   
   [](22a411e0-2aad-45e9-a14c-4fbe547c88b7)



-- 
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


Re: [PR] fix(Dashboards): Tabs highlight and dataset contrast in darkmode issues [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #34602:
URL: https://github.com/apache/superset/pull/34602#issuecomment-3169041527

   Running CI 🤞 


-- 
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