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

Exclude profiles from the People landing page listing #139

Merged
merged 2 commits into from
Jul 21, 2024

Conversation

haydngreatnews
Copy link
Member

@haydngreatnews haydngreatnews commented Jul 16, 2024

As a migration step, we have moved the existing people pages, so that we're relying on parent-child relationships for category pages, rather than views mounted over the top of page paths.

However, people can belong to more than one category, for example Brian Kernighan belongs on both the Executive Committee and the (Past) Staff pages, so we can't have the profiles existing under the specific categories.

As such, the person-profiles are set up to be homed directly underneath the PeopleLandingPage, but should not be listed alongside the PeopleCategoryPages that do belong there. While we could restrict the child listing by type, it seems safer (in case we eventually add another allowed child-type for example) that we exclude the profiles from that listing, as they already have a suitable display location as grandchildren

Also do some prefetching to optimise pages with a larger number of people

While a landing page with _all_ the staff was an extreme case, it was also
making a dozen-or-so queries per person, which is un-good
Profiles _could_ be managed as tree-items, below categories, but I don't think
the categories are mutually-exclusive, so it seems to make more sense to manage
all the profiles in one place, and just exclude them from the user-facing
listing
Copy link

@gdelavil gdelavil left a comment

Choose a reason for hiding this comment

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

@haydngreatnews I'm missing the ticket and context, I think. Why are you excluding profiles?

Copy link

@gdelavil gdelavil left a comment

Choose a reason for hiding this comment

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

Also, why are we allowing unit tests to fail?

@haydngreatnews
Copy link
Member Author

Unit tests are almost entirely for the original pre-SL implementation. We left them around for the ideal case of us having time to update them

@haydngreatnews
Copy link
Member Author

Description updated to add context

Copy link

@gdelavil gdelavil left a comment

Choose a reason for hiding this comment

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

It took some re-reading, but now I understand your PR. Thanks for the description!

@haydngreatnews haydngreatnews merged commit ba45cda into main Jul 21, 2024
3 of 5 checks passed
@haydngreatnews haydngreatnews deleted the fix/people-landing-page branch July 21, 2024 21:17
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