Skip to content

Commit

Permalink
Improve geocoder autocomplete results UI
Browse files Browse the repository at this point in the history
  • Loading branch information
seballot committed Aug 16, 2020
1 parent badc0cf commit 7b96317
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 32 deletions.
41 changes: 11 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/js/components/search-bar/search-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export class SearchBarComponent {
value.getRegion() ||
value.getCountry()
}</span>`,
icon: 'gogo-icon-marker-symbol'
})),
];
}
Expand Down
16 changes: 15 additions & 1 deletion src/scss/components/search-bar/_search-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
&:before { content: '"'; }
}
}
+ .search_elements, &.search_geocoded + .option {
+ .search_elements, &.search_geocoded + .option, &.geocoded + .option {
border-top: 1px solid #eee;
padding-top: .3rem;
margin-top: .3rem;
Expand All @@ -187,6 +187,20 @@
}
&.search_elements {
padding-top: .6rem;
.icon {
line-height: 1rem;
opacity: .9;
font-size: 1rem;
}
}
&.geocoded {
.label {
font-size: .9rem;
}
.icon {
line-height: .9rem;
opacity: .9;
}
}
}
}
Expand Down
12 changes: 11 additions & 1 deletion web/dev-local.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@
taxonomy: taxonomy,
elements: elements
},
theme: "flat"
search: {
geocodingProvider: "mapbox",
meta: {
apiKey: "pk.eyJ1IjoiZ29nb2NhcnRvIiwiYSI6ImNqYnhxeHUxZzJ3cG4zMnIyNmZiajF6dmwifQ.2G5IM4roIgpU_fvPBOpssw"
}
},
theme: "flat",
fonts: {
mainFont: 'Nunito'
},
language: "fr"
});
});
</script>
Expand Down

0 comments on commit 7b96317

Please sign in to comment.