Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Us 46340 ordinamento risultati ricerca tastiera #341

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@
### Fix

- Sistemato l'allineamento degli elementi nel blocco Contatti: se ci sono meno di tre elementi l'allineamento è centrato, se ce ne sono più di 3 l'allineamento è a sinistra.
- Sistemata accessibilità per il menu a tendina "Ordina Per" nella pagina di ricerca
10 changes: 2 additions & 8 deletions src/components/ItaliaTheme/Blocks/ContactsBlock/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,9 @@ class Edit extends SubblocksEdit {
</div>

<SubblocksWrapper node={this.node}>
<Row
className={
this.state.subblocks.length > 3
? 'justify-content-start'
: 'justify-content-center'
}
>
<Row className="justify-content-center">
{this.state.subblocks.map((subblock, subindex) => (
<Col lg="4" key={subblock.id} className="pb-3">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La classe pb-3 va lasciata perchè nel caso in cui ci siano piu di 3 blocchi e quindi vanno a capo devono rimanere distanziati e non appiccicati

<Col lg="4" key={subblock.id}>
<EditBlock
data={subblock}
index={subindex}
Expand Down
8 changes: 1 addition & 7 deletions src/components/ItaliaTheme/Blocks/ContactsBlock/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,7 @@ const AccordionView = ({ data, block }) => {
)}
</div>
</div>
<Row
className={
data.subblocks.length > 3
? 'justify-content-start'
: 'justify-content-center'
}
>
<Row className="justify-content-center">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

la classe della row deve rimanere come era, con la condizione sul fatto che ci siano o meno più di 3 blocchi. Se ci sono meno di 3 blocchi questi rimangono centrati, se ce ne sono piu di 3 sono allineati a sinistra

{data.subblocks.map((subblock, index) => (
<Col lg="4" key={subblock.id} className="pb-3">
<ViewBlock
Expand Down
7 changes: 6 additions & 1 deletion src/components/ItaliaTheme/Search/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,14 @@ const Search = () => {
sortOnOptions.filter((o) => o.value === sortOn)[0]
}
label={intl.formatMessage(messages.orderBy)}
placeholder={intl.formatMessage(messages.orderBy)}
placeholder={
sortOnOptions.find((o) => o.value === sortOn).label
}
onChange={(opt) => setSortOn(opt.value)}
options={sortOnOptions}
defaultValue={sortOnOptions.find(
(o) => o.value === 'relevance',
)}
/>
</Col>
</Row>
Expand Down
6 changes: 5 additions & 1 deletion src/components/SelectInput/SelectInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ const SelectInput = ({
options,
components = {},
reactSelect,
defaultValue,
}) => {
const intl = useIntl();
const Select = reactSelect.default;
Expand Down Expand Up @@ -332,7 +333,9 @@ const SelectInput = ({
isSearchable={isSearchable}
isMulti={isMulti}
isClearable={isClearable}
aria-label={placeholder}
aria-label={label}
aria-live="polite"
aria-labelledby={id}
ariaLiveMessages={getSelectAriaLiveMessages(intl)}
noOptionsMessage={() =>
intl.formatMessage(messages.select_noOptionsMessage)
Expand All @@ -346,6 +349,7 @@ const SelectInput = ({
}`
}
classNamePrefix={'react-select'}
defaultValue={defaultValue}
/>
</div>
);
Expand Down