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

[2.x] Replace navigation item group normalization juggling with looser comparison #1575

Conversation

caendesilva
Copy link
Member

This targets v2.x via #1568

The reason we slugified the label is to have a looser comparison, considering "Foo" and "foo" the same for navigation groups. But messing with the title then makes it harder to format it back. By instead slugifying at comparison time, we bypass this problem. It also has the "side effect" of having more cases where the title is accurate, hence why some tests needed updating.

This is obviously susceptible to race conditions, but there is only so much we can do if the user is not consistent with their group naming. It also kinda makes the internal state "ugly" but since it reduces complexity and improves accuracy I think it's worth it.

@caendesilva
Copy link
Member Author

Realizing the part of the problem I'm facing is that the generator doesn't now about all the context when assembling dropdowns. Maybe we need an accessor instead (or add a second factory pass)

@caendesilva caendesilva deleted the replace-normalization-juggling-with-looser-comparison- branch February 20, 2024 13:32
@caendesilva caendesilva mentioned this pull request Jun 27, 2024
74 tasks
@caendesilva caendesilva added this to the v2 milestone Jul 9, 2024
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.

1 participant