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

feat: Search results page #663

Merged
merged 24 commits into from
Jun 23, 2022
Merged

feat: Search results page #663

merged 24 commits into from
Jun 23, 2022

Conversation

suzubara
Copy link
Contributor

@suzubara suzubara commented Jun 10, 2022

SC-388

Proposed changes

This PR implements the Search page, including a handler that queries the CMS Search operation. It does not make the Search page/form discoverable by users - it can only be accessed by navigating directly to /search.

Dependent on #661 and https://github.com/USSF-ORBIT/ussf-portal-cms/pull/60


Reviewer notes

  • Perform various searches and verify the expected results (Bookmarks & Articles from the CMS only) are displayed
  • Only published Articles in the InternalNews category will be returned. Draft/Archived and ORBIT Blog articles will not.
  • Verify the no results state is displayed when you search for something that has no matches.

Setup

  • You will need to be running the CMS (make sure it's up to date with the latest)
  • Run the portal client locally using yarn dev
  • To test, login to the portal client and navigate to /search. You should be able to enter search terms into the form in the header and view results.

Code review steps

As the original developer, I have

  • Met the acceptance criteria, or will meet them in subsequent PRs or stories
  • Created/modified automated unit tests in Jest
    • Including jest-axe checks when UI changes
  • Created/modified automated E2E tests in Cypress
    • Including cypress-axe checks when UI changes
  • Performed a11y testing:
    • Checked responsiveness in mobile, tablet, and desktop
    • Checked keyboard navigability
    • Tested with VoiceOver in Safari
    • Checked VO's rotor menu for landmarks, page heading structure and links
    • Used a browser a11y tool to check for issues (WAVE, axe, ANDI or Accessibility addon tab for Storybook)
  • Requested a design review for user-facing changes

As code reviewer(s), I have

  • Pulled this branch locally and tested it
  • Reviewed this code and left comments
  • Checked that all code is adequately covered by tests
  • Made it clear which comments need to be addressed before this work is merged
  • Considered marking this as accepted even if there are small changes needed
  • Performed a11y testing:
    • Checked responsiveness in mobile, tablet, and desktop
    • Checked keyboard navigability
    • Tested with VoiceOver in Safari
    • Checked VO's rotor menu for landmarks, page heading structure and links
    • Used a browser a11y tool to check for issues (WAVE, axe, ANDI or Accessibility addon tab for Storybook)

As a designer reviewer, I have

  • Checked in the design translated visually
  • Checked behavior
  • Checked different states (empty, one, some, error)
  • Checked for landmarks, page heading structure, and links
  • Tried to break the intended flow
  • Performed a11y testing:
    • Checked responsiveness in mobile, tablet, and desktop
    • Checked keyboard navigability
    • Tested with VoiceOver in Safari
    • Checked VO's rotor menu for landmarks, page heading structure and links
    • Used a browser a11y tool to check for issues (WAVE, axe, ANDI or Accessibility addon tab for Storybook)

As a test user, I have

  • Run through the Test Script:
    • On commercial internet in IE11
    • On commercial internet in Firefox
    • On commercial internet in Chrome
    • On commercial internet in Safari
    • On NIPR in IE11
    • On NIPR in Firefox
    • On NIPR in Chrome
    • On NIPR in Safari
    • On a mobile device in Firefox
    • On a mobile device in Chrome
    • On a mobile device in Safari
  • Added any anomalous behavior to this PR

Screenshots

Search results
image

Search result (single)
image

No results
image

No query (empty search page) -- needs design
image

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #388: Search page handler.

@suzubara suzubara changed the base branch from main to sc-387/search-ui June 14, 2022 20:26
@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #593: Add Label type to CMS schema.

@suzubara suzubara marked this pull request as ready for review June 15, 2022 19:15
@suzubara suzubara changed the title [WIP] Sc 388/search handler feat: Search page Jun 15, 2022
@suzubara suzubara changed the title feat: Search page feat: Search results page Jun 15, 2022

const Search = ({ disabled }: { disabled?: boolean }) => {
const disableClass = classnames({
[styles.disabled]: disabled,
})

// TODO - re-add filter dropdown & suggested terms as future work
Copy link
Contributor

Choose a reason for hiding this comment

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

thank you for leaving this note!

abbyoung
abbyoung previously approved these changes Jun 16, 2022
Copy link
Contributor

@abbyoung abbyoung left a comment

Choose a reason for hiding this comment

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

works as expected, looks great, so excited to see this 🎉

Base automatically changed from sc-387/search-ui to main June 16, 2022 20:57
@suzubara suzubara merged commit 3af506a into main Jun 23, 2022
@suzubara suzubara deleted the sc-388/search-handler branch June 23, 2022 21:42
@suzubara suzubara mentioned this pull request Jun 27, 2022
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.

3 participants