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

Fixed displayed values ordering #2371

Conversation

harnish7576
Copy link
Collaborator

@harnish7576 harnish7576 commented Feb 24, 2025

Description

Fixes #2342

  • Sorting naively created sorted list which had entirely new objects.

  • SortTreeInPlace happens before rendering, modifying the original objects.
  • This way it only affects the order, not object structure.
  • StackedMenu now receives the same object references which preserves interactivity.

Changes

  • Added a SortTreeInPlace Function that sorts the same objects in memory instead of creating new ones and Ensures children are sorted recursively.
  • Sorted based on Labels instead of Name

Screenshots

Screenshot 2025-02-24 at 2 56 02 PM Screenshot 2025-02-24 at 2 56 45 PM

Copy link

vercel bot commented Feb 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
policyengine-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2025 4:11am

@anth-volk
Copy link
Collaborator

Thanks for your work on this @harnish7576! A couple things:

  • Please add "Fixes #NUMBER" as the first item in the PR description
  • Please rename the issue as something readable (e.g., "Fixed displayed values ordering")

@harnish7576 harnish7576 changed the title Harnish7576/issue2342 displayed values ordering Fixed displayed values ordering Feb 26, 2025
@harnish7576
Copy link
Collaborator Author

@anth-volk I've updated the PR as requested.

Copy link
Collaborator

@anth-volk anth-volk left a comment

Choose a reason for hiding this comment

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

Hey @harnish7576, thanks for this! I've requested one minor change, then should be good to merge.

Copy link
Collaborator

@anth-volk anth-volk 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 this @harnish7576! Glad to get this merged.

@anth-volk anth-volk merged commit 8fe2fc6 into PolicyEngine:master Feb 28, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Displayed values seem to have no order
2 participants