Skip to content

Commit

Permalink
fix: overflowing help text in Numbers block sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
deodorhunter committed Oct 13, 2023
1 parent 545439c commit b61112b
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 51 deletions.
17 changes: 17 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@
<!--- -----------------------------------------------------------------
Esempio:
---------------------------------------------------------------------
## Versione 7.10.9 (12/09/2023)
### Migliorie
- Fissato il layout di stampa per pagine con Accordion
### Novità
- Nuovo blocco "Informazioni" [`Istruzioni`](https://docs.google.com/document/d/1SThuxa_ah0BuNXukWs564kKPfprK41WLQE8Mome-0xg/edit#heading=h.7ty110jumgmd)
### Fix
- il numero di telefono dentro card ufficio adesso è visibile anche senza indirizzo
-->

Expand All @@ -20,16 +27,26 @@
----------------------------------------------------------------------
## Versione X.X.X (dd/mm/yyyy)
### Migliorie
- ...
### Novità
- ... [`Istruzioni`](url della documentazione relativa alla novità)
### Fix
- ...
-->

## Versione 8.x.x (xx/xx/2023)

### Fix

- Visualizzazione sidebar in edit del blocco Numeri: sistemato overflowing del testo di aiuto

## Versione 8.7.8 (12/10/2023)

### Fix
Expand Down
107 changes: 56 additions & 51 deletions src/components/ItaliaTheme/Blocks/NumbersBlock/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,58 +35,63 @@ const Sidebar = ({
const intl = useIntl();

return (
<Segment.Group raised>
<header className="header pulled">
<h2>
<FormattedMessage id="numbers_block" defaultMessage="Blocco numeri" />
</h2>
</header>
<Accordion className="form">
<Accordion.Content active={true}>
<ObjectBrowserWidget
id="background"
title={intl.formatMessage(messages.backgroundImage)}
description=""
required={false}
widgetOptions={{
pattern_options: {
selectableTypes: ['Image'],
maximumSelectionSize: 1,
},
}}
value={data.background ?? []}
onChange={(id, value) =>
onChangeBlock(block, { ...data, [id]: value })
}
/>
<div className="numbers-block-sidebar-form-container">
<Segment.Group raised>
<header className="header pulled">
<h2>
<FormattedMessage
id="numbers_block"
defaultMessage="Blocco numeri"
/>
</h2>
</header>
<Accordion className="form">
<Accordion.Content active={true}>
<ObjectBrowserWidget
id="background"
title={intl.formatMessage(messages.backgroundImage)}
description=""
required={false}
widgetOptions={{
pattern_options: {
selectableTypes: ['Image'],
maximumSelectionSize: 1,
},
}}
value={data.background ?? []}
onChange={(id, value) =>
onChangeBlock(block, { ...data, [id]: value })
}
/>

<IconWidget
id="icon1"
value={data.icon1 ?? ''}
defaultOptions={defaultIconWidgetOptions}
onChange={(name, value) => {
onChangeBlock(block, { ...data, [name]: value });
}}
/>
<IconWidget
id="icon2"
value={data.icon2 ?? ''}
defaultOptions={defaultIconWidgetOptions}
onChange={(name, value) => {
onChangeBlock(block, { ...data, [name]: value });
}}
/>
<IconWidget
id="icon3"
value={data.icon3 ?? ''}
defaultOptions={defaultIconWidgetOptions}
onChange={(name, value) => {
onChangeBlock(block, { ...data, [name]: value });
}}
/>
</Accordion.Content>
</Accordion>
</Segment.Group>
<IconWidget
id="icon1"
value={data.icon1 ?? ''}
defaultOptions={defaultIconWidgetOptions}
onChange={(name, value) => {
onChangeBlock(block, { ...data, [name]: value });
}}
/>
<IconWidget
id="icon2"
value={data.icon2 ?? ''}
defaultOptions={defaultIconWidgetOptions}
onChange={(name, value) => {
onChangeBlock(block, { ...data, [name]: value });
}}
/>
<IconWidget
id="icon3"
value={data.icon3 ?? ''}
defaultOptions={defaultIconWidgetOptions}
onChange={(name, value) => {
onChangeBlock(block, { ...data, [name]: value });
}}
/>
</Accordion.Content>
</Accordion>
</Segment.Group>
</div>
);
};

Expand Down
3 changes: 3 additions & 0 deletions src/theme/_cms-ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ body.cms-ui {
}
}
.sidebar-container {
.numbers-block-sidebar-form-container {
padding-bottom: 1rem;
}
.breadcrumbs {
.breadcrumb {
flex-wrap: wrap;
Expand Down

0 comments on commit b61112b

Please sign in to comment.