Skip to content

Commit

Permalink
Merge branch '11.x.x' into us_61189_exception_dates_recurrence_descri…
Browse files Browse the repository at this point in the history
…ption_event_ct_11
  • Loading branch information
pnicolli authored Dec 19, 2024
2 parents 6bd4e5f + 0581d8b commit f3c288c
Show file tree
Hide file tree
Showing 16 changed files with 99 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
build-args: |
ADDON_NAME=design-comuni-plone-theme
ADDON_PATH=design-comuni-plone-theme
VOLTO_VERSION=17.19.0
VOLTO_VERSION=17.20.3
- name: Deploy to rancher
uses: redturtle/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
build-args: |
ADDON_NAME=design-comuni-plone-theme
ADDON_PATH=design-comuni-plone-theme
VOLTO_VERSION=17.19.0
VOLTO_VERSION=17.20.3
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
build-args: |
ADDON_NAME=design-comuni-plone-theme
ADDON_PATH=design-comuni-plone-theme
VOLTO_VERSION=17.19.0
VOLTO_VERSION=17.20.3
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@


## [11.25.4](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.25.3...v11.25.4) (2024-12-16)


### Bug Fixes

* enable ImageWithErrors to return null value ([#841](https://github.com/RedTurtle/design-comuni-plone-theme/issues/841)) ([d7aacb9](https://github.com/RedTurtle/design-comuni-plone-theme/commit/d7aacb9ac906307e430cd50ec5843e07f638aec1))


### Documentation

* updated publiccode ([f5dce8d](https://github.com/RedTurtle/design-comuni-plone-theme/commit/f5dce8d55ff6b9eea393fe07a6b0030e7f0ddbb7))


### Maintenance

* fix npm release script ([1f71995](https://github.com/RedTurtle/design-comuni-plone-theme/commit/1f719950e75c0ef5f40093400c43f15520351973))
* upgrade to volto 17.20.3 ([2490838](https://github.com/RedTurtle/design-comuni-plone-theme/commit/2490838a0eec206e430c46bc94e1ebb6c40feba0))

## [11.25.3](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.25.2...v11.25.3) (2024-12-12)


### Bug Fixes

* translations ([6c2379b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/6c2379b8a263ecbc6b69695788e82d9c1deba272))


### Documentation

* updated publiccode and release log ([10abdae](https://github.com/RedTurtle/design-comuni-plone-theme/commit/10abdae4068ea883640769c48df06337b6478b99))

## [11.25.2](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.25.1...v11.25.2) (2024-11-28)


Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
# ADDON ?= "design-comuni-plone-theme"

PLONE_VERSION=6
VOLTO_VERSION=17.19.0
VOLTO_VERSION=17.20.3

ADDON_NAME='design-comuni-plone-theme'
ADDON_PATH='design-comuni-plone-theme'
Expand Down
10 changes: 9 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,22 @@
### Migliorie

- Se vengono aggiunte o rimosse date dalla ricorrenza di un CT evento, nel sottotitolo viene aggiunta l'indicazione di controllare le eccezioni nella sezione apposita.
- Il sottotitolo del CT Evento mostra il range di date per tutti gli eventi con ricorrenza o con una data di fine diversa dalla data di inizio.

### Novità

- ...

### Fix

- ...
- Rimossa l'opzione non selezionabile "nessun valore" dal widget ricorrenza.
- La pagina non dà più errore quando si imposta una ricorrenza con impostazione "Termina dopo tot. ricorrenze".

## Versione 11.25.3 (12/12/2024)

### Migliorie

- Aggiornate diverse traduzioni italiane.

## Versione 11.25.1 (28/11/2024)

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "design-comuni-plone-theme",
"description": "Volto Theme for Italia design guidelines",
"license": "GPL-v3",
"version": "11.25.2",
"version": "11.25.4",
"main": "src/index.js",
"repository": {
"type": "git",
Expand Down Expand Up @@ -200,7 +200,7 @@
"stylelint-prettier": "4.0.2"
},
"peerDependencies": {
"@plone/volto": "17.19.0"
"@plone/volto": "17.20.3"
},
"packageManager": "[email protected]"
}
4 changes: 2 additions & 2 deletions publiccode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ maintenance:
name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
platforms:
- web
releaseDate: '2024-11-28'
releaseDate: '2024-12-16'
softwareType: standalone/web
softwareVersion: 11.25.2
softwareVersion: 11.25.4
url: 'https://github.com/italia/design-comuni-plone-theme'
usedBy:
- ASP Comuni Modenesi Area Nord
Expand Down
22 changes: 11 additions & 11 deletions src/components/ImageWithErrors/ImageWithErrors.jsx

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions src/components/ItaliaTheme/View/Commons/Dates.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
const start = viewDate(intl.locale, content.start);
// format and save date into new variable depending on recurrence of event
const end = viewDate(intl.locale, actualEndDate);

const openEnd = content?.open_end;
const wholeDay = content?.whole_day;

Expand Down Expand Up @@ -132,11 +133,11 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
<div className="point-list">
<div className="point-list-aside point-list-warning">
<span className="point-date font-monospace">
{end.format('DD')}
{end?.format('DD')}
</span>
<span className="point-month">{end.format('MMMM')}</span>
{!end.isSame(start, 'year') && (
<span className="point-month">{end.format('YYYY')}</span>
<span className="point-month">{end?.format('MMMM')}</span>
{!end?.isSame(start, 'year') && (
<span className="point-month">{end?.format('YYYY')}</span>
)}
</div>
<div className="point-list-content">
Expand All @@ -147,7 +148,7 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
>
<CardBody tag="div" className={'card-body'}>
<CardTitle tag="p">
{!content.whole_day && `${end.format('HH:mm')} - `}
{!content.whole_day && `${end?.format('HH:mm')} - `}
{intl.formatMessage(messages.end)}
</CardTitle>
</CardBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,25 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {
// because to set a recurrence, the event must have the same date as start and end date
const renderOnlyStart =
Moment(content.end).format('DD-MM-Y') ===
Moment(content.start).format('DD-MM-Y') && !content.recurrence;
Moment(content.start).format('DD-MM-Y');

let eventRecurrenceText = null;

if (content['@type'] === 'Event') {
if (content.recurrence) {
const isRecurrenceByDay = content.recurrence.includes('BYDAY=+');
const isRecurrenceByMonthDay = content.recurrence.includes('BYMONTHDAY=');
const isWeekdaySunday = content.recurrence
.split('BYDAY')[1]
?.includes('SU');

const RRULE_LANGUAGE = rrulei18n(intl, Moment);
eventRecurrenceText = rruleSet.rrules()[0]?.toText(
(t) => {
if (Moment.locale(intl.locale) === 'it' && isRecurrenceByDay) {
if (
Moment.locale(intl.locale) === 'it' &&
(isRecurrenceByDay || isRecurrenceByMonthDay)
) {
RRULE_LANGUAGE.strings.th = '°';
RRULE_LANGUAGE.strings.nd = '°';
RRULE_LANGUAGE.strings.rd = '°';
Expand Down Expand Up @@ -91,11 +96,11 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {

return content['@type'] === 'Event' ? (
<p className="h4 py-2">
{!Moment(content.end).isSame(actualEndDate) &&
{(content.recurrence || !renderOnlyStart) &&
!openEnd &&
!renderOnlyStart &&
`dal ${Moment(content.start).format('DD-MM-Y')} al ${endDate}`}
{(renderOnlyStart || Moment(content.end).isSame(actualEndDate)) &&
{!content.recurrence &&
renderOnlyStart &&
!openEnd &&
`${Moment(content.start).format('DD-MM-Y')}`}
{openEnd &&
Expand Down
2 changes: 1 addition & 1 deletion src/config/italiaConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default function applyConfig(voltoConfig) {
...(config.settings.controlpanels ?? []),
{
'@id': '/release-log',
group: 'Generali',
group: 'General',
title: 'Novità ultimi rilasci',
id: 'release-log',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,7 @@ class RecurrenceWidget extends Component {
)}
value={formValues.freq}
onChange={this.onChangeRule}
noValueOption={false}
/>
{OPTIONS.frequences[formValues.freq].interval && (
<IntervalField
Expand All @@ -1004,7 +1005,6 @@ class RecurrenceWidget extends Component {
onChange={this.onChangeRule}
/>
)}

{/***** byday *****/}
{OPTIONS.frequences[formValues.freq].byday && (
<ByDayField
Expand All @@ -1013,7 +1013,6 @@ class RecurrenceWidget extends Component {
onChange={this.onChangeRule}
/>
)}

{/***** bymonth *****/}
{OPTIONS.frequences[formValues.freq].bymonth && (
<ByMonthField
Expand All @@ -1027,7 +1026,6 @@ class RecurrenceWidget extends Component {
onChange={this.onChangeRule}
/>
)}

{/***** byyear *****/}
{OPTIONS.frequences[formValues.freq].byyear && (
<ByYearField
Expand All @@ -1042,7 +1040,6 @@ class RecurrenceWidget extends Component {
onChange={this.onChangeRule}
/>
)}

{/*-- ends after N recurrence or date --*/}
<EndField
value={formValues.recurrenceEnds}
Expand Down
3 changes: 2 additions & 1 deletion src/helpers/dates.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export const getRealStartAndEndWithRecurrence = (

export const getRealEventEnd = (content, rruleSet) => {
let actualEndDate = content.end;
if (content.recurrence) {

if (content.recurrence && rruleSet.rrules()[0].options.until) {
actualEndDate = rruleSet.rrules()[0].options.until;
}
return actualEndDate;
Expand Down
20 changes: 20 additions & 0 deletions src/theme/_cms-ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,14 @@ body.cms-ui {
}

&.section-controlpanel {
.grid > .row {
// HIDE TAXONOMIES CONTROLPANEL UNTIL #62343 IS DONE
> .column:has([href='/controlpanel/taxonomies']),
> .column:has([href='/controlpanel/volto-settings']) {
display: none;
}
}

a {
text-decoration: none;

Expand All @@ -484,6 +492,18 @@ body.cms-ui {
display: none;
}
}
// Hide the help text in the configuration widgets
// TODO this is a temporary fix, a release needs to be made on every add-on to fix this
.footer-configuration-widget .stretched.twelve.wide.column:has(p.help),
.slimheader-configuration-widget
.wrapper:has(label[for='menu-configuration']),
.subfooter-configuration-widget
.wrapper:has(label[for='menu-configuration']),
.secondary-menu-configuration-widget
.wrapper:has(label[for='menu-configuration']),
.menu-configuration-widget .wrapper:has(label[for='menu-configuration']) {
display: none !important;
}
}

[data-rbd-draggable-context-id] {
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8232,7 +8232,7 @@ __metadata:
volto-venue: 4.1.0
webpack-image-resize-loader: ^5.0.0
peerDependencies:
"@plone/volto": 17.19.0
"@plone/volto": 17.20.3
languageName: unknown
linkType: soft

Expand Down

0 comments on commit f3c288c

Please sign in to comment.