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

Adds Jest + React Testing Library 🧑‍🔬 #129

Merged
merged 7 commits into from
Aug 14, 2024

Conversation

rosschapman
Copy link
Collaborator

@rosschapman rosschapman commented Aug 13, 2024

After a short pairing session today, @adriencyberspace and I got Jest installed and a simple unit test (strings.test.ts) running. I took it further and added RTL and migrated an existing test onto our new toolchain. Also updates docs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

import sortBy from "lodash.sortby";
import minBy from "lodash.minby";
import { invert } from "../utils/arrays";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Jest complained about this import although it appeared to be working in source code.

@rosschapman rosschapman changed the title Adds all the things Adds Jest + React Testing Library Aug 13, 2024
@rosschapman rosschapman changed the title Adds Jest + React Testing Library Adds Jest + React Testing Library 🧑‍🔬 Aug 13, 2024
@rosschapman rosschapman marked this pull request as ready for review August 13, 2024 22:04
@@ -126,6 +126,31 @@ There are two protected branches - development and main. Main is the default bra

There are two live instances - a [staging instance](https://our415-staging-a91cdc6d7b2b.herokuapp.com/) and a [production instance](https://our415-abb7eecb7449.herokuapp.com/). Merges onto the development branch deploys the development branch to the staging isntance. Merges onto the main branch deploys the main branch to the production instance. See the [github workflows](https://github.com/Exygy/askdarcel-web/tree/main/.github/workflows) for the details. Environment variables used in the deployments are set in github environments - 'prod' supplies the production instance and 'dev' supplies the staging instance..

## Testing
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for doing this!

Copy link
Collaborator

@adriencyberspace adriencyberspace left a comment

Choose a reason for hiding this comment

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

🧪👍

@rosschapman rosschapman merged commit a9fe824 into development Aug 14, 2024
2 checks passed
@rosschapman rosschapman deleted the OUR415-218-adds-tests branch August 14, 2024 19:45
adriencyberspace added a commit that referenced this pull request Aug 19, 2024
* Newsletter signup recaptcha test (#40)

* form successful without recaptcha (if my emma form recaptcha is turned off)

* add recaptcha to signup form (testing)

* lint error

* lint error again

* Revert "Newsletter signup recaptcha test (#40)" (#41)

This reverts commit cc184a3.

* update resolver dns ip

* update font awesome version

* create category card section and cards

* address adriens pr comments

* fix prettier issue

* rm title/description for future pr

* update active/focus color

* fix prettier

* add documentation

* initial home page prep

* move and export type from two column component

* create 2 column component for home page

* rm resource count state

* refactor into one api call from sanity

* connect oppevent cards to sanity data

* fix button issue with two column content, misc changes

* refactor home page section component

* add focus/active state on event cards

* refactor event section to use home page section

* fix small breakpoint issue with two column section

* fix prettier

* fix build error

* fix build errors again

* add in category cards

* fetch home page 2 column content

* fix slug type

* rm console.log

* fix two column types

* fix prettier/lint issues

* refactor see all services icon

* add v2 to proxy pass for v2 routes

* update v2 proxy pass 1:1 to v1 (omit /api/)

* update comments, address pr review comments

* add basic error handling

* fix no console lint error, revert two column prop type

* rm previous global button styling

* Service page (#48)

* helper function to remove markdown chars for a11y

* format long description on listing page

* edit Button to handle icons in preparation for service page buttons

* refactor and reorganize files and edit styles for listing page, swap button out with Button component

* missed this file that updates file location

* layout width fixes

* remove ListingTitleLink tooltip

* change card className since a global .card exists

* rm console log

* update component index with correct files

* service card styles and refactor

* ServiceCard styles

* remove temp details

* Contact Info -> Contact

* update section titles and only display other services section if MORE than 1 service per org

* style updates on the map / schedule section

* add call button to desktop

* mobile styles and print no-print class

* mobile styles

* fix lint errors

* test change service card scss file because linter is failing

* rm servicecard comment

* fix mocha config failing over scss modules

* change button content from function to var

* Search Results section and related fixes (#52)

* Clear Search button

* Allow empty query to reset search

* Add results count header and clear search button to page

* improvement: add search query string to no results message

* no results section

* reset search page to 1 when search changes

* fix pagination based on page rather than (1-20) every page

* minor button style fixes that were breaking layout

* mobile styles

* remove todo comments

* search specific message, change for filtered searches

* add hit.name to key since some ids are not unique and causing problems

* Adds `SecondaryNavigationLayout` and `BackNavigation` component (#50)

* Adds vscode gitignore directives (#49)

* Long description fixes (#53)

* fix removeAsterisksAndHashes to remove * and # and create test

* format long_description in service page components

* add comment

* minor address font size change

* replaces footer with content from Strapi (#54)

* replaces footer with content from strapi

* removes "loading" and shows footer on error

* createStrapiHook and types fetcher with generic

* prettier fix

* updates useSWR cache key

* linter fixes

* a couple more linter fixes

* updates with suggestions from review

* Loader component (#63)

* add pre-existing loader throughout site

* lint errors

* create new breakpoint to fit map

* new map styling - button and height

* add border and fix padding small breakpoint, fix lint

* Hardcoded categories on homepage (#62)

* fix backgroundColor to be variant type instead of string

* hardcode category links

* lint errors

* lint error

* change hardcoded to topLevel

* comment out Loader import to fix lint error

* edit marker colors

* Hardcoded categories on homepage (#62)

* fix backgroundColor to be variant type instead of string

* hardcode category links

* lint errors

* lint error

* change hardcoded to topLevel

* comment out Loader import to fix lint error

* update print button styling, clean unused map button props

* Search card subcategories  (#57)

* add subcategory labels to listing card w/ tooltip

* comment for next PR

* remove space to make it more clear where comment it pointing

* Mobile styles

* lint errors

* minor tooltip style edit

* add vars to scss file

* add our415 favicon and icon to header

* fix favicon typo

* update backnavigation component and routing

* reverts logo changes

* fix lint issues

* pass in text as children

* Filter dropdown (#67)

* basic working version of header dropdown (needs a11y and minor style adjustments)

* CustomDropdown a11y improvements, tab and arrow navigability

* add "all categories" list option

* fix keydown navigation slug

* big style edit for custom dropdown

* more styling and dynamic title for category vs search page

* lint errors

* dynamic sr only title for clarity

* Update CustomDropdown.module.scss add vars

* Org page for demo (#68)

* org page style changes for demo

* lint errors

* hotfix homepage styles for demo

* hotfix header styles for demo

* hotfix section styling for demo

* hotfix h2 org page for demo

* hotfix remove global section styling for demo

* ListingInfoSection for Service and Organization listing pages (#71)

* Add ServiceCard to OrganizationListingPage

* rm ServiceList from index.tsx

* create new reusable ListingInfoSection for service and org pages

* add ListingInfoSection to OrganizationListingPage and remove corresponding css from org-page.scss

* add ListingInfoSection to ServiceListingPage and clean up module scss

* rm title scss on org page

* lint errors

* mobile styles and cleanup

* clean up commented code

* Listing page layout (#73)

* big refactor: create PageWrapper and PageHeader components, pull those components into Service and Org listing detail pages

* remove global css that is now in modules

* Notes -> NotesList

* org page - pull out unnecessary classes and elements, put NotesList in a ListingInfoSection

* delete org-page.scss now that classnames are shared in pagewrapper

* Change Notes -> NotesList

* delete obsolete css and move some around

* lint errors

* rm deleted org page import to main.scss

* minor updates to css and component naming conventions

* Update PageWrapper.tsx

* Update PageWrapper.tsx rm whitelabel import

* Listing table (#74)

* big refactor: create PageWrapper and PageHeader components, pull those components into Service and Org listing detail pages

* remove global css that is now in modules

* Notes -> NotesList

* org page - pull out unnecessary classes and elements, put NotesList in a ListingInfoSection

* delete org-page.scss now that classnames are shared in pagewrapper

* Change Notes -> NotesList

* delete obsolete css and move some around

* lint errors

* rm deleted org page import to main.scss

* minor updates to css and component naming conventions

* TableOfContactInfo -> ContactInfoTableRows component (to be utilized in DataTable)

* create DataTable.module.scss and delete global <table> styling, use DataTable in place of <table> elements in ServiceListingPage

* move more table specific css to DataTable.module.scss

* moving around scss to appropriate component module scss file

* lint error

* Rename Datatable.tsx to DataTable.tsx

* change DataTable name to ListingInfoTable

* Replaces Sanity with Strapi (#70)

* adding Homepage and dependent interfaces

* fleshes out Homepage interface and dependencies

* updates Homepage to use data from Strapi

* type and type usage cleanup

* prettier fix

* updates about page to use strapi

* removes remaining references to sanity– we are now without sanity

* prettier fix

* linter fixes

* adds TODO for two column content section

* ignore eslint rule img-redundant-alt for variable value

* renames BaseAttributesResponse to BaseDatumAttributesResponse

* sets alt text to var

* reads strapi keys to config example

* Askdarcel Staging API (#77)

* updates webpack config to allow pointing to saging api

* updates so api/v2 can proxy to staging api

* prettier fix

* Listing page tags (#76)

* only display NotesList section if there are notes

* Edit ListingInfoTable to take in hardcoded rows and add Tags section with table to servicelistingpage

* reusable LabelTag

* LabelTagRows for Tag section

* add LabelTagRows to ServiceListingPage

* NotesList section minor edit, only show when there are notes

* lint errors

* mobile edits to fix layout

* swap old label tags with new LabelTag and make edits for tooltip label

* comment checkpoint

* comment for future PR

* ListingInfoTable minor edit - pull boolean logic in useRowRenderer var

* 🫚 [OUR415-87] Adds new header nav (#58)

* Service Listing Accordion  (#80)

* new LocationTimesAccordion to replace Accordion

* add LocationTimesAccordion to MapOfLocations

* style edits to existing components causing style clashes on page

* edited per w3 a11y guidelines

* remove old Accordion

* fix lint errors

* a11y table improvements

* rm locationRenderer and move TableOfOpeningTimes into the LocationTimesAccordion

* rename TableOfOpeningTimes -> TableOfLocationTimes

* handleAccordionToggleOnClick

* improve handleExpandAccordionItemOnClick function

* [OUR415-124] Adds Secondary Navigation bar for listing pages (#78)

* Sidebar filters (#82)

* categories -> subcategories and remove from search page

* style edits to sidebar and filters button

* replace button with Button component

* a11y and use reusable components in Sidebar

* move map toggle buttons to sidebar and style buttons

* rename expandList to collapseMap

* responsive layout tweaks and fixes

* small font on refinement filters mobile

* refactor map toggle buttons into own component

* lint errors

* Navigation and Layout fixes  (#84)

* style edits to nav items and remove loading state

* fix navigation max width

* PageWrapper -> ListingPageWrapper

* consistent max widths on navigation items and wide content

* remove footer from individual pages and add to App

* add secondary nav to category listing pages

* Dropdown header mobile font size

* move search header section out of layouts and change name

* layouts/SecondaryNavigation -> navigation/SecondaryNavigationWrapper

* lint errors

* add space where translate shows up after loading

* Cat mapping (#81)

* adds subcats to categories

* cleans up and unifies category definitions

* lint fixes

---------

Co-authored-by: Adrien Young <[email protected]>

* Homepage edits (#85)

* style edits to nav items and remove loading state

* fix navigation max width

* PageWrapper -> ListingPageWrapper

* consistent max widths on navigation items and wide content

* remove footer from individual pages and add to App

* add secondary nav to category listing pages

* Dropdown header mobile font size

* move search header section out of layouts and change name

* layouts/SecondaryNavigation -> navigation/SecondaryNavigationWrapper

* lint errors

* add space where translate shows up after loading

* todo comment

* footer padding

* hero padding

* masthead max width

* section mobile max width

* two column content section (still needs mobile edits)

* minor breakpoint change

* two column content container responsive styles, messy css

* two column css cleanup

* two column button style edits

* update hero max width to be in line with content

* quick fix - 2 column style edit

* scroll to top of page org and service listing page

* add call button to org listing page

* update services section copy

* edit search header text

* [TECH DEBT] File cleanup (#86)

* remove organization edit page

* remove ResourceGuides

* rm AuthInterstitial

* remove breakingnews and servicediscoveryform

* remove all edit components

* rm Popup Messages

* rm Auth components

* rm Provided service

* rm NavigatorDashboard

* rm Popup from navigation

* rm misc unnecessary components

* rm all deleted components from Router

* rm bookmark modal

* rm NewsArticles

* remove old AboutPage

* rm ucsf discoveryform

* rm ucsf homepage

* rm DashboardNavigator components

* Faq accordion (#87)

* create new accordion for faq items

* create new faq page

* pull faq from strapi

* mobile styling

* lint errors

* comment

* package-lock.json didn't make it through

* lint errors

* Switch SF Service Guide language to Our415 (#88)

* switch SF Service Guide to Our415

* package.json edits

* Mobile category cards are left aligned (#89)

* mobile cards are left aligned

* lint errors

* Change focus color to black for a11y (#90)

* change focus color to black

* lint errors

* update OG image and description (#92)

* [241] Fixes handling of missing image data (#94)

* Algolia apostrophe error (#91)

* Fix 400 error due to apostrophe in algoliaCategoryName

* categoryName already in use, use string as arg

* Update app/pages/ServiceDiscoveryResults/ServiceDiscoveryResults.tsx

Co-authored-by: Ross Chapman <[email protected]>

* move escapeApostrophes to top level component

---------

Co-authored-by: Ross Chapman <[email protected]>

* [OUR415-180] Renames a few search and map-related variables (#95)

* [OUR415-176] Refactors Event/Opp card components to accomodate new `calendar_event` in strapi data (#93)

* Extracts `SearchResult` component from `SearchResults` (#99)

* Search results message (#97)

* include search results count on category pages

* edit getCurrentDayTime() to fix single digit time open now query (i.e. 9 instead of 09)

* remove OpenNowRefinementList which is not used anywhere

* Navigation a11y edits (#100)

* refactor nav components into Navigation dir

* remove which from state name

* dropdown menu closes when user clicks away or clicks a link

* add focusout handler so user can tab navigate through the list and it closes when they move to new menu item

* refactor mobilenavigation to separate components and close sidebar when user clicks a link

* change naming conventions for clarity

* lint errors

* more name cleanup and remove funky z index from filters

* accidentally removed google translate widget from mobile

* remove focus after deactivating submenu

* undo last commit

* add comments

* fix back button bug (#102)

* [OUR415-195] Removes algorithmic sorting of search results by *urgency* (#96)

* [OUR415-178] Updates homepage query to fetch `calendar_event` and fixes date/time rendering (#101)

---------

Co-authored-by: Adrien Young <[email protected]>

* open pr script (#79)

---------

Co-authored-by: Ross Chapman <[email protected]>

* Handles null case (#103)

* [OUR415-195] Fixes incorrect map markers on pages > 1 (#98)

* [OUR415-205] Removes any and all old test cruft (#105)

* Nav a11y (#104)

* Add page wrapper so users can skip to main content on any page. Also adds a hidden ref to focus and unfocus so when user visits a new page the focus element resets

* get rid of PageWrapper and wrap router instead

* wrap router with main

* create skip button that is hidden until focused

* remove duplicate code

* Removes whitelabeling and tentant code (#106)

* [OUR415-129] Fixes Google Translate language switching (#107)

* Removes WeGlot translation service (#108)

* [OUR415-195] Fixes incorrect marker location labels (#109)

* [OUR415-210] Removes unused Homepage components (#112)

* [OUR415-210] Removes unused dependencies (#111)

* [OUR415-210] Removes ShelterTech auth code (#113)

* [OUR415-210] Swaps modular lodash functions instead of loading entire bundle (#114)

* Add screen-reader only headers to site where missing (a11y) (#123)

* search / tlc page sr-only h1

* add hidden h1 to homepage

* hidden h2s for a11y on search results page

* .sr-only class

* Adds dependabot config file for opening PRs for version updates (#125)

* Updates dependabot target branch to `development` (#127)

* Category dropdown a11y (#110)

* Make category dropdown more accessible

* lint error

* created MenuHooks and DropdownSubmenu to DRY up code

* refactor dropdownsubmenu so categorydropdown can use it. also move categorydropdown to navigation dir

* DRY up scss files

* lint error

* add comments back into hooks

* change DropdownMenu name and call hooks inside component rather than as props

* rm onclick from Link because changing page removes focus anyway

* use DropdownMenu instead of CategoryDropdown

* separate scss into modules per component, remove redundant css

* lint error

* rm old comment

* rm redundant handleMenuToggle

* Adds Jest + React Testing Library 🧑‍🔬 (#129)

* Focus State Update (#140)

* Update NavigationFocusReset only on top-level page changes not search query changes

* edit so focus is reset on all page changes except filter and query changes

* use location.search instead to only check if query string changes

* add visual cues and remove confusing button element with no action or href, add isVisualOnly prop to Button (#141)

* run prettier

---------

Co-authored-by: Mark Buckner <[email protected]>
Co-authored-by: Justin Caovan <[email protected]>
Co-authored-by: Ross Chapman <[email protected]>
Co-authored-by: Sean Albert <[email protected]>
Co-authored-by: Ross Chapman <[email protected]>
adriencyberspace added a commit that referenced this pull request Aug 20, 2024
* Newsletter signup recaptcha test (#40)

* form successful without recaptcha (if my emma form recaptcha is turned off)

* add recaptcha to signup form (testing)

* lint error

* lint error again

* Revert "Newsletter signup recaptcha test (#40)" (#41)

This reverts commit cc184a3.

* update resolver dns ip

* update font awesome version

* create category card section and cards

* address adriens pr comments

* fix prettier issue

* rm title/description for future pr

* update active/focus color

* fix prettier

* add documentation

* initial home page prep

* move and export type from two column component

* create 2 column component for home page

* rm resource count state

* refactor into one api call from sanity

* connect oppevent cards to sanity data

* fix button issue with two column content, misc changes

* refactor home page section component

* add focus/active state on event cards

* refactor event section to use home page section

* fix small breakpoint issue with two column section

* fix prettier

* fix build error

* fix build errors again

* add in category cards

* fetch home page 2 column content

* fix slug type

* rm console.log

* fix two column types

* fix prettier/lint issues

* refactor see all services icon

* add v2 to proxy pass for v2 routes

* update v2 proxy pass 1:1 to v1 (omit /api/)

* update comments, address pr review comments

* add basic error handling

* fix no console lint error, revert two column prop type

* rm previous global button styling

* Service page (#48)

* helper function to remove markdown chars for a11y

* format long description on listing page

* edit Button to handle icons in preparation for service page buttons

* refactor and reorganize files and edit styles for listing page, swap button out with Button component

* missed this file that updates file location

* layout width fixes

* remove ListingTitleLink tooltip

* change card className since a global .card exists

* rm console log

* update component index with correct files

* service card styles and refactor

* ServiceCard styles

* remove temp details

* Contact Info -> Contact

* update section titles and only display other services section if MORE than 1 service per org

* style updates on the map / schedule section

* add call button to desktop

* mobile styles and print no-print class

* mobile styles

* fix lint errors

* test change service card scss file because linter is failing

* rm servicecard comment

* fix mocha config failing over scss modules

* change button content from function to var

* Search Results section and related fixes (#52)

* Clear Search button

* Allow empty query to reset search

* Add results count header and clear search button to page

* improvement: add search query string to no results message

* no results section

* reset search page to 1 when search changes

* fix pagination based on page rather than (1-20) every page

* minor button style fixes that were breaking layout

* mobile styles

* remove todo comments

* search specific message, change for filtered searches

* add hit.name to key since some ids are not unique and causing problems

* Adds `SecondaryNavigationLayout` and `BackNavigation` component (#50)

* Adds vscode gitignore directives (#49)

* Long description fixes (#53)

* fix removeAsterisksAndHashes to remove * and # and create test

* format long_description in service page components

* add comment

* minor address font size change

* replaces footer with content from Strapi (#54)

* replaces footer with content from strapi

* removes "loading" and shows footer on error

* createStrapiHook and types fetcher with generic

* prettier fix

* updates useSWR cache key

* linter fixes

* a couple more linter fixes

* updates with suggestions from review

* Loader component (#63)

* add pre-existing loader throughout site

* lint errors

* create new breakpoint to fit map

* new map styling - button and height

* add border and fix padding small breakpoint, fix lint

* Hardcoded categories on homepage (#62)

* fix backgroundColor to be variant type instead of string

* hardcode category links

* lint errors

* lint error

* change hardcoded to topLevel

* comment out Loader import to fix lint error

* edit marker colors

* Hardcoded categories on homepage (#62)

* fix backgroundColor to be variant type instead of string

* hardcode category links

* lint errors

* lint error

* change hardcoded to topLevel

* comment out Loader import to fix lint error

* update print button styling, clean unused map button props

* Search card subcategories  (#57)

* add subcategory labels to listing card w/ tooltip

* comment for next PR

* remove space to make it more clear where comment it pointing

* Mobile styles

* lint errors

* minor tooltip style edit

* add vars to scss file

* add our415 favicon and icon to header

* fix favicon typo

* update backnavigation component and routing

* reverts logo changes

* fix lint issues

* pass in text as children

* Filter dropdown (#67)

* basic working version of header dropdown (needs a11y and minor style adjustments)

* CustomDropdown a11y improvements, tab and arrow navigability

* add "all categories" list option

* fix keydown navigation slug

* big style edit for custom dropdown

* more styling and dynamic title for category vs search page

* lint errors

* dynamic sr only title for clarity

* Update CustomDropdown.module.scss add vars

* Org page for demo (#68)

* org page style changes for demo

* lint errors

* hotfix homepage styles for demo

* hotfix header styles for demo

* hotfix section styling for demo

* hotfix h2 org page for demo

* hotfix remove global section styling for demo

* ListingInfoSection for Service and Organization listing pages (#71)

* Add ServiceCard to OrganizationListingPage

* rm ServiceList from index.tsx

* create new reusable ListingInfoSection for service and org pages

* add ListingInfoSection to OrganizationListingPage and remove corresponding css from org-page.scss

* add ListingInfoSection to ServiceListingPage and clean up module scss

* rm title scss on org page

* lint errors

* mobile styles and cleanup

* clean up commented code

* Listing page layout (#73)

* big refactor: create PageWrapper and PageHeader components, pull those components into Service and Org listing detail pages

* remove global css that is now in modules

* Notes -> NotesList

* org page - pull out unnecessary classes and elements, put NotesList in a ListingInfoSection

* delete org-page.scss now that classnames are shared in pagewrapper

* Change Notes -> NotesList

* delete obsolete css and move some around

* lint errors

* rm deleted org page import to main.scss

* minor updates to css and component naming conventions

* Update PageWrapper.tsx

* Update PageWrapper.tsx rm whitelabel import

* Listing table (#74)

* big refactor: create PageWrapper and PageHeader components, pull those components into Service and Org listing detail pages

* remove global css that is now in modules

* Notes -> NotesList

* org page - pull out unnecessary classes and elements, put NotesList in a ListingInfoSection

* delete org-page.scss now that classnames are shared in pagewrapper

* Change Notes -> NotesList

* delete obsolete css and move some around

* lint errors

* rm deleted org page import to main.scss

* minor updates to css and component naming conventions

* TableOfContactInfo -> ContactInfoTableRows component (to be utilized in DataTable)

* create DataTable.module.scss and delete global <table> styling, use DataTable in place of <table> elements in ServiceListingPage

* move more table specific css to DataTable.module.scss

* moving around scss to appropriate component module scss file

* lint error

* Rename Datatable.tsx to DataTable.tsx

* change DataTable name to ListingInfoTable

* Replaces Sanity with Strapi (#70)

* adding Homepage and dependent interfaces

* fleshes out Homepage interface and dependencies

* updates Homepage to use data from Strapi

* type and type usage cleanup

* prettier fix

* updates about page to use strapi

* removes remaining references to sanity– we are now without sanity

* prettier fix

* linter fixes

* adds TODO for two column content section

* ignore eslint rule img-redundant-alt for variable value

* renames BaseAttributesResponse to BaseDatumAttributesResponse

* sets alt text to var

* reads strapi keys to config example

* Askdarcel Staging API (#77)

* updates webpack config to allow pointing to saging api

* updates so api/v2 can proxy to staging api

* prettier fix

* Listing page tags (#76)

* only display NotesList section if there are notes

* Edit ListingInfoTable to take in hardcoded rows and add Tags section with table to servicelistingpage

* reusable LabelTag

* LabelTagRows for Tag section

* add LabelTagRows to ServiceListingPage

* NotesList section minor edit, only show when there are notes

* lint errors

* mobile edits to fix layout

* swap old label tags with new LabelTag and make edits for tooltip label

* comment checkpoint

* comment for future PR

* ListingInfoTable minor edit - pull boolean logic in useRowRenderer var

* 🫚 [OUR415-87] Adds new header nav (#58)

* Service Listing Accordion  (#80)

* new LocationTimesAccordion to replace Accordion

* add LocationTimesAccordion to MapOfLocations

* style edits to existing components causing style clashes on page

* edited per w3 a11y guidelines

* remove old Accordion

* fix lint errors

* a11y table improvements

* rm locationRenderer and move TableOfOpeningTimes into the LocationTimesAccordion

* rename TableOfOpeningTimes -> TableOfLocationTimes

* handleAccordionToggleOnClick

* improve handleExpandAccordionItemOnClick function

* [OUR415-124] Adds Secondary Navigation bar for listing pages (#78)

* Sidebar filters (#82)

* categories -> subcategories and remove from search page

* style edits to sidebar and filters button

* replace button with Button component

* a11y and use reusable components in Sidebar

* move map toggle buttons to sidebar and style buttons

* rename expandList to collapseMap

* responsive layout tweaks and fixes

* small font on refinement filters mobile

* refactor map toggle buttons into own component

* lint errors

* Navigation and Layout fixes  (#84)

* style edits to nav items and remove loading state

* fix navigation max width

* PageWrapper -> ListingPageWrapper

* consistent max widths on navigation items and wide content

* remove footer from individual pages and add to App

* add secondary nav to category listing pages

* Dropdown header mobile font size

* move search header section out of layouts and change name

* layouts/SecondaryNavigation -> navigation/SecondaryNavigationWrapper

* lint errors

* add space where translate shows up after loading

* Cat mapping (#81)

* adds subcats to categories

* cleans up and unifies category definitions

* lint fixes

---------

Co-authored-by: Adrien Young <[email protected]>

* Homepage edits (#85)

* style edits to nav items and remove loading state

* fix navigation max width

* PageWrapper -> ListingPageWrapper

* consistent max widths on navigation items and wide content

* remove footer from individual pages and add to App

* add secondary nav to category listing pages

* Dropdown header mobile font size

* move search header section out of layouts and change name

* layouts/SecondaryNavigation -> navigation/SecondaryNavigationWrapper

* lint errors

* add space where translate shows up after loading

* todo comment

* footer padding

* hero padding

* masthead max width

* section mobile max width

* two column content section (still needs mobile edits)

* minor breakpoint change

* two column content container responsive styles, messy css

* two column css cleanup

* two column button style edits

* update hero max width to be in line with content

* quick fix - 2 column style edit

* scroll to top of page org and service listing page

* add call button to org listing page

* update services section copy

* edit search header text

* [TECH DEBT] File cleanup (#86)

* remove organization edit page

* remove ResourceGuides

* rm AuthInterstitial

* remove breakingnews and servicediscoveryform

* remove all edit components

* rm Popup Messages

* rm Auth components

* rm Provided service

* rm NavigatorDashboard

* rm Popup from navigation

* rm misc unnecessary components

* rm all deleted components from Router

* rm bookmark modal

* rm NewsArticles

* remove old AboutPage

* rm ucsf discoveryform

* rm ucsf homepage

* rm DashboardNavigator components

* Faq accordion (#87)

* create new accordion for faq items

* create new faq page

* pull faq from strapi

* mobile styling

* lint errors

* comment

* package-lock.json didn't make it through

* lint errors

* Switch SF Service Guide language to Our415 (#88)

* switch SF Service Guide to Our415

* package.json edits

* Mobile category cards are left aligned (#89)

* mobile cards are left aligned

* lint errors

* Change focus color to black for a11y (#90)

* change focus color to black

* lint errors

* update OG image and description (#92)

* [241] Fixes handling of missing image data (#94)

* Algolia apostrophe error (#91)

* Fix 400 error due to apostrophe in algoliaCategoryName

* categoryName already in use, use string as arg

* Update app/pages/ServiceDiscoveryResults/ServiceDiscoveryResults.tsx

Co-authored-by: Ross Chapman <[email protected]>

* move escapeApostrophes to top level component

---------

Co-authored-by: Ross Chapman <[email protected]>

* [OUR415-180] Renames a few search and map-related variables (#95)

* [OUR415-176] Refactors Event/Opp card components to accomodate new `calendar_event` in strapi data (#93)

* Extracts `SearchResult` component from `SearchResults` (#99)

* Search results message (#97)

* include search results count on category pages

* edit getCurrentDayTime() to fix single digit time open now query (i.e. 9 instead of 09)

* remove OpenNowRefinementList which is not used anywhere

* Navigation a11y edits (#100)

* refactor nav components into Navigation dir

* remove which from state name

* dropdown menu closes when user clicks away or clicks a link

* add focusout handler so user can tab navigate through the list and it closes when they move to new menu item

* refactor mobilenavigation to separate components and close sidebar when user clicks a link

* change naming conventions for clarity

* lint errors

* more name cleanup and remove funky z index from filters

* accidentally removed google translate widget from mobile

* remove focus after deactivating submenu

* undo last commit

* add comments

* fix back button bug (#102)

* [OUR415-195] Removes algorithmic sorting of search results by *urgency* (#96)

* [OUR415-178] Updates homepage query to fetch `calendar_event` and fixes date/time rendering (#101)

---------

Co-authored-by: Adrien Young <[email protected]>

* open pr script (#79)

---------

Co-authored-by: Ross Chapman <[email protected]>

* Handles null case (#103)

* [OUR415-195] Fixes incorrect map markers on pages > 1 (#98)

* [OUR415-205] Removes any and all old test cruft (#105)

* Nav a11y (#104)

* Add page wrapper so users can skip to main content on any page. Also adds a hidden ref to focus and unfocus so when user visits a new page the focus element resets

* get rid of PageWrapper and wrap router instead

* wrap router with main

* create skip button that is hidden until focused

* remove duplicate code

* Removes whitelabeling and tentant code (#106)

* [OUR415-129] Fixes Google Translate language switching (#107)

* Removes WeGlot translation service (#108)

* [OUR415-195] Fixes incorrect marker location labels (#109)

* [OUR415-210] Removes unused Homepage components (#112)

* [OUR415-210] Removes unused dependencies (#111)

* [OUR415-210] Removes ShelterTech auth code (#113)

* [OUR415-210] Swaps modular lodash functions instead of loading entire bundle (#114)

* Add screen-reader only headers to site where missing (a11y) (#123)

* search / tlc page sr-only h1

* add hidden h1 to homepage

* hidden h2s for a11y on search results page

* .sr-only class

* Adds dependabot config file for opening PRs for version updates (#125)

* Updates dependabot target branch to `development` (#127)

* Category dropdown a11y (#110)

* Make category dropdown more accessible

* lint error

* created MenuHooks and DropdownSubmenu to DRY up code

* refactor dropdownsubmenu so categorydropdown can use it. also move categorydropdown to navigation dir

* DRY up scss files

* lint error

* add comments back into hooks

* change DropdownMenu name and call hooks inside component rather than as props

* rm onclick from Link because changing page removes focus anyway

* use DropdownMenu instead of CategoryDropdown

* separate scss into modules per component, remove redundant css

* lint error

* rm old comment

* rm redundant handleMenuToggle

* Adds Jest + React Testing Library 🧑‍🔬 (#129)

* Focus State Update (#140)

* Update NavigationFocusReset only on top-level page changes not search query changes

* edit so focus is reset on all page changes except filter and query changes

* use location.search instead to only check if query string changes

* scroll to and focus first search hit after paginating

* merge conflict in SearchResult

* package-lock

* package-lock again

* update marker size

* sneaking prettierrc to fix format on save issues

* prettier.config.js

* useCallback instead of useRef

---------

Co-authored-by: Mark Buckner <[email protected]>
Co-authored-by: Justin Caovan <[email protected]>
Co-authored-by: Ross Chapman <[email protected]>
Co-authored-by: Sean Albert <[email protected]>
Co-authored-by: Ross Chapman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants