Skip to content

Commit

Permalink
Merge pull request #847 from IATI/snags
Browse files Browse the repository at this point in the history
Fixing various snags
  • Loading branch information
tillywoodfield authored Jan 8, 2025
2 parents 1baf79c + 885cc6b commit f94a732
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
3 changes: 1 addition & 2 deletions src/components/FileStatusInfo.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<p>
This file has been tested against the IATI Standard XML Schema, and the IATI Standard Rulesets. For more
information, see
This data has been tested against the IATI Standard XML Schema and IATI Standard Rulesets. For more information, see
<a href="https://docs.validator.iatistandard.org/">the documentation</a>.
</p>

Expand Down
4 changes: 2 additions & 2 deletions src/components/organisation/DocumentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import { getSortDirection, getSortValue, sortDocuments, sortOptions } from "../../utils";
import DocumentListItem from "./DocumentListItem.vue";
const headerClassNames = "hidden border-0 border-y border-solid border-gray-300 p-2.5 font-bold sm:block";
const headerClassNames = "hidden border-0 border-b border-solid border-gray-300 p-2.5 font-bold sm:block";
const props = defineProps({
documents: { type: Object, default: () => {} },
sortvariable: { type: String, default: "" },
});
</script>

<template>
<div class="grid grid-cols-1">
<div class="grid grid-cols-1 border border-solid border-gray-300">
<div class="sticky top-0 grid grid-cols-5 gap-0 bg-white">
<div class="first:pl-3.5" :class="headerClassNames">File Name</div>
<div :class="headerClassNames">Identified in Registry</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const id = event.target.innerHTML;
const target = window.document.getElementById(id === "0 - 9" ? "123" : id.toLowerCase());
if (target) {
target.scrollIntoView({ behavior: "smooth", block: "center" });
target.scrollIntoView({ behavior: "smooth", block: "start" });
}
};
</script>
Expand Down
8 changes: 4 additions & 4 deletions src/components/organisation/OrganisationsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
const anchors = computed(() =>
organisations.value.reduce((items, curr) => {
const firstChar = curr.title.split("")[0].toLowerCase();
return isNaN(Number(firstChar)) && !items.map((item) => item.anchor).includes(firstChar)
? items.concat({ anchor: firstChar, name: curr.name })
const identifier = isNaN(Number(firstChar)) ? firstChar : "123";
return !items.map((item) => item.anchor).includes(identifier)
? items.concat({ anchor: identifier, name: curr.name })
: items;
}, []),
);
Expand All @@ -36,9 +37,8 @@
Found <b>{{ organisations.length }}</b> organisations.
</div>
<hr class="mb-2" />
<span :id="123"></span>
<div v-for="organisation in organisations" :key="organisation.name" class="p-2">
<span v-if="isAnchored(organisation.name)" :id="getAnchor(organisation.name).anchor"></span>
<span v-if="isAnchored(organisation.name)" :id="getAnchor(organisation.name).anchor" class="scroll-mt-12"></span>
<RouterLink :to="`/organisation/${organisation.name}`">{{ organisation.title }}</RouterLink>
</div>
</div>
Expand Down
5 changes: 2 additions & 3 deletions src/pages/HomePage.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<template>
<p>
The IATI Validator is an online tool for checking if data aligns with the rules and guidance of IATI Standard. It
allows users to check and improve the quality of IATI data to ensure it is accessible and useful to anyone working
with data on development and humanitarian resources and results.
The IATI Validator is a tool for assessing data using the rules and guidance of the IATI Standard. It provides
information on how to improve the quality of IATI data to ensure it is accessible and useful to data users.
</p>

<div class="iati-card-gallery my-12">
Expand Down
6 changes: 3 additions & 3 deletions src/pages/OrganisationsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<template>
<h1>Public Data Viewer</h1>
<p>
Search for an organisation and access the validation results on their public IATI data. The organisation list and
the public IATI data is regularly refreshed from the IATI Registry. New organisations and IATI files will not
immediately be visible here, but after at most a day.
Search for an organisation and access the validation results of their public IATI data. The organisation list and
the public IATI data is regularly refreshed from the IATI Registry. New organisations and IATI files will be visible
within 24 hours.
</p>
<OrganisationsList :is-fetching="isFetching" :organisations="organisations" />
</template>
6 changes: 3 additions & 3 deletions src/pages/ReportPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@
</script>
<template>
<h1>File Validation Report</h1>
<RouterLink v-if="isTestFile && dataset" :to="`/validate/${dataset.session_id}`" class="flex">
<IconChevron class="mr-2" />
<span>Return to your workspace</span>
</RouterLink>
<h1>File Validation Report</h1>
<div v-if="organisation || document || dataset">
<div>
<h2 class="text-xl">
<template v-if="organisation">
<RouterLink :to="`/organisation/${organisation.name}`">{{ organisation.title }}</RouterLink>
-
Expand All @@ -139,7 +139,7 @@
{{ getDocumentFileName(document) }}
</RouterLink>
<div v-if="dataset && isTestFile">{{ dataset.filename }}</div>
</div>
</h2>
<DocumentInfo v-if="dataset && dataset.report" :document="document" :report="dataset.report" />
<CaptionedLoadingSpinner v-if="(!dataset || !dataset.report) && !errors.length">
Loading Report ...
Expand Down

0 comments on commit f94a732

Please sign in to comment.