diff --git a/deployment/frontend/src/components/Search.tsx b/deployment/frontend/src/components/Search.tsx
index 043454ae6..7f39b6212 100644
--- a/deployment/frontend/src/components/Search.tsx
+++ b/deployment/frontend/src/components/Search.tsx
@@ -105,14 +105,18 @@ export default function Search({
-
+
{!isSearch ||
watch('search') !=
filters?.find((f) => f.key == 'search')?.value ? (
-
+
Search
) : (
diff --git a/deployment/frontend/src/components/_shared/DownloadPopup.tsx b/deployment/frontend/src/components/_shared/DownloadPopup.tsx
index a3cba8d29..be9a1ab13 100644
--- a/deployment/frontend/src/components/_shared/DownloadPopup.tsx
+++ b/deployment/frontend/src/components/_shared/DownloadPopup.tsx
@@ -305,8 +305,8 @@ export function DownloadPopup({
/>
Do you want to subscribe to
- news and updates on the data
- explorer? By checking this
+ news and updates on the Data
+ Explorer? By checking this
box you agree to receive
updates from WRI. You can
change your email
@@ -415,7 +415,6 @@ export function DownloadPopup({
value: c.iso,
})
)}
- placeholder="Ex: USA"
maxWidth="w-full"
/>
diff --git a/deployment/frontend/src/components/_shared/SimpleSelect.tsx b/deployment/frontend/src/components/_shared/SimpleSelect.tsx
index beee6ae0d..883237bca 100644
--- a/deployment/frontend/src/components/_shared/SimpleSelect.tsx
+++ b/deployment/frontend/src/components/_shared/SimpleSelect.tsx
@@ -19,7 +19,7 @@ export interface Option
{
interface SimpleSelectProps {
options: PathValue & Option>[]
- placeholder: string
+ placeholder?: string
className?: string
maxWidth?: string
formObj?: UseFormReturn
@@ -71,7 +71,8 @@ export default function SimpleSelect({
id={id}
className={classNames(
'relative text-left block w-full rounded-md border-0 px-5 py-3 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:border-b-2 focus:border-blue-800 focus:bg-slate-100 focus:ring-0 focus:ring-offset-0 sm:text-sm sm:leading-6',
- className ?? ''
+ className ?? '',
+ !placeholder ? 'min-h-[2.5rem]' : ''
)}
>
-
+
+
setQuery(e.target.value)}
value={query}
name="search"
- placeholder="Search applications"
+ placeholder={`Search applications`}
aria-label="search"
- className="h-14 rounded-sm block w-full border-0 px-5 py-2 text-gray-900 shadow-wri-small ring-1 ring-inset ring-gray-300 placeholder:text-gray-900 placeholder:text-base border-b-2 border-blue-800 focus:bg-slate-100 focus:ring-0 focus:ring-offset-0 sm:text-sm sm:leading-6"
+ className="h-full block w-full border-0 px-5 py-2 text-[#000000] shadow-wri-small rounded-tr-[3px] rounded-br-[3px] placeholder:text-gray-900 placeholder:text-base focus:bg-slate-100 focus:ring-0 focus:ring-offset-0 sm:text-sm sm:leading-6 leading-[19.2px] rounded-tl-[3px] rounded-bl-[3px] border-r-0"
/>
- {isLoading ? (
-
- ) : (
-
-
-
- )}
+
+ {isLoading ? (
+
+ ) : (
+
+ Search
+
+ )}
+
diff --git a/deployment/frontend/src/components/applications/Hero.tsx b/deployment/frontend/src/components/applications/Hero.tsx
index 7971cb027..09430077d 100644
--- a/deployment/frontend/src/components/applications/Hero.tsx
+++ b/deployment/frontend/src/components/applications/Hero.tsx
@@ -29,7 +29,7 @@ export function Hero({ application }: { application: Application }) {
/>
diff --git a/deployment/frontend/src/components/dashboard/datasets/admin/TopicsSelect.tsx b/deployment/frontend/src/components/dashboard/datasets/admin/TopicsSelect.tsx
index fceb970af..07351fa1a 100644
--- a/deployment/frontend/src/components/dashboard/datasets/admin/TopicsSelect.tsx
+++ b/deployment/frontend/src/components/dashboard/datasets/admin/TopicsSelect.tsx
@@ -114,6 +114,10 @@ function TopicsInner({
})
.flat()
+ function getTopicByName(topicName: string) {
+ return flattenedTopicHierarchy.find((topic) => topic.name === topicName)
+ }
+
function BuildHierarchy(
topic: TopicHierarchy,
level: number
@@ -188,7 +192,7 @@ function TopicsInner({
- {item}
+ {getTopicByName(item)?.title ??
+ item}
-
- /datasets/
-
+ {editing ? (
+
+ ) : (
+
+ /datasets/
+
+ )}
diff --git a/deployment/frontend/src/components/home/Hero.tsx b/deployment/frontend/src/components/home/Hero.tsx
index 2dc47a562..043e46214 100644
--- a/deployment/frontend/src/components/home/Hero.tsx
+++ b/deployment/frontend/src/components/home/Hero.tsx
@@ -100,7 +100,7 @@ export function Hero() {
) : (
setIsOpen(true)}
- className="px-3 py-2 tracking-wide rounded outline-wri-gold outline-1 outline text-sm font-semibold leading-6 text-white"
+ className="px-3 py-2 tracking-wide rounded outline-wri-gold outline-1 outline font-semibold leading-6 text-white"
id="nav-login-button"
>
Login
@@ -121,7 +121,7 @@ export function Hero() {
{item.title}
@@ -132,7 +132,7 @@ export function Hero() {
) : (
setIsOpen(true)}
- className="px-3 py-2 tracking-wide rounded outline-wri-gold outline-1 outline text-sm font-semibold leading-6 text-white"
+ className="px-3 py-2 tracking-wide rounded outline-wri-gold outline-1 outline font-semibold leading-6 text-white"
>
Login
@@ -243,6 +243,9 @@ export function Hero() {
diff --git a/deployment/frontend/src/components/search/FilteredSearchLayout.tsx b/deployment/frontend/src/components/search/FilteredSearchLayout.tsx
index 06aad5d31..a8ff147cb 100755
--- a/deployment/frontend/src/components/search/FilteredSearchLayout.tsx
+++ b/deployment/frontend/src/components/search/FilteredSearchLayout.tsx
@@ -477,7 +477,7 @@ export default function FilteredSearchLayout({
<>
- {filters.map((f) => (
-
-
- {f.title}: {f.label}
-
-
{
- setFilters((prev) => {
- const newFilters = [...prev]
- newFilters.splice(
- newFilters.findIndex(
- (of) =>
- f.key == of.key &&
- of.value == f.value
- ),
- 1
- )
- return newFilters
- })
- if (setFacetSelectedCount)
- setFacetSelectedCount((prev) => {
- const newFacetSelectedCount = {
- ...prev,
- }
- //@ts-ignore
- newFacetSelectedCount[f.key] -= 1
- return newFacetSelectedCount
- })
-
- if (setValue)
- setValue((prev) => {
- return prev.filter(
- (value) => value !== f.label
+ {filters
+ .filter((f) => f.value !== '')
+ .map((f) => (
+
+
+ {f.title}: {f.label}
+
+
{
+ setFilters((prev) => {
+ const newFilters = [...prev]
+ newFilters.splice(
+ newFilters.findIndex(
+ (of) =>
+ f.key == of.key &&
+ of.value == f.value
+ ),
+ 1
)
+ return newFilters
})
- }}
- >
-
-
-
- ))}
+ if (setFacetSelectedCount)
+ setFacetSelectedCount((prev) => {
+ const newFacetSelectedCount = {
+ ...prev,
+ }
+ //@ts-ignore
+ newFacetSelectedCount[f.key] -= 1
+ return newFacetSelectedCount
+ })
+
+ if (setValue)
+ setValue((prev) => {
+ return prev.filter(
+ (value) => value !== f.label
+ )
+ })
+ }}
+ >
+
+
+
+ ))}
{filters.length ? (
>
query: string
@@ -36,9 +36,11 @@ export default function TopicsSearch({
onChange={(e) => setQuery(e.target.value)}
value={query}
name="search"
- placeholder={`Search ${groupType === "Teams" ? "teams" : "topics"}`}
+ placeholder={`Search ${
+ groupType === 'Teams' ? 'teams' : 'topics'
+ }`}
aria-label="search"
- className="h-full block w-full border-0 px-5 py-2 text-[#4f4e4e] shadow-wri-small ring-1 ring-inset ring-gray-300 placeholder:text-[#4f4e4e] placeholder:font-light focus:bg-slate-100 focus:ring-0 focus:ring-offset-0 sm:text-sm sm:leading-6 rounded-tl-[3px] rounded-bl-[3px] border-r-0"
+ className="h-full block w-full border-0 px-5 py-2 text-[#000000] shadow-wri-small rounded-tr-[3px] rounded-br-[3px] placeholder:text-gray-900 placeholder:text-base focus:bg-slate-100 focus:ring-0 focus:ring-offset-0 sm:text-sm sm:leading-6 leading-[19.2px] rounded-tl-[3px] rounded-bl-[3px] border-r-0"
/>
{isLoading ? (
@@ -47,13 +49,12 @@ export default function TopicsSearch({
Search
)}
-
diff --git a/deployment/frontend/src/pages/applications/index.tsx b/deployment/frontend/src/pages/applications/index.tsx
index 8073c5fec..5a28931ed 100644
--- a/deployment/frontend/src/pages/applications/index.tsx
+++ b/deployment/frontend/src/pages/applications/index.tsx
@@ -28,7 +28,9 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
ctx: { session },
transformer: superjson,
})
- await Promise.all([await helpers.applications.getAllApplications.prefetch()])
+ await Promise.all([
+ await helpers.applications.getAllApplications.prefetch(),
+ ])
return {
props: {
@@ -93,7 +95,9 @@ export default function ApplicationsPage(
}))
}
- const links = [{ label: 'Applications', url: '/applications', current: true }]
+ const links = [
+ { label: 'Applications', url: '/applications', current: true },
+ ]
return (
<>
+
+
+
+
+ This page lets you explore all the data associated with
+ a specific WRI application or data product.
+
+
+
{isLoading ? (
) : (
diff --git a/deployment/frontend/src/pages/index.tsx b/deployment/frontend/src/pages/index.tsx
index 03b967fdb..e63323d01 100644
--- a/deployment/frontend/src/pages/index.tsx
+++ b/deployment/frontend/src/pages/index.tsx
@@ -323,7 +323,7 @@ export default function Home(
) : (
1000) {
+ throw new Error('Input too long')
+ }
+ str = str.replace(/^\s+|\s+$/g, '') // trim
+ str = str.toLowerCase()
+
// remove accents, swap ñ for n, etc
- var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
- var to = "aaaaeeeeiiiioooouuuunc------";
- for (var i=0, l=from.length ; i