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

[PNI] Performance optimisations -outdated #11382

Closed
wants to merge 12 commits into from

Conversation

jhonatan-lopes
Copy link
Contributor

Description

PR to merge performance optimisations feature branch back into main.

Link to sample test page: "en/privacynotincluded"
Related PRs/issues: #10159

Checklist

Tests

  • Is the code I'm adding covered by tests?

Changes in Models:

  • Did I update or add new fake data?
  • Did I squash my migration?
  • [ ] Are my changes backward-compatible. If not, did I schedule a deploy with the rest of the team?

⚠️ We need to disable Heroku's preboot for this deployment ⚠️

Documentation:

  • Is my code documented?
  • [ ] Did I update the READMEs or wagtail documentation?

Merge Method
💡❗Remember to use squash merge when merging non-feature branches into main

jhonatan-lopes and others added 12 commits October 23, 2023 09:09
* Fix PNI homepage get_context N+1 problem

* Hero supporting pages and featured articles
* Add categories factories

* Add tests for categories

* Select related parent categories

* Test categories pub page count prop

* Refactor category pub page count prop

* Refactor to get published product pages

* Prefetch pub product page count

* Prefetch categories products on homepage

* Reinstate localized_snippet

* Remove localized snippet mixin

* Fix slugs on translated categories

* Move test to right place

* FIx migration

* Fix homepage and categories page

* Add usage property to categories

* Use `is_being_used` category prop on templates

* Use categories factories on tests

* Update query numbers

* Remove pub prod page count in cat prop

* Lint

* Lint

* Deprecation docstrings

* Fix query numbers

* Lint

* Fix categories test

* Lint
* Prefetch product page categories

* Empty-Commit
* Remove .localized from templates

* Remove relocalized_url and localizedroutablepageurl tags

* Fix query tests

* Remove .localized from product page

* Make flake8 happy

* Lint
* Offload creepiness calc to db

* Check for prefetching in evaluation props

* Update query nums

* Offload creepiness calc to db

* Check for prefetching in evaluation props

* Update query nums

* Fix tests

* Lint

* Add docstrings

* Require prefetching for creepiness calcs

* Annotated evaluation on product page

* Change exception type
* Create evaluation object after creating product

* Fix copy page action

* Mark test as expected failure

* Add docstrings
* Annotate categories default name

* Remove dead code

* Compare default category name on JS

* Adjust query numbers

* Annotate related categories and localize cat parents

* Oops, I printed again

* A small price to pay for bug fixes

* Add tests

* Lint
* Replace FeatureFlags banner with DonateBanner snippets. (#11195)

* Replace FeatureFlags banner with DonateBanner snippets.

* Add tests for donate banner chooser.

* Rename NoLocaleSnippetChooser to DefaultLocaleSnippetChooser

* Add more assertions to donate banner test

* Corrected djlint errors in the donate banner templates instead of adding them to the ignore list.

* Fix migration

---------

Co-authored-by: Jhonatan Lopes <jhonatan.dapontelopes@gmail.com>

* [PNI] Homepage backend performance improvements (#11240)

* Fix PNI homepage get_context N+1 problem

* Hero supporting pages and featured articles

* Removed trailing slash from 'https://basket-dev.allizom.org/' (#11246)

Co-authored-by: Tyler Denton <41487159+mtdenton@users.noreply.github.com>

* Clean-Up for links on PNI Annual Creep-O-Meter page (#11272)

* outro link styling updates

* added Apple and Zoom links

* removed `/en` from links

* removed `/en` from Apple and Zoom links

* PNI CC Page - quick fixes and tweaks (#11273)

* PNI CC Page - fixes and tweaks

* reduced speech bubble width on mobile

* share button styling fixes for :focus state

* Bump sentry-sdk from 1.30.0 to 1.32.0 (#11264)

Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 1.30.0 to 1.32.0.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-python@1.30.0...1.32.0)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump mypy from 1.5.1 to 1.6.1 (#11274)

Bumps [mypy](https://github.com/python/mypy) from 1.5.1 to 1.6.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](python/mypy@v1.5.1...v1.6.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Revert "Replace FeatureFlags banner with DonateBanner snippets. (#11195)" (#11276)

This reverts commit dcfe996.

* updated link

* Revert "[PNI] Homepage backend performance improvements (#11240)" (#11285)

This reverts commit 682f7a9.

* Revert "Removed trailing slash from 'https://basket-dev.allizom.org/' (#11246)" (#11286)

This reverts commit 95fd3dc.

* Adjusted logic used in PNI's quiz on creep-o-meter page (#11283)

* Adjusted logic used in PNI's quiz on creep-o-meter page

* Reimplement: Replace FeatureFlags banner with DonateBanner snippets. (#11280)

* Replace FeatureFlags banner with DonateBanner snippets.

* Add tests for donate banner chooser.

* Rename NoLocaleSnippetChooser to DefaultLocaleSnippetChooser

* Add more assertions to donate banner test

* Corrected djlint errors in the donate banner templates instead of adding them to the ignore list.

* Fix migration

---------

Co-authored-by: Victoria Chan <victoria.chan@torchbox.com>

* Removed trailing slash from 'https://basket-dev.allizom.org/' (#11312)

* Added `image_grid` and `image_text` blocks to Article (#11334)

* Added fields to article page, migration

* Updated factory body fields

* formatting

* `inv format` run

* Merge `feature/donate-help-page` into `main` (#11359)

* DonateHelpPage model, factory, and tests

* formatting

* html formatting

* template for notice section is done

* added "show_notice" flag

* Added newline at the end of help_page_notice.html

* feedback from PR

* formatting

* saving progress, page is now working with body but need to update scss still

* feedback from PR

* added height/width attributes to image for linter

* feedback from PR

* updated scss, factory, and template

* backend work done

* added new notice block instead so we can update template individually

* backend done, unless we want to make image optional

* updated help page to use new notice block instead of imagetextmini

* updated migrations

* linting

* formatting

* fixed typo

* updated to use StructBlockValidationError

* updated tests

* smal front end update

* linting notice-block.scss

* updated migrations, having trouble with NoticeBlockFactory

* block factories & tests, updating of factory file structure

* updated import

* updated some factory file paths to account for changes

* import formatting

* removed forgotten factory.py file

* first pass, have the form rendering with default styling

* formatting

* updated spacing

* updated linting file to ignore errors from FA code

* added donate and donate help page to visual regression tests

* removed donate pages from visual regression tests since they live on a different subdomain (donate.localhost)

* very first pass, borrowing existing file to get feedback from design

* fixed bug where submit button would not render for last two dropdown options

* fixed error where text box wouldnt show up for 2nd to last option

* feedback from pr (add comments, update env.default and other small changes)

* added newline at end of formassembly_body.html

* updated chevron in the select dropdown

* feedback from stakeholders (increased textarea height and implemented word wrapping on select element for chrome)

* fixed dropdown styling/wrap issue

* updated scss, ready for review

* Formatting of scss file

* updated app.json and continuous-integration.yml to include updated sp directives

* Feedback from PR (height to min-height)

* localized form and updated instructions

* updated formassembly JS

* formatting

* localized submit button value

* updated revision number

* feedback from PR (wrapping dropdown options in trans blocks)

* Fix migrations

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Victoria Chan <victoria.chan@torchbox.com>
Co-authored-by: Mavis Ou <mmmavis@users.noreply.github.com>
Co-authored-by: Tyler Denton <41487159+mtdenton@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Miranda <manieldiranda@gmail.com>
@jhonatan-lopes jhonatan-lopes changed the base branch from main to 6870_blog_category_share_data November 7, 2023 21:17
@jhonatan-lopes jhonatan-lopes changed the base branch from 6870_blog_category_share_data to main November 7, 2023 21:17
@jhonatan-lopes jhonatan-lopes changed the title [PNI] Performance optimisations [PNI] Performance optimisations - outdated Nov 7, 2023
@jhonatan-lopes jhonatan-lopes changed the title [PNI] Performance optimisations - outdated [PNI] Performance optimisations Nov 7, 2023
@jhonatan-lopes jhonatan-lopes reopened this Nov 7, 2023
@jhonatan-lopes jhonatan-lopes changed the title [PNI] Performance optimisations [PNI] Performance optimisations -outdated Nov 7, 2023
@jhonatan-lopes jhonatan-lopes deleted the feature/pni-perf-optimisations branch November 8, 2023 19:40
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