-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate: correct typo on DataColorMode enum value #5
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,7 +212,7 @@ public MarkdownViewerDemo() { | |
mdv.setDataColorMode(DataColorMode.DARK); | ||
break; | ||
case "Light": | ||
mdv.setDataColorMode(DataColorMode.LIGTH); | ||
mdv.setDataColorMode(DataColorMode.LIGHT); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Typo Still Present in Multiple Files Several instances of the misspelled enum value
Please correct these occurrences to ensure consistency and prevent potential issues. 🔗 Analysis chainTypo correction approved. Verify consistency across the project. The change from To ensure consistency across the project, please run the following script to check for any remaining instances of the misspelled enum value: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Search for any remaining instances of 'LIGTH' in Java files
# Test: Search for 'LIGTH' in Java files. Expect: No results if all instances have been corrected.
rg --type java 'LIGTH'
# Test: Verify correct usage of 'LIGHT' in Java files. Expect: Consistent usage across the project.
rg --type java 'DataColorMode\.LIGHT'
Length of output: 759 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't want to introduce a breaking change, so I decided to deprecate the enum value with the typo (and introduce the one with correct spelling), so that is why the typo still exist, I'm planning to eliminate it in a new major version in the future. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mlopezFC, understood. Thank you for the clarification. It's a sensible approach to deprecate the misspelled enum value (_/) ✏️ Learnings added
|
||
break; | ||
case "Automatic": | ||
mdv.setDataColorMode(DataColorMode.AUTO); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Remaining occurrences of the typo 'LIGTH' found:
src/test/java/com/flowingcode/vaadin/addons/markdown/MarkdownViewerDemo.java: mdv.setDataColorMode(DataColorMode.LIGTH);
src/test/java/com/flowingcode/vaadin/addons/markdown/MarkdownEditorDemo.java: mde.setDataColorMode(DataColorMode.LIGTH);
src/main/java/com/flowingcode/vaadin/addons/markdown/BaseMarkdownComponent.java: LIGTH,
src/main/java/com/flowingcode/vaadin/addons/markdown/BaseMarkdownComponent.java: case LIGTH:
🔗 Analysis chain
Typo correction approved. Verify other occurrences.
The change from
DataColorMode.LIGTH
toDataColorMode.LIGHT
correctly fixes the typo in the enum value. This aligns with the PR objective of correcting the typo in theDataColorMode
enum.To ensure consistency across the codebase, please run the following script to check for any remaining occurrences of the typo:
If the script returns any results, those occurrences should also be updated to maintain consistency.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 459
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to introduce a breaking change, so I decided to deprecate the enum value with the typo (and introduce the one with correct spelling), so that is why the typo still exist, I'm planning to eliminate it in a new major version in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mlopezFC, understood! Thank you for clarifying your approach. Deprecating
DataColorMode.LIGTH
to avoid a breaking change is a thoughtful solution, and planning to remove it in a future major version makes sense.✏️ Learnings added