Skip to content
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

Update index number for categories order #86

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Conversation

manuq
Copy link
Contributor

@manuq manuq commented Jun 26, 2024

So they start at 10 and are separated by 10. Also 2 categories were sharing the same
number by mistake.

https://phabricator.endlessm.com/T35507

So they start at 10 and are separated by 10. Also 2 categories were
sharing the same
number by mistake.

https://phabricator.endlessm.com/T35507
@manuq manuq requested review from wjt and dbnicholson June 26, 2024 14:22
Copy link
Member

@dbnicholson dbnicholson left a comment

Choose a reason for hiding this comment

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

This is fine, but I actually think we should simplify this a bit. I did these orderings to maintain exactly the list that was there before. The categories are sorted by order and then alphabetically if they have the same order. Therefore, I think we should just let the alphabetical part take more precedence and only lightly use the order value. I.e., make all of these 5 all the other space more or less reserved for custom categories to go to the top or bottom of the list. Or maybe we just drop the order and always sort alphabetically.

@manuq
Copy link
Contributor Author

manuq commented Jun 26, 2024

This is fine, but I actually think we should simplify this a bit. I did these orderings to maintain exactly the list that was there before. The categories are sorted by order and then alphabetically if they have the same order. Therefore, I think we should just let the alphabetical part take more precedence and only lightly use the order value. I.e., make all of these 5 all the other space more or less reserved for custom categories to go to the top or bottom of the list. Or maybe we just drop the order and always sort alphabetically.

For sorting alphabetically you mean in code or user facing? User facing I think is a good idea to have the more relevant categories at the top, and less relevant at the bottom. Just like Scratch or Microsoft Arcade do. See https://en.scratch-wiki.info/wiki/Block_Categories

@dbnicholson
Copy link
Member

For sorting alphabetically you mean in code or user facing? User facing I think is a good idea to have the more relevant categories at the top, and less relevant at the bottom. Just like Scratch or Microsoft Arcade do. See https://en.scratch-wiki.info/wiki/Block_Categories

Probably right. I think we might be able to add some constants and helpers so that the magic order values don't need to be maintained like this.

@dbnicholson dbnicholson merged commit c5a2171 into main Jun 26, 2024
2 checks passed
@dbnicholson dbnicholson deleted the recategorization branch June 26, 2024 22:41
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