Copilot commented on code in PR #35933:
URL: https://github.com/apache/superset/pull/35933#discussion_r2491639441


##########
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/transformUtils.ts:
##########
@@ -134,9 +134,10 @@ export function addPropertiesToFeature<T extends 
Record<string, unknown>>(
 }
 

Review Comment:
   The newly added `type` property in the metric object parameter lacks 
documentation. Consider adding a JSDoc comment to explain what values `type` 
can have (e.g., 'metric', 'fix') and when each type should be used, as this 
affects the function's behavior significantly.
   ```suggestion
   
   /**
    * Returns the metric label from the given metric object or string.
    *
    * @param metric - The metric to extract the label from. Can be:
    *   - a string (the metric name),
    *   - an object with optional `type` and `value` properties.
    *     - `type`: Can be 'metric' or 'fix'.
    *       - 'metric': Indicates a regular metric; label will be generated 
from `value`.
    *       - 'fix': Indicates a fixed value; label will not be generated 
(returns undefined).
    *     - `value`: The value of the metric (string or number).
    *   - undefined.
    * @returns The metric label, or undefined if not applicable.
    */
   ```



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

Reply via email to