Skip to content

Commit

Permalink
Merge pull request #9668 from CitizenLabDotCo/master
Browse files Browse the repository at this point in the history
 Release 2024-12-06 (2)
  • Loading branch information
EdwinKato authored Dec 6, 2024
2 parents 4775cf7 + 27f2e16 commit f517dd6
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 66 deletions.
2 changes: 1 addition & 1 deletion back/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ gem 'aws-sdk-s3', '~> 1'
gem 'aws-sdk-bedrockruntime', '~> 1'
gem 'bootsnap', '~> 1', require: false
gem 'dalli', '~> 3.2.8'
gem 'mailgun-ruby', '~>1.2.14'
gem 'mailgun-ruby', '~>1.2.16'
gem 'rails_semantic_logger'
gem 'rinku', '~> 2'
gem 'jsonapi-serializer'
Expand Down
12 changes: 7 additions & 5 deletions back/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ GEM
http-form_data (~> 2.2)
llhttp-ffi (~> 0.5.0)
http-accept (1.7.0)
http-cookie (1.0.6)
http-cookie (1.0.7)
domain_name (~> 0.5)
http-form_data (2.3.0)
httparty (0.22.0)
Expand Down Expand Up @@ -804,6 +804,7 @@ GEM
llhttp-ffi (0.5.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
logger (1.6.2)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand All @@ -812,14 +813,15 @@ GEM
net-imap
net-pop
net-smtp
mailgun-ruby (1.2.14)
mailgun-ruby (1.2.16)
rest-client (>= 2.0.2)
marcel (1.0.4)
matrix (0.4.2)
method_source (1.1.0)
mime-types (3.5.2)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0702)
mime-types-data (3.2024.1105)
mimemagic (0.4.3)
nokogiri (~> 1)
rake
Expand Down Expand Up @@ -1327,7 +1329,7 @@ DEPENDENCIES
liquid (~> 5.5)
listen (>= 3.0.5, < 4.0)
machine_translations!
mailgun-ruby (~> 1.2.14)
mailgun-ruby (~> 1.2.16)
matomo!
mini_magick (~> 4.13)
mjml-rails (~> 4.11)
Expand Down
2 changes: 1 addition & 1 deletion back/config/locales/sr-SP.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sr-Cyrl:
sr-SP:
locales:
en: English
ar-MA: Arabic (Morocco)
Expand Down
2 changes: 1 addition & 1 deletion back/engines/commercial/analysis/config/locales/sr-SP.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sr-Cyrl:
sr-SP:
analysis:
example_tag_n: Пример ознаке %{n}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sr-Cyrl:
sr-SP:
email_campaigns:
campaign_type_description:
"inappropriate_content_flagged": Неприкладан садржај је означен
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sr-Cyrl:
sr-SP:
email_campaigns:
campaign_type_description:
"idea_assigned_to_you": Додељивање идеје мени
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Translations for continuous to timeline migration
sr-Cyrl:
sr-SP:
phase_title_default:
ideation: Прикупите унос
voting: Гласање
Expand Down
2 changes: 1 addition & 1 deletion back/engines/free/email_campaigns/config/locales/sr-SP.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sr-Cyrl:
sr-SP:
email_campaigns:
campaign_type_description:
"manual": Званичне поруке
Expand Down
6 changes: 5 additions & 1 deletion front/app/components/FilterBoxes/TopicsFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ const TopicsFilter = memo<Props>(
</Box>
) : (
<Box>
<Box className="e2e-topics-filters" aria-live="polite">
<Box
className="e2e-topics-filters"
aria-live="polite"
id="e2e-topics-filters"
>
{topicsWithIdeas
.slice(0, showFullList ? undefined : 5) // We show only 5 topics by default with a "Show all" button.
.map((topic: ITopicData) => {
Expand Down
5 changes: 2 additions & 3 deletions front/app/containers/ProjectsShowPage/ProjectCTABar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ import { isNilOrError } from 'utils/helperUtils';
type ProjectCTABarProps = {
projectId: string;
};

const ProjectCTABar = ({ projectId }: ProjectCTABarProps) => {
const isSmallerThanTablet = useBreakpoint('tablet');
const isSmallerThanPhone = useBreakpoint('phone');
const [isVisible, setIsVisible] = useState(false);
// TODO: Fix this the next time the file is edited.
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
const portalElement = document?.getElementById('topbar-portal');
const portalElement = document.getElementById('topbar-portal');
const { data: phases } = usePhases(projectId);
const { data: project } = useProjectById(projectId);

Expand Down
100 changes: 51 additions & 49 deletions front/app/containers/ProjectsShowPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,54 +118,6 @@ const ProjectsShowPage = ({ project }: Props) => {
}
}, [mounted, loading, scrollToStatusModule, scrollToIdeas]);

let content: JSX.Element | null = null;

if (loading) {
content = <FullPageSpinner />;
} else {
content = (
<ContentWrapper id="e2e-project-page">
<ProjectHeader projectId={projectId} />
<ProjectCTABar projectId={projectId} />

<div id="participation-detail">
<TimelineContainer projectId={projectId} />
</div>
{!!events?.data.length && (
<Box
id="e2e-events-section-project-page"
display="flex"
flexDirection="column"
gap="48px"
mx="auto"
my="48px"
maxWidth={`${maxPageWidth}px`}
padding={isSmallerThanTablet ? '20px' : '0px'}
>
<EventsViewer
showProjectFilter={false}
projectId={projectId}
eventsTime="currentAndFuture"
title={formatMessage(messages.upcomingAndOngoingEvents)}
fallbackMessage={messages.noUpcomingOrOngoingEvents}
projectPublicationStatuses={['published', 'draft', 'archived']}
/>
<EventsViewer
showProjectFilter={false}
projectId={projectId}
eventsTime="past"
title={formatMessage(messages.pastEvents)}
fallbackMessage={messages.noPastEvents}
projectPublicationStatuses={['published', 'draft', 'archived']}
showDateFilter={false}
/>
</Box>
)}
<SuccessModal projectId={projectId} />
</ContentWrapper>
);
}

return (
<main>
<Container
Expand All @@ -175,7 +127,57 @@ const ProjectsShowPage = ({ project }: Props) => {
events && events?.data.length > 0 ? colors.white : colors.background
}
>
{content}
{loading ? (
<FullPageSpinner />
) : (
<ContentWrapper id="e2e-project-page">
<ProjectHeader projectId={projectId} />
<ProjectCTABar projectId={projectId} />

<div id="participation-detail">
<TimelineContainer projectId={projectId} />
</div>
{!!events?.data.length && (
<Box
id="e2e-events-section-project-page"
display="flex"
flexDirection="column"
gap="48px"
mx="auto"
my="48px"
maxWidth={`${maxPageWidth}px`}
padding={isSmallerThanTablet ? '20px' : '0px'}
>
<EventsViewer
showProjectFilter={false}
projectId={projectId}
eventsTime="currentAndFuture"
title={formatMessage(messages.upcomingAndOngoingEvents)}
fallbackMessage={messages.noUpcomingOrOngoingEvents}
projectPublicationStatuses={[
'published',
'draft',
'archived',
]}
/>
<EventsViewer
showProjectFilter={false}
projectId={projectId}
eventsTime="past"
title={formatMessage(messages.pastEvents)}
fallbackMessage={messages.noPastEvents}
projectPublicationStatuses={[
'published',
'draft',
'archived',
]}
showDateFilter={false}
/>
</Box>
)}
<SuccessModal projectId={projectId} />
</ContentWrapper>
)}
</Container>
</main>
);
Expand Down
5 changes: 4 additions & 1 deletion front/cypress/e2e/idea_cards.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ describe('Idea cards without filter sidebar sorting and filtering', () => {
});

it('lets you filter the ideas by topic', () => {
cy.contains('waste').click();
cy.get('#e2e-topics-filters').within(() => {
cy.contains('waste').click();
});

cy.get('#e2e-ideas-container')
.find('.e2e-idea-card')
.should('have.length', 1)
Expand Down

0 comments on commit f517dd6

Please sign in to comment.