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

UIEH-1440: Package Record - Title List Accordion - Improve Visibility of Search Within/Filter/Sort options. #1757

Merged
merged 5 commits into from
Jan 14, 2025

Conversation

Dmytro-Melnyshyn
Copy link
Contributor

@Dmytro-Melnyshyn Dmytro-Melnyshyn commented Jan 9, 2025

Description

UI changes:

  • replace the magnifying glass with a search box, search options box, and Actions button;
  • remove accordion from all filters (they are shown in Actions dropdown);
  • show a clear icon next to the filter label if the filter's option is selected;
  • badge near Actions button shows hover over text;

Functionality changes:

  • submit the search once the Enter keyboard key is hit, and once any filter option is selected;
  • move focus to the filter label after hitting the clear icon or to the default option for filters with radio buttons.

Before:
image

image

After:
image

image

Issues

UIEH-1440

Approach

  • create a separate component search-section for a search box, search options, and Actions button;
  • the UI version with modal uses accordion for the access type and tags filters, so extract filters without accordion to a separate component to reuse in both the modal and newly created search section. Modal is still in use in other places;
  • add the ability to render filters with radio buttons with and without accordion. The hasAccordion prop is used.

Screencasts:

2025-01-09_11h10_55.mp4

Approach

TODOS and Open Questions

Learning

Screenshots

Copy link

github-actions bot commented Jan 9, 2025

Jest Unit Test Results

    1 files  ± 0    194 suites  +2   4m 48s ⏱️ -7s
1 103 tests +11  1 100 ✅ +11  3 💤 ±0  0 ❌ ±0 
1 111 runs  +11  1 108 ✅ +11  3 💤 ±0  0 ❌ ±0 

Results for commit bf00856. ± Comparison against base commit fc842b3.

♻️ This comment has been updated with latest results.

@Dmytro-Melnyshyn Dmytro-Melnyshyn requested review from BogdanDenis and a team January 9, 2025 11:12

// focus on the default option
setTimeout(() => {
document.querySelector(`[aria-labelledby="${labelId}"] input[tabindex="0"]`)?.focus();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use autoFocus={isChecked} on <RadioButton> instead of this call?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to move the focus after hitting the clear icon, this will happen on page update, and autoFocus is only for page mounting.

@Dmytro-Melnyshyn Dmytro-Melnyshyn merged commit 68a7c1c into master Jan 14, 2025
16 checks passed
@Dmytro-Melnyshyn Dmytro-Melnyshyn deleted the UIEH-1440 branch January 14, 2025 10:56
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