korbit-ai[bot] commented on code in PR #34709:
URL: https://github.com/apache/superset/pull/34709#discussion_r2277612993
##########
superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx:
##########
@@ -244,7 +245,7 @@ class AnnotationLayer extends PureComponent {
chartMetadata.canBeAnnotationType(annotationType),
)
.map(({ key, value: chartMetadata }) => ({
- value: key,
+ value: key === VizType.Line ? 'line' : key,
Review Comment:
### Inconsistent Visualization Type Mapping <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The mapping of visualization types inconsistently transforms only the 'Line'
type to lowercase 'line', while keeping other types as-is. This could cause
issues in type matching in other parts of the application.
###### Why this matters
The inconsistent type mapping can lead to bugs where the same visualization
type is referenced with different casing in different parts of the application,
causing annotation layers to fail or behave unexpectedly.
###### Suggested change ∙ *Feature Preview*
Either consistently transform all visualization types to lowercase or
maintain the original casing for all types. For example, keep the original
casing:
```jsx
value: key,
```
Or transform all to lowercase:
```jsx
value: key.toLowerCase(),
```
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7467d414-0b62-4ea2-a3cd-3a4dee35457f/upvote)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7467d414-0b62-4ea2-a3cd-3a4dee35457f?what_not_true=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7467d414-0b62-4ea2-a3cd-3a4dee35457f?what_out_of_scope=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7467d414-0b62-4ea2-a3cd-3a4dee35457f?what_not_in_standard=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7467d414-0b62-4ea2-a3cd-3a4dee35457f)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:0eb2deb0-222f-4f21-91ce-d46db7064dba -->
[](0eb2deb0-222f-4f21-91ce-d46db7064dba)
--
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]