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

VACMS-16986 Resources & Support landing and taxonomy pages - add web components #28236

Merged
merged 4 commits into from Mar 4, 2024

Conversation

randimays
Copy link
Contributor

@randimays randimays commented Feb 28, 2024

Summary

Add web components for Resources & Support landing page where possible. Required a decently-sized refactor of the existing search component since we switched over to v3.

Related issue(s)

Testing done

Tested locally.

Screenshots

Alert Screenshot 2024-02-28 at 12 09 25 PM Screenshot 2024-02-28 at 12 09 35 PM Screenshot 2024-02-28 at 12 09 46 PM
Link 1.
Screenshot 2024-02-28 at 12 01 48 PM Screenshot 2024-02-28 at 12 02 09 PM

2.

Screenshot 2024-02-28 at 12 19 40 PM
Screenshot 2024-02-28 at 12 19 59 PM

Search input Screenshot 2024-02-28 at 12 11 46 PM Screenshot 2024-02-28 at 12 11 54 PM Screenshot 2024-02-28 at 12 12 00 PM Screenshot 2024-02-28 at 12 12 10 PM Screenshot 2024-02-28 at 12 12 58 PM
Radio buttons Screenshot 2024-02-28 at 12 11 46 PM Screenshot 2024-02-28 at 12 11 54 PM Screenshot 2024-02-28 at 12 12 00 PM Screenshot 2024-02-28 at 12 12 58 PM

Button: the only remaining <button> is the mobile expand/collapse behavior for the search bar. This shouldn't be a <va-button> because stylistically, this is not similar to the design system button component.

Screenshot 2024-02-28 at 12 40 59 PM

Acceptance criteria

Quality Assurance & Testing

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • Linting warnings have been addressed
  • Screenshot of the developed feature is added
  • Accessibility testing has been performed

Error Handling

  • Browser console contains no warnings or errors.

@@ -35,59 +31,5 @@ describe('ResourcesAndSupportSearchApp', () => {
it('creates a landmark for the search form', async () => {
const screen = renderInReduxProvider(<ResourcesAndSupportSearchApp />);
await screen.findByLabelText('Enter a keyword, phrase, or question');

screen.getByRole('search');
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed because now the search input is in the shadow DOM and we can't test much in unit tests.

@randimays randimays marked this pull request as ready for review February 28, 2024 18:42
@randimays randimays requested review from a team as code owners February 28, 2024 18:42
chriskim2311
chriskim2311 previously approved these changes Feb 28, 2024
Copy link
Contributor

@chriskim2311 chriskim2311 left a comment

Choose a reason for hiding this comment

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

LGTM, Great work!

@va-vfs-bot va-vfs-bot temporarily deployed to master/16986-rs-v3-components/main February 28, 2024 19:37 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/16986-rs-v3-components/main February 29, 2024 21:44 Inactive
Andrew565
Andrew565 previously approved these changes Mar 1, 2024
@randimays
Copy link
Contributor Author

@laflannery This is ready for your review, please

@laflannery
Copy link

@randimays Can we make these updates:

  • Can you add label-header-level="2" to the radio group? This will make the legend an H2 which will keep the heading structure the same as it currently is
  • On the individual radio options, the name prop is different for each, which means these are not considered part of the same group and are read as "1 of 1" instead of "1 of 2" and the expected keyboard support doesn't work (I should be able to use the arrow keys to to prev/next options but instead I have to use tab). Can you change this so the name is the same for both? (The DS example uses "group")
  • For the search field:
    • "Enter a keyword, phrase, or question" can just be <p> tags, it doesn't need to be associated with the input because of the way the component is built we add this same text differently
      Screenshot 2024-03-04 at 9 43 06 AM
    • In the component itself:
      • Remove the aria-labelledby prop (again we are going to do this differently
      • I think you can remove the name prop? But also I don't think it's doing any harm?
      • Change the label prop to label="Enter a keyword, phrase, or question"

I also have some questions on if some elements should be components, I want to make sure we aren't missing these:

  • Show all topics button - this is at the very bottom of the landing page
    Screenshot 2024-03-04 at 9 17 55 AM
  • The links in the Browse topics section, also in the bottom half of the landing page, should these use the <va-link>?
    Screenshot 2024-03-04 at 9 18 45 AM
  • The pagination at the bottom of the taxonomy pages - is this handled in another PR?
    Screenshot 2024-03-04 at 9 20 56 AM
  • The listing item titles are not using the updated '` component like you did on the main search results. Can/should we do this here are well?
    Screenshot 2024-03-04 at 9 23 44 AM

@randimays
Copy link
Contributor Author

Can you add label-header-level="2" to the radio group? This will make the legend an H2 which will keep the heading structure the same as it currently is

Done

On the individual radio options, the name prop is different for each, which means these are not considered part of the same group and are read as "1 of 1" instead of "1 of 2" and the expected keyboard support doesn't work (I should be able to use the arrow keys to to prev/next options but instead I have to use tab). Can you change this so the name is the same for both? (The DS example uses "group")

Done

For the search field: "Enter a keyword, phrase, or question" can just be

tags, it doesn't need to be associated with the input because of the way the component is built we add this same text differently

Done

In the component itself:
Remove the aria-labelledby prop (again we are going to do this differently
I think you can remove the name prop? But also I don't think it's doing any harm?
Change the label prop to label="Enter a keyword, phrase, or question"

Done

I also have some questions on if some elements should be components, I want to make sure we aren't missing these:

  • Show all topics button - this is at the very bottom of the landing page
  • The links in the Browse topics section, also in the bottom half of the landing page, should these use the ?
  • The pagination at the bottom of the taxonomy pages - is this handled in another PR?
  • The listing item titles are not using the updated '` component like you did on the main search results. Can/should we do this here are well?

These are all content-build changes (this is a vets-website specific PR). I'll address these in the content-build PR I mentioned in Slack.

@va-vfs-bot va-vfs-bot temporarily deployed to master/16986-rs-v3-components/main March 4, 2024 15:42 Inactive
@randimays
Copy link
Contributor Author

@chriskim2311 Do you mind re-reviewing please?

Copy link
Contributor

@chriskim2311 chriskim2311 left a comment

Choose a reason for hiding this comment

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

LGTM!

@randimays randimays merged commit afbb219 into main Mar 4, 2024
66 of 67 checks passed
@randimays randimays deleted the 16986-rs-v3-components branch March 4, 2024 18:00
pjhill pushed a commit that referenced this pull request Mar 14, 2024
…components (#28236)

* VACMS-16986 Resources & Support landing page web components

* fixing style issues

* feedback updates

* fixing unit test
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.

None yet

6 participants