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

UIIN-2533: Show facet options, if they exist, after clicking the +More button. #2309

Merged
merged 4 commits into from
Oct 18, 2023

Conversation

Dmytro-Melnyshyn
Copy link
Contributor

@Dmytro-Melnyshyn Dmytro-Melnyshyn commented Oct 17, 2023

Purpose

Show facet options, if they exist, after clicking the +More button.

Approach

BE currently returns 6 options for the facet, but some of them may have already been removed. There is no way to fix it on the BE side. The UI was now looking at these 6 options in the data and displaying a +More button if all 6 options existed. Because there are only 5 options, the +More button doesn't appear in the UI.

After this PR, if the BE returns 6 options for the facet and some of them cannot be found in the data (deleted), we display the +More button, just do not render the deleted options, which we mark as isDeleted.

Added isFilterable, onSearch, onFetch props to be able to filter options via the facet's input field.

Refs

UIIN-2533

Screenshots

2023-10-17_13h15_00.mp4

@github-actions
Copy link

github-actions bot commented Oct 17, 2023

Jest Unit Test Statistics

    1 files  ±0  226 suites  ±0   13m 12s ⏱️ + 1m 43s
871 tests +1  869 ✔️ +1  2 💤 ±0  0 ±0 
876 runs  +1  874 ✔️ +1  2 💤 ±0  0 ±0 

Results for commit b50b6ea. ± Comparison against base commit dc738d2.

♻️ This comment has been updated with latest results.

Copy link
Member

@zburke zburke left a comment

Choose a reason for hiding this comment

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

Wow, so clear and concise. Adding isDeleted during entries.reduce() was a great idea. Nice job!

CHANGELOG.md Outdated
Comment on lines 3 to 5
## [10.0.1](IN PROGRESS)
* Show facet options, if they exist, after clicking the +More button. Refs UIIN-2533.

Copy link
Member

Choose a reason for hiding this comment

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

Generally, our practice is to target all changes to the master branch and then to cherry-pick fixes onto patch branches. If somebody else's PR hits master before yours lands, you'll have to do this anyway, so I just plan for things to work out this way. I would do it like this:

  1. Bump the version on master in package.json to 10.1.0. You'll save a PR later if you do it in a separate PR now, but it's up to you. Either way it's two PRs in the end, so 🤷 .
  2. Merge this PR.
  3. Split a release branch named b10.0 from the commit where master was tagged and push it up so others can also pick bug fixes onto : (get checkout master; git checkout -b b10.0 v10.0.0; git push -u origin head).
  4. If you bumped the version in step 1 in a separate PR, you can just pick the commit from this PR onto your release branch: git cherry-pick -x SOME_HASH; git push, you're done! If you bumped the version in step 1 in this PR, you'll need to split a branch from b10.0, pick this fix onto it, fix the version in package.json, push the branch and open a PR with a target of b10.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zburke I'll wait until this #2310 PR with an update to version 10.1.0 in package.json is merged.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@Dmytro-Melnyshyn Dmytro-Melnyshyn merged commit 1b6dca3 into master Oct 18, 2023
4 checks passed
@Dmytro-Melnyshyn Dmytro-Melnyshyn deleted the UIIN-2533 branch October 18, 2023 13:50
mariia-aloshyna pushed a commit that referenced this pull request Nov 3, 2023
mariia-aloshyna added a commit that referenced this pull request Nov 3, 2023
* UIIN-2453: Instance 3rd pane: Adjust behaviour when returning to instance from holdings/item full screen (#2305)

(cherry picked from commit b7c19d1)

* UIIN-2629: Consortial holdings accordion is not appearing after the sharing of Instance (#2312)

(cherry picked from commit e03476f)

* UIIN-2531 Reset CheckboxFacet state.more when user resets search form and fewer facet options are loaded. (#2310)

(cherry picked from commit 749fead)

* UIIN-2588: Edit instance success toast no longer shows the instance HRID (#2313)

(cherry picked from commit dc738d2)

* UIIN-2533: Show facet options, if they exist, after clicking the +More button. (#2309)

(cherry picked from commit 1b6dca3)

* UIIN-2608: If Shared & Held by facets were selected in the Browse search, then retain them in the Search lookup after clicking the record. (#2307)

(cherry picked from commit 79771fb)

* UIIN-2600: Remove error message after switch from Instance Edit screen to another app (#2311)

(cherry picked from commit 3411d72)

* Release v10.0.1

---------

Co-authored-by: Denys Bohdan <[email protected]>
Co-authored-by: Dmytro-Melnyshyn <[email protected]>
Co-authored-by: Oleksandr Hladchenko <[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.

3 participants