Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
dde7258
Gallery landing hub Initial layout
ramram-mf May 8, 2026
76eb976
Inline project carousel checkpoint
ramram-mf May 8, 2026
a90eb27
Refine gallery hub project carousel
ramram-mf May 8, 2026
27bbbaa
Polish gallery hub slide motion
ramram-mf May 8, 2026
9f6a3c7
Fix lint issues
ramram-mf May 8, 2026
9d7f75a
Merge branch 'main' into TP1-3744-gallery-hub-landing-page-frontend
ramram-mf May 8, 2026
5fc0dbd
Update migrations
ramram-mf May 8, 2026
d382703
Fix scroll from bottom issue.
ramram-mf May 11, 2026
e4d6eb0
Merge branch 'main' into TP1-3744-gallery-hub-landing-page-frontend
ramram-mf May 11, 2026
63dceec
Update gallery page factory to model shape.
ramram-mf May 11, 2026
ae152c0
Refine gallery hub project layout
ramram-mf May 11, 2026
68453a1
Format gallery hub settings
ramram-mf May 11, 2026
04a66e5
Merge branch 'main' into TP1-3744-gallery-hub-landing-page-frontend
ramram-mf May 12, 2026
eace21a
Add mobile gallery landing composition
ramram-mf May 12, 2026
452c28a
Refine gallery hub responsive layout
ramram-mf May 12, 2026
9a647f3
Audit gallery hub responsive behavior
ramram-mf May 12, 2026
d67d4b0
Add mobile gallery project layout
ramram-mf May 12, 2026
9edda0b
Refine gallery hub carousel indicators
ramram-mf May 12, 2026
be5ebac
Refine gallery hub carousel gestures
ramram-mf May 12, 2026
b394fc3
Format gallery hub gesture imports
ramram-mf May 12, 2026
fdd38ef
Catch up to main
ramram-mf May 13, 2026
d0912ca
Merge branch 'main' into TP1-3744-gallery-hub-landing-page-frontend
ramram-mf May 13, 2026
ee9e98b
Address gallery hub landing page feedback
ramram-mf May 14, 2026
c04c114
Refine gallery project media pagination
ramram-mf May 14, 2026
7d8ef7f
Guard gallery intro navigation during animation
ramram-mf May 14, 2026
2fa3766
Clean up gallery hub review findings
ramram-mf May 14, 2026
90373a8
Refine gallery hub mobile layout
ramram-mf May 14, 2026
7b9625f
Fix gallery hub SCSS formatting
ramram-mf May 14, 2026
5a28a1f
Merge branch 'main' into TP1-3744-gallery-hub-landing-page-frontend
ramram-mf May 14, 2026
920b2d5
Refine gallery project navigation layout
ramram-mf May 14, 2026
9ba8ea9
Address gallery hub PR feedback
ramram-mf May 14, 2026
9a6e426
Polish gallery hub project layout
ramram-mf May 15, 2026
2a1aebc
Reduce gallery hub intro entering duration from 1400ms to 1200ms
ramram-mf May 15, 2026
baf0e2b
Merge branch 'main' into TP1-3744-gallery-hub-landing-page-frontend
ramram-mf May 15, 2026
43f4a82
Refine gallery hub project layout
ramram-mf May 15, 2026
3a0c5b8
Center gallery hub intro artwork
ramram-mf May 15, 2026
c5bc502
Format gallery hub settings
ramram-mf May 15, 2026
196e4bc
Animate mobile gallery projects vertically
ramram-mf May 15, 2026
fc5fbc5
Refactor gallery hub layout tokens
ramram-mf May 15, 2026
452f864
Fix gallery hub lint
ramram-mf May 15, 2026
817bdb5
Tune gallery hub short viewport layout
ramram-mf May 15, 2026
aa281d7
Tune gallery hub artwork layout
ramram-mf May 16, 2026
ea174d9
Add gallery hub project list overlay
ramram-mf May 18, 2026
0e104d9
Address gallery hub review feedback
ramram-mf May 18, 2026
797416a
Fix gallery hub carousel formatting
ramram-mf May 18, 2026
0abd4ee
Merge remote-tracking branch 'origin/TP1-3744-gallery-hub-landing-pag…
ramram-mf May 18, 2026
0d0dfaa
Add gallery hub filter panel
ramram-mf May 19, 2026
9ba3a2b
Refine mobile gallery filter modal
ramram-mf May 19, 2026
620b77b
Align gallery filter modal spacing
ramram-mf May 19, 2026
3e0fbb0
Animate gallery filter modal
ramram-mf May 19, 2026
6bd1f61
Fix gallery filter scrim color syntax
ramram-mf May 19, 2026
2b55e6d
Animate gallery project list modal
ramram-mf May 19, 2026
bbd77c8
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 19, 2026
5967582
Refine gallery project list sizing
ramram-mf May 19, 2026
8d0f17b
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 19, 2026
fd44ed2
Update gallery hub project navigation
ramram-mf May 19, 2026
3e8ed7e
Merge branch 'TP1-3744-gallery-hub-landing-page-frontend' into TP1-38…
ramram-mf May 19, 2026
3cf37e9
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 19, 2026
01f288d
Refine gallery hub short viewport layout
ramram-mf May 19, 2026
38a6d71
Document gallery hub carousel safeguards
ramram-mf May 19, 2026
fd8f5a9
Merge branch 'TP1-3744-gallery-hub-landing-page-frontend' into TP1-38…
ramram-mf May 19, 2026
3429f10
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 19, 2026
858d995
Refine gallery hub project list modal
ramram-mf May 19, 2026
60b9071
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 19, 2026
589325d
Merge branch 'main' into TP1-3744-gallery-hub-landing-page-frontend
ramram-mf May 19, 2026
7c3dcf4
Merge branch 'TP1-3744-gallery-hub-landing-page-frontend' into TP1-38…
ramram-mf May 19, 2026
92e15b0
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 19, 2026
3a5ef6e
Fix gallery hub filter panel mobile layout
ramram-mf May 19, 2026
b36353d
Optimize gallery hub filter context
ramram-mf May 19, 2026
876f43c
Add expert location gallery filter
ramram-mf May 19, 2026
0b28b38
Address gallery project list review feedback
ramram-mf May 19, 2026
9f080f4
Format gallery project list shape cycle
ramram-mf May 20, 2026
b109c8b
Merge remote-tracking branch 'origin/TP1-3891-gallery-hub-project-lis…
ramram-mf May 20, 2026
2ee33bc
Address gallery filter panel review feedback
ramram-mf May 20, 2026
75f5368
Format gallery overlay JS
ramram-mf May 20, 2026
415c2b7
Close primary nav overlays from gallery modals
ramram-mf May 20, 2026
e817589
Merge branch 'main' into TP1-3744-gallery-hub-landing-page-frontend
ramram-mf May 20, 2026
1c43e00
Merge branch 'TP1-3744-gallery-hub-landing-page-frontend' into TP1-38…
ramram-mf May 20, 2026
a1ff519
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 20, 2026
129422f
Address gallery hub filter feedback
ramram-mf May 20, 2026
fec3483
Fix gallery project list shape cycle
ramram-mf May 20, 2026
3d31282
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 20, 2026
c0447c1
Restore gallery controls grid alignment
ramram-mf May 20, 2026
b4e149b
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 20, 2026
a6c75fb
Update gallery project list modal styles
ramram-mf May 20, 2026
5a3a930
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 20, 2026
e2915ec
Move gallery cookie launcher on mobile
ramram-mf May 20, 2026
70f873d
Merge branch 'TP1-3744-gallery-hub-landing-page-frontend' into TP1-38…
ramram-mf May 20, 2026
58bb2ac
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 20, 2026
b8ad32c
Merge remote-tracking branch 'origin/main' into TP1-3891-gallery-hub-…
ramram-mf May 20, 2026
6863250
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 20, 2026
ce1c2b0
Refine gallery project list desktop styles
ramram-mf May 20, 2026
9861fc0
Fix gallery modal nav event dispatch
ramram-mf May 20, 2026
7fc25b3
Merge branch 'main' into TP1-3891-gallery-hub-project-list-modal
ramram-mf May 20, 2026
38c1834
Merge branch 'TP1-3891-gallery-hub-project-list-modal' into TP1-3892-…
ramram-mf May 20, 2026
bee41e6
Merge main into gallery filter panel
ramram-mf May 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 80 additions & 10 deletions foundation_cms/gallery_hub/models/gallery_page.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
from modelcluster.fields import ParentalKey
from wagtail.admin.panels import (
FieldPanel,
Expand All @@ -9,6 +10,7 @@
from wagtail.models import Orderable, Page

from foundation_cms.base.models.abstract_base_page import AbstractBasePage
from foundation_cms.gallery_hub.models.project_page import ProjectPage
from foundation_cms.mixins.hero_image import HeroImageMixin


Expand Down Expand Up @@ -57,28 +59,96 @@ class Meta:

template = "patterns/pages/gallery_hub/gallery_page.html"

@staticmethod
def _filter_option(tag):
return {
"label": tag.name,
"value": tag.slug,
}

@staticmethod
def _country_filter_option(country):
return {
"label": country.name,
"value": country.code,
}

def get_context(self, request):
context = super().get_context(request)

featured = [
item.project.specific
for item in self.featured_projects.select_related("project").all()
if item.project_id is not None
]
featured_project_ids = tuple(
self.featured_projects.filter(project_id__isnull=False).values_list("project_id", flat=True)
)
featured_by_id = {
page.id: page
for page in ProjectPage.objects.filter(id__in=featured_project_ids)
.select_related("expert")
.prefetch_related(
"topics",
"program_label",
)
}
featured = [featured_by_id[project_id] for project_id in featured_project_ids if project_id in featured_by_id]

topics = sorted(
{tag.name for page in featured for tag in page.topics.all()},
{tag.slug: tag for page in featured for tag in page.topics.all()}.values(),
key=lambda tag: tag.name,
)
program_labels = sorted(
{label.name for page in featured for label in page.program_label.all()},
{label.slug: label for page in featured for label in page.program_label.all()}.values(),
key=lambda label: label.name,
)
program_years = sorted(
{page.program_year for page in featured if page.program_year},
reverse=True,
)
countries = sorted(
{
page.expert.location.code: page.expert.location
for page in featured
if page.expert and page.expert.location
}.values(),
key=lambda country: country.name,
)

context["featured_projects"] = featured
context["filter_topics"] = topics
context["filter_program_labels"] = program_labels
context["filter_program_years"] = program_years
context["filter_categories"] = (
{
"key": "topic",
"label": _("Topic"),
"options": tuple(self._filter_option(tag) for tag in topics),
"expanded": True,
},
{
"key": "program",
"label": _("Program"),
"options": tuple(self._filter_option(label) for label in program_labels),
"expanded": False,
},
{
"key": "year",
"label": _("Year"),
"options": tuple({"label": str(year), "value": str(year)} for year in program_years),
"expanded": False,
},
{
"key": "country",
"label": _("Country"),
"options": tuple(self._country_filter_option(country) for country in countries),
"expanded": False,
},
)
context["project_filter_data"] = [
{
"id": str(page.id),
"filters": {
"topic": tuple(tag.slug for tag in page.topics.all()),
"program": tuple(label.slug for label in page.program_label.all()),
"year": (str(page.program_year),) if page.program_year else (),
"country": (page.expert.location.code,) if page.expert and page.expert.location else (),
},
}
for page in featured
]

return context
17 changes: 17 additions & 0 deletions foundation_cms/static/js/components/gallery_hub/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ export const GALLERY_HUB_SELECTORS = {
projectListItemShell: "[data-gallery-hub-project-list-item-shell]",
projectListSlot: "[data-gallery-hub-project-list-slot]",
filterSlot: "[data-gallery-hub-filter-slot]",
filterPanel: "[data-gallery-hub-filter-panel]",
filterCategory: "[data-gallery-hub-filter-category]",
filterCategoryToggle: "[data-gallery-hub-filter-category-toggle]",
filterOptions: "[data-gallery-hub-filter-options]",
filterChip: "[data-gallery-hub-filter-chip]",
filterApply: "[data-gallery-hub-filter-apply]",
filterReset: "[data-gallery-hub-filter-reset]",
};

/**
Expand Down Expand Up @@ -81,6 +88,16 @@ export const GALLERY_HUB_VIEW_MODES = {
project: "project",
};

/**
* Gallery Hub modal ids used by template data attributes and JS state.
*
* @type {{projectList: string, filter: string}}
*/
export const GALLERY_HUB_MODAL_IDS = {
projectList: "project-list",
filter: "filter",
};

/**
* CSS custom property updated with the available viewport height.
*
Expand Down
Loading
Loading