Skip to content

Implement Expert hub landing page backend#15709

Merged
adalcima merged 16 commits intofeature/expert-gallery-hubfrom
TP1-3734-Expert-hub-landing-page-backend
Apr 8, 2026
Merged

Implement Expert hub landing page backend#15709
adalcima merged 16 commits intofeature/expert-gallery-hubfrom
TP1-3734-Expert-hub-landing-page-backend

Conversation

@adalcima
Copy link
Copy Markdown
Collaborator

@adalcima adalcima commented Apr 1, 2026

Description

This PR adds the backend for Expert Hub — a central directory where visitors can browse Mozilla's network of experts.

Related issue: TP1-3734
Review app: Landing page | Directory page

Main changes

  • ExpertHubPage hub/landing page with :

    • Featured experts (1–12, grouped by their first assigned topic).
  • ExpertDirectoryPage directory/index page with:

    • Featured issue areas (up to 5 topic pills).
    • Server-side filtering by topic, country, and role.
    • JSON API endpoint at /experts/ with pagination (12 per page).
  • External Link updated with title and description fields for Expert Profile.

  • Basic html for landing page and directory, showing featured experts and featured topics. Section for "All experts" using filters and api endpoint.
    * It will be necessary to make adjustments and modify the styles so that it displays correctly on the corresponding frontend ticket.

  • Factory generates 15 experts profiles, 6 featured experts an 5 featured topics.

How to test

  • Navigate to /en/mozilla-expert-hub/ and verify:
    1. Featured experts. Experts are grouped by available topics
    2. Navigate to the Directory. Featured topics must be shown.
    3. All experts listing section shows the first 12 expert using pagination
    4. Topic, Country, and Role filter drop-downs available
    5. Visit an expert profile option is available

Images

image image image image image image

@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-15h3uv April 1, 2026 16:41 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-15h3uv April 1, 2026 16:48 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-15h3uv April 1, 2026 17:05 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-15h3uv April 2, 2026 16:42 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-15h3uv April 2, 2026 16:59 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-15h3uv April 2, 2026 17:10 Inactive
@adalcima adalcima marked this pull request as ready for review April 2, 2026 17:12
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-15h3uv April 2, 2026 18:45 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-qvimbm April 2, 2026 19:14 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-qvimbm April 2, 2026 20:09 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-qvimbm April 2, 2026 22:18 Inactive
Copy link
Copy Markdown
Collaborator

@nancyt1 nancyt1 left a comment

Choose a reason for hiding this comment

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

Works as expected for me! Can we rename issues to topics? So -> "Featured Issue Areas" -> "Featured Topics" And the items below are named Topic 1, Topic 2, Topic 3 etc. Just so we don't get confused with so many things labeled "featured". Same thing with "Featured Experts", can the items be "Expert 1", "Expert 2", etc.?

I will update the designs as well

@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-qvimbm April 3, 2026 22:47 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-jzmoug April 3, 2026 23:08 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-jzmoug April 6, 2026 19:12 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-jzmoug April 6, 2026 19:27 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-ikssj5 April 6, 2026 19:38 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-ikssj5 April 6, 2026 19:50 Inactive
@kevdmoz
Copy link
Copy Markdown

kevdmoz commented Apr 6, 2026

@adalcima

  1. Please remove "Notes to Web Team" from the expert profile
image
  1. Will @danielfmiranda 's updated changes to the "Page Topics" be apart of this release? I'm still seeing the old experience
image

