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

Inverted Groups #803

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Inverted Groups #803

merged 1 commit into from
Jan 29, 2025

Conversation

bbusenius
Copy link
Member

Fixes #802

Changes in this request

  • Fixed bug that was causing Loop groups and subgroups to be inverted.

@bbusenius bbusenius added the bug label Jan 23, 2025
@bbusenius bbusenius self-assigned this Jan 23, 2025
@bbusenius bbusenius requested a review from bufordrat January 29, 2025 17:16
@vitorgomateus
Copy link
Contributor

for index_child in index_children:
            for inactive_child in inactive_children:
                if inactive_child.is_descendant_of(index_child):
                    inactive_children = inactive_children.not_descendant_of(index_child)

Is this to avoid circular dependency?
It looks good to me, I don't understand the code completely.

@bbusenius
Copy link
Member Author

@vitorgomateus, yes, it's very confusing code (all the groups code is confusing). That part is necessary to filter out the group pages that are children of other GroupIndexPages since other GroupIndexPages can reside under themselves. Without that, it would display all GroupPages in the entire tree. But we only want those that aren't listed under any other GroupInmdexPage. It's not elegant.

Copy link
Contributor

@vitorgomateus vitorgomateus left a comment

Choose a reason for hiding this comment

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

looks good to me

Copy link
Collaborator

@bufordrat bufordrat left a comment

Choose a reason for hiding this comment

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

Looks great! This type of tree-pruning code is super fiddly/hairy, but it works well on my machine in dev.

@bbusenius bbusenius merged commit 944a2db into master Jan 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inverted Groups
3 participants