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-2896 Inventory app: Define and implement shortcut key for editing a quickMARC bib record #2479

Merged
merged 7 commits into from May 20, 2024

Conversation

BogdanDenis
Copy link
Contributor

@BogdanDenis BogdanDenis commented May 9, 2024

Description

Added new Ctrl+Shift+E shortcut to open Instance/Holdings records in quickMARC editor

Screenshots

chrome_TSlvM67oiK.mp4

Issues

UIIN-2896

Copy link

github-actions bot commented May 9, 2024

Jest Unit Test Statistics

       1 files  ±0     249 suites  ±0   13m 15s ⏱️ +31s
1 016 tests +4  1 014 ✔️ +4  2 💤 ±0  0 ±0 
1 022 runs  +4  1 020 ✔️ +4  2 💤 ±0  0 ±0 

Results for commit e36268c. ± Comparison against base commit 23c2402.

♻️ This comment has been updated with latest results.

const searchParams = new URLSearchParams(location.search);

searchParams.delete('relatedRecordVersion');
searchParams.append('shared', instance.shared?.toString());
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the second place we push shared to URL. It might be worth to make a separate function for this.
I think that if we open a locally shared record using the shortcut, we will push shared value to false. If we are going to fix that behavior like

const isInstanceShared = Boolean(isShared || isInstanceShadowCopy(instance?.source));

then it would be nice to do it in just one place.

});
}, [isHoldingsRecord]);

const shortcuts = useMemo(() => [
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a second argument to useMemo.

@Dmytro-Melnyshyn Dmytro-Melnyshyn requested a review from a team May 10, 2024 15:21
@Dmytro-Melnyshyn Dmytro-Melnyshyn requested a review from a team May 14, 2024 08:06
@BogdanDenis BogdanDenis requested review from a team and removed request for a team May 20, 2024 11:26
Copy link

sonarcloud bot commented May 20, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
76.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@BogdanDenis BogdanDenis merged commit 92818ca into master May 20, 2024
4 of 5 checks passed
@BogdanDenis BogdanDenis deleted the UIIN-2896 branch May 20, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants