Skip to content

Set classified-sort option to false by default as it caused confusion #224

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hatsu38
Copy link
Contributor

@hatsu38 hatsu38 commented Jun 3, 2025

The classified-sort option was previously set to true by default, which led to confusion for many users. It wasn't an intentional decision, so we're updating the default to false to avoid unexpected column ordering.

Ref: #194

@hatsu38 hatsu38 force-pushed the default-classified-sort-is-false branch from 3930286 to 69c3a65 Compare June 3, 2025 02:41
@drwl
Copy link
Owner

drwl commented Jun 3, 2025

@hatsu38
Copy link
Contributor Author

hatsu38 commented Jun 4, 2025

@drwl

Ah, my previous explanation was a bit inaccurate — sorry about that.

In this pull request( ctran/annotate_models#542 ) , the default value for classified_sort was set to true.

Before this PR was merged, classified_sort didn’t have a default value, so options[:classified_sort] = Annotate::Helpers.true?(ENV['classified_sort']) evaluated to false.

This change might come down to personal preference. Personally, I prefer classified_sort to be false.

I noticed that someone else was also having trouble with this in an issue, so I decided to open a pull request.

What do you think?

@drwl
Copy link
Owner

drwl commented Jun 5, 2025

Okay I think I understand now. I think we want to keep the CLI options to be the same to preserve the same functionality, but we can change the default here: lib/annotate_rb/options.rb:29

The classified-sort option was previously set to true by default, which led to confusion for many users. It wasn't an intentional decision, so we're updating the default to false to avoid unexpected column ordering.
@hatsu38 hatsu38 force-pushed the default-classified-sort-is-false branch from 69c3a65 to 92b7c7b Compare June 5, 2025 06:18
Copy link
Owner

@drwl drwl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for investigating and helping me better understand the issue!

@hatsu38
Copy link
Contributor Author

hatsu38 commented Jun 6, 2025

I'll fix the tests that are currently failing later!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants