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

WEBDEV-6081 Extend models for profile pages #48

Merged
merged 22 commits into from
Jan 25, 2024
Merged

Conversation

latonv
Copy link
Contributor

@latonv latonv commented Dec 11, 2023

This MR equips the search service with several new models to handle profile page requests & responses from the PPS. In particular, clients can now request specific page_elements, corresponding roughly to tabs on the profile page. The responses can now accordingly include their main content on a page_elements branch whose shape is determined in part by the type of page element being returned.

This necessarily includes some additional refactoring to cleanly handle what are now multiple page-element-specific means by which search hits must be processed to provide the caller with as consistent an output as possible.

Copy link

github-actions bot commented Dec 12, 2023

PR Preview Action v1.4.6
Preview removed because the pull request was closed.
2024-01-25 03:15 UTC

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (7cad26c) 91.40% compared to head (fea99f6) 92.27%.

Files Patch % Lines
src/models/hit-types/web-archive-hit.ts 79.03% 13 Missing ⚠️
src/responses/search-response-details.ts 97.04% 5 Missing ⚠️
src/models/hit-types/item-hit.ts 91.30% 2 Missing ⚠️
src/responses/page-elements.ts 99.34% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
+ Coverage   91.40%   92.27%   +0.87%     
==========================================
  Files          27       29       +2     
  Lines        2688     3095     +407     
  Branches      235      271      +36     
==========================================
+ Hits         2457     2856     +399     
- Misses        220      230      +10     
+ Partials       11        9       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@iisa iisa left a comment

Choose a reason for hiding this comment

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

looks good, had some questions, comments.

q: do we need a page_elements test?

src/search-backend/metadata-search-backend.ts Show resolved Hide resolved
src/responses/page-elements.ts Outdated Show resolved Hide resolved
src/responses/page-elements.ts Outdated Show resolved Hide resolved
src/responses/page-elements.ts Show resolved Hide resolved
src/responses/search-response-details.ts Outdated Show resolved Hide resolved
src/responses/search-response-details.ts Outdated Show resolved Hide resolved
src/responses/search-response-details.ts Outdated Show resolved Hide resolved
@latonv latonv changed the title Draft: WEBDEV-6081 Extend models for profile pages WEBDEV-6081 Extend models for profile pages Jan 25, 2024
@latonv latonv merged commit e01df2a into main Jan 25, 2024
4 checks passed
@latonv latonv deleted the webdev6081-state-management branch January 25, 2024 03:14
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.

None yet

2 participants