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

Hygiene: Remove useless constructor from Page, and improve ns detection. #4605

Merged
merged 7 commits into from
Jun 4, 2024

Conversation

dbrant
Copy link
Member

@dbrant dbrant commented Apr 17, 2024

The PageProperties class has a useless constructor, and the Page class performs an incorrect check for Namespace.MAIN that is better done via PageProperties.

@dbrant dbrant added the Minor Minor stuff label Apr 17, 2024
@dbrant dbrant added the HOLD Will review as soon as other more pressing PRs are merged/released. label Apr 17, 2024
@dbrant dbrant added Ready to merge PR passed design signoff and ready to be merged. and removed HOLD Will review as soon as other more pressing PRs are merged/released. labels Jun 3, 2024
val displayTitle = pageProperties.displayTitle
val isMainPage = pageProperties.isMainPage
val isArticle = !isMainPage && title.namespace() === Namespace.MAIN
val isArticle = !isMainPage && pageProperties.namespace.main()
Copy link
Member Author

Choose a reason for hiding this comment

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

The main goal, as with previous similar PRs, is to reduce dependence on the PageTitle.namespace() function, which does not do exactly what we expect, and should eventually be removed.

@cooltey cooltey merged commit 9ab3678 into main Jun 4, 2024
1 check passed
@cooltey cooltey deleted the pageProps branch June 4, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Minor stuff Ready to merge PR passed design signoff and ready to be merged.
2 participants