korbit-ai[bot] commented on code in PR #34253: URL: https://github.com/apache/superset/pull/34253#discussion_r2220324604
########## superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx: ########## @@ -74,14 +73,10 @@ const verticalStyle = (theme: SupersetTheme, width: number) => css` padding-top: ${theme.sizeUnit * 6}px; background: linear-gradient( - ${rgba(theme.colors.grayscale.light5, 0)}, - ${theme.colors.grayscale.light5} 60% + ${rgba(theme.colorBgLayout, 0)}, + ${theme.colorBgElevated} 20% ); Review Comment: ### Unexplained Magic Number in Gradient <sub></sub> <details> <summary>Tell me more</summary> ###### What is the issue? The magic number 20% in the gradient is hardcoded without explanation of its significance. ###### Why this matters Unexplained magic numbers make it difficult to understand the design decisions and complicate future adjustments to the UI. ###### Suggested change ∙ *Feature Preview* Extract the number into a named constant or add a comment explaining its purpose: ```typescript const GRADIENT_STOP_PERCENTAGE = 20; // Gradient fades in over the first 20% for smooth visual transition background: linear-gradient( ${rgba(theme.colorBgLayout, 0)}, ${theme.colorBgElevated} ${GRADIENT_STOP_PERCENTAGE}% ); ``` ###### Provide feedback to improve future suggestions [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c522370e-3cc7-4af3-93c7-df2b54586598/upvote) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c522370e-3cc7-4af3-93c7-df2b54586598?what_not_true=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c522370e-3cc7-4af3-93c7-df2b54586598?what_out_of_scope=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c522370e-3cc7-4af3-93c7-df2b54586598?what_not_in_standard=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/c522370e-3cc7-4af3-93c7-df2b54586598) </details> <sub> 💬 Looking for more details? Reply to this comment to chat with Korbit. </sub> <!--- korbi internal id:debd42d8-c226-4a56-8a51-dfdd195c92db --> [](debd42d8-c226-4a56-8a51-dfdd195c92db) -- 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-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org