Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: update mobile spacing and focus states #135

Merged
merged 2 commits into from
Jan 30, 2025
Merged
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
54 changes: 54 additions & 0 deletions src/assets/candid-platinum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/components/AsyncTypeahead/AsyncTypeahead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ defineExpose({
}

.pdap-typeahead-input {
@apply rounded-md;
@apply rounded-sm;
}

.pdap-typeahead-input,
.pdap-typeahead-list {
@apply bg-neutral-50 border-2 border-neutral-500 border-solid p-2 text-neutral-950;
@apply bg-neutral-50 border-2 border-brand-gold-300 border-solid p-2 text-neutral-950;
}

.pdap-typeahead-input::placeholder {
Expand All @@ -244,7 +244,7 @@ defineExpose({
.pdap-typeahead-input:focus,
.pdap-typeahead-input:focus-within,
.pdap-typeahead-input:focus-visible {
@apply border-2 border-brand-gold border-solid outline-none;
@apply border-2 border-brand-gold-300 border-solid outline-none;
}

.pdap-typeahead-list {
Expand Down
27 changes: 14 additions & 13 deletions src/components/Footer/PdapFooter.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<footer
class="bg-brand-wine text-wineneutral-50 dark:text-wineneutral-950 flex flex-col justify-center lg:flex-row gap-4 xl:gap-12 p-2 lg:p-2 lg:px-8 relative lg:sticky lg:bottom-0 text-med xl:text-xl"
class="bg-brand-wine text-wineneutral-50 dark:text-wineneutral-950 flex flex-col justify-center lg:flex-row gap-4 xl:gap-12 p-2 md:p-3 relative lg:sticky lg:bottom-0 text-med xl:text-xl"
>
<!-- LINKS -->
<ul
Expand Down Expand Up @@ -35,25 +35,24 @@
</ul>
<!-- COPYRIGHT AND TRANSPARENCY -->
<div
class="flex gap-4 justify-between text-lg lg:justify-start lg:items-center lg:ml-auto"
class="flex flex-col md:flex-row-reverse gap-4 justify-between text-med lg:justify-start lg:items-center lg:ml-auto"
>
<p class="lg:max-w-[325px] lg:text-right xl:max-w-[375px]">
© {{ new Date().getFullYear() }} Police Data Accessibility Project is a
non-profit. EIN: 85-4207132.
</p>

<!-- Widget / logo links -->
<a
href="https://www.guidestar.org/profile/85-4207132"
<a

Check warning on line 41 in src/components/Footer/PdapFooter.vue

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
href="https://www.guidestar.org/profile/shared/2ca08a66-da60-4a83-a4c2-c9ddadbc416d"

Check warning on line 42 in src/components/Footer/PdapFooter.vue

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
target="_blank"
rel="noreferrer"
>
<img
class="w-14 h-14"
alt="platinum transparency"
src="https://widgets.guidestar.org/gximage2?o=9973356&l=v4"
<img

Check warning on line 46 in src/components/Footer/PdapFooter.vue

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
class="w-14 h-14 overflow-hidden"
alt="guidestar transparency seal"
src="/src/assets/candid-platinum.svg"
/>
</a>
<p class="lg:max-w-[325px] lg:text-right xl:max-w-[375px]">
© {{ new Date().getFullYear() }} Police Data Accessibility Project is a
non-profit. EIN: 85-4207132.
</p>
</div>
</footer>
</template>
Expand All @@ -73,6 +72,7 @@
faInbox,
faBook,
faEnvelope,
faArrowsToDot,
} from '@fortawesome/free-solid-svg-icons';

const iconMap = new Map<FooterIconName, IconDefinition>([
Expand All @@ -82,6 +82,7 @@
[FOOTER_LINK_ICONS.JOBS, faSmile],
[FOOTER_LINK_ICONS.NEWSLETTER, faInbox],
[FOOTER_LINK_ICONS.DOCS, faBook],
[FOOTER_LINK_ICONS.PUBLISH, faArrowsToDot],
]);

const links = inject<PdapFooterSocialLinks[]>('footerLinks', [
Expand Down
11 changes: 6 additions & 5 deletions src/components/Footer/__snapshots__/footer.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Footer component > Renders a footer 1`] = `
<footer class="bg-brand-wine text-wineneutral-50 dark:text-wineneutral-950 flex flex-col justify-center lg:flex-row gap-4 xl:gap-12 p-2 lg:p-2 lg:px-8 relative lg:sticky lg:bottom-0 text-med xl:text-xl">
<footer class="bg-brand-wine text-wineneutral-50 dark:text-wineneutral-950 flex flex-col justify-center lg:flex-row gap-4 xl:gap-12 p-2 md:p-3 relative lg:sticky lg:bottom-0 text-med xl:text-xl">
<!-- LINKS -->
<ul class="grid grid-cols-2 gap-2 md:grid-cols-[auto_auto_auto] lg:w-max lg:gap-x-3 xl:gap-x-4">
<li class="w-max">
Expand Down Expand Up @@ -53,11 +53,12 @@ exports[`Footer component > Renders a footer 1`] = `
<!--v-if-->
</li>
</ul><!-- COPYRIGHT AND TRANSPARENCY -->
<div class="flex gap-4 justify-between text-lg lg:justify-start lg:items-center lg:ml-auto">
<p class="lg:max-w-[325px] lg:text-right xl:max-w-[375px]"> © 2025 Police Data Accessibility Project is a non-profit. EIN: 85-4207132. </p><!-- Widget / logo links -->
<a href="https://www.guidestar.org/profile/85-4207132" rel="noreferrer" target="_blank">
<img alt="platinum transparency" class="w-14 h-14" src="https://widgets.guidestar.org/gximage2?o=9973356&amp;l=v4">
<div class="flex flex-col md:flex-row-reverse gap-4 justify-between text-med lg:justify-start lg:items-center lg:ml-auto">
<!-- Widget / logo links -->
<a href="https://www.guidestar.org/profile/shared/2ca08a66-da60-4a83-a4c2-c9ddadbc416d" rel="noreferrer" target="_blank">
<img alt="guidestar transparency seal" class="w-14 h-14 overflow-hidden" src="/src/assets/candid-platinum.svg">
</a>
<p class="lg:max-w-[325px] lg:text-right xl:max-w-[375px]"> © 2025 Police Data Accessibility Project is a non-profit. EIN: 85-4207132. </p>
</div>
</footer>
`;
1 change: 1 addition & 0 deletions src/components/Footer/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export const FOOTER_LINK_ICONS = {
NEWSLETTER: 'newsletter',
DOCS: 'docs',
EMAIL: 'email',
PUBLISH: 'publish',
} as const;
4 changes: 2 additions & 2 deletions src/components/Footer/footer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ test('Renders EIN number', () => {

test('Renders Guidestar badge', () => {
const wrapper = mount(PdapFooter, base);
const guidestarImg = wrapper.find('img[alt="platinum transparency"]');
const guidestarImg = wrapper.find('img[alt="guidestar transparency seal"]');

expect(guidestarImg.exists()).toBe(true);
expect(guidestarImg.attributes('src')).toBe(
'https://widgets.guidestar.org/gximage2?o=9973356&l=v4'
'/src/assets/candid-platinum.svg'
);
});

Expand Down
6 changes: 3 additions & 3 deletions src/components/Header/PdapHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ export default {

<style>
.pdap-header {
@apply dark:bg-brand-wine-800 relative bg-neutral-50 flex justify-between p-4 md:p-4 w-full z-50;
@apply dark:bg-brand-wine-800 relative bg-neutral-50 flex justify-between p-2 md:p-3 w-full z-50;
}

.logo {
@apply decoration-0 relative max-w-[80%] text-xl font-bold px-2 py-1;
@apply outline outline-wineneutral-500 text-brand-wine-400 dark:outline-wineneutral-500 dark:text-brand-wine-50;
@apply decoration-0 relative max-w-[80%] text-xl font-bold px-3 py-1.5;
@apply border-2 border-wineneutral-500 text-brand-wine-400 dark:border-wineneutral-500 dark:text-brand-wine-50;
@apply lg:text-lg;
@apply xs:max-w-none;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Input/PdapInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const errorMessageId = computed(() => `pdap-${props.name}-input-error`);
}

.pdap-input input {
@apply dark:bg-neutral-950 border border-neutral-500 border-solid px-3 py-2 text-[rgba(0,0,0)];
@apply dark:bg-neutral-950 border border-goldneutral-500 border-solid px-3 py-2 text-[rgba(0,0,0)];
}

.pdap-input input::placeholder {
Expand Down Expand Up @@ -102,7 +102,7 @@ const errorMessageId = computed(() => `pdap-${props.name}-input-error`);
}

.pdap-input-checkbox-checked {
@apply border-2 border-brand-gold border-solid rounded-md;
@apply border-2 border-brand-gold border-solid rounded-sm;
}

.pdap-input input[type='checkbox'] {
Expand Down
2 changes: 1 addition & 1 deletion src/components/InputDatePicker/PdapInputDatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,6 @@ div[role='gridcell'] {
div[role='gridcell']:hover,
div[role='gridcell']:focus,
div[role='gridcell']:focus-visible {
@apply border-2 border-brand-gold-500 border-solid outline-none;
@apply border-2 border-brand-gold-300 border-solid outline-none;
}
</style>
Loading
Loading