Skip to content

Commit

Permalink
fix: overflowing help text in Numbers block sidebar (#367)
Browse files Browse the repository at this point in the history
Co-authored-by: Piero Nicolli <[email protected]>
  • Loading branch information
deodorhunter and pnicolli authored Oct 13, 2023
1 parent e584f63 commit ab68178
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 52 deletions.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
- ...
-->


## Versione X.X.X (dd/mm/yyyy)

### Migliorie
Expand All @@ -56,6 +55,7 @@
- Risolto un bug nel componente Object Browser che permetteva di selezionare più elementi di quelli consentiti
- Alcune icone mancanti nel widget icone fontawesome sono state rese nuovamente visibili
- Sistemate inconsistenze nella visualizzazione di alcuni tipi di elementi della lista degli allegati in Cartella Modulistica
- Visualizzazione sidebar in edit del blocco Numeri: sistemato overflowing del testo di aiuto

## Versione 8.7.8 (12/10/2023)

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 ab68178

Please sign in to comment.