@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-ikssj5 April 6, 2026 21:43 Inactive
Base automatically changed from feature/expert-gallery-hub to main April 6, 2026 21:43
@adalcima adalcima changed the base branch from main to feature/expert-gallery-hub-integration April 6, 2026 21:50
@adalcima adalcima deleted the branch feature/expert-gallery-hub April 6, 2026 22:25
@adalcima adalcima closed this Apr 6, 2026
@adalcima adalcima reopened this Apr 6, 2026
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-ikssj5 April 6, 2026 22:31 Inactive
@adalcima adalcima changed the base branch from feature/expert-gallery-hub-integration to feature/expert-gallery-hub April 6, 2026 23:38
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-lgopxp April 6, 2026 23:41 Inactive
@mofodevops mofodevops temporarily deployed to foundation-s-tp1-3734-e-y1ox4f April 6, 2026 23:58 Inactive
@adalcima adalcima force-pushed the TP1-3734-Expert-hub-landing-page-backend branch from 1036369 to 249c8d1 Compare April 7, 2026 00:22
@mofodevops mofodevops temporarily deployed to foundation-s-tp1-3734-e-giw30e April 7, 2026 00:23 Inactive
@adalcima adalcima temporarily deployed to foundation-s-tp1-3734-e-giw30e April 7, 2026 01:30 Inactive
@adalcima
Copy link
Copy Markdown
Collaborator Author

adalcima commented Apr 7, 2026

  1. Notes to Web Team

Hi @kevdmoz thanks for the feedback:

  1. I've removed the Notes to Web Team field.
  2. The Topics change was already in main branch, so I've updated this feature branch to have those changes ready for when we integrate them into main as well, so we can see that functionality here too.

Please let me know if you have any further comments. Thank you 🙌

Copy link
Copy Markdown
Collaborator

@nancyt1 nancyt1 left a comment

Choose a reason for hiding this comment

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

Looks great, thank you! If we can remove the "Featured Experts" heading from rendering that would be great, or maybe frontend can do that later.

Copy link
Copy Markdown
Collaborator

@danielfmiranda danielfmiranda left a comment

Choose a reason for hiding this comment

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

Thanks @adalcima for taking on this work!
After reviewing the code and the review app, everything looks great. R+! 👍

A couple of small non-blocking notes:

  • Do we need to add django-countries to requirements.txt?
  • If we have the bandwidth, I think moving the expert hub related code to its own /expert_hub directory would be a nice separation of concerns,especially if models in /profiles end up being used for other parts of the site down the road. That said, I know it's not urgent, so totally fine to revisit this later.

from django.core.paginator import EmptyPage, Paginator
from django.db import models
from django.http import JsonResponse
from django_countries import countries
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Cool! This package seems like it could be super useful 👍 just want to double check if we need to add it requirements.txt or anything?

Comment on lines +26 to +42


class ExpertDirectoryPageTestCase(WagtailPageTestCase):
def setUp(self):
self.hub = ExpertHubPageFactory()
self.directory = ExpertDirectoryPageFactory(parent=self.hub)

def test_parent_is_hub(self):
self.assertEqual(self.directory.get_parent().specific, self.hub)

def test_is_leaf_page(self):
self.assertEqual(self.directory.subpage_types, [])

def test_get_experts_returns_hub_children(self):
expert = ExpertProfilePageFactory(parent=self.hub)
experts = self.directory.get_experts()
self.assertIn(expert, experts)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Kudos Thank you for adding tests!

)


def generate(seed):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Kudos Thanks for adding a factory! This will be very helpful in the future

@adalcima
Copy link
Copy Markdown
Collaborator Author

adalcima commented Apr 8, 2026

Thanks @nancyt1 @danielfmiranda for the review 💯

  • I think we can leave the current template headings as is for now; it can be used as a placeholder for future frontend work. In any case, these templates will be mostly modified during the frontend development to fit the design.
  • django-countries will be in requirements; it currently resides in the requirements.txt file of the feature branch feature/expert-gallery-hub as part of a previous commit.
  • It makes sense to revisit the profiles and expert hub later, especially if this grows at some point. The idea was to reactivate our profiles app with the new expert profiles and include an abstract class for future additional profiles.

@adalcima adalcima merged commit e59d5e0 into feature/expert-gallery-hub Apr 8, 2026
5 checks passed
@adalcima adalcima deleted the TP1-3734-Expert-hub-landing-page-backend branch April 8, 2026 01:53
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.

5 participants