Skip to content

Conversation

@taslangraham
Copy link
Contributor

{if count($allCategories)}
{fbvFormSection list=true title="grid.category.categories"}
{if !$hasAllBreadcrumbs}
<div>{translate key="submission.categories.circularReferenceWarning"}</div>
Copy link
Member

Choose a reason for hiding this comment

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

Is the <div> needed?

Copy link
Member

@kaitlinnewson kaitlinnewson left a comment

Choose a reason for hiding this comment

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

Hi @taslangraham, just one minor comment on this, thanks!

@kaitlinnewson
Copy link
Member

kaitlinnewson commented Oct 3, 2025

Actually one other thing, it looks like the sorting of the categories may have an issue as well, unless it's just some issue in my installation:

Screenshot 2025-10-03 at 10 44 19 AM

@taslangraham
Copy link
Contributor Author

Actually one other thing, it looks like the sorting of the categories may have an issue as well, unless it's just some issue in my installation:

Screenshot 2025-10-03 at 10 44 19 AM

No, it's not an issue with your install.. This is an interesting thing to highlight. By default, categories are sorted by name in ascending order, then the breadcrumb is created for each. So for each checkbox, the last item in the breadcrumb is what the checkbox is being displayed for and that last Item is actually what the list is sorted by. E.g, a checkbox like Applied Science > Computer Science > Computer vision is just a breadcrumb representation for Computer vision.

A solution could be to sort the items by the breadcrumb after building the breadcrumbs.

@taslangraham
Copy link
Contributor Author

That proposed solution would be done at the pkp-lib, so If I decide to go with that then it will be via a separate issue & PR

@taslangraham taslangraham merged commit 0a4a9ba into pkp:main Oct 13, 2025
8 checks passed
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