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

UIREC-291: add dropdown action buttons #468

Merged
merged 11 commits into from
Dec 14, 2023
Merged

UIREC-291: add dropdown action buttons #468

merged 11 commits into from
Dec 14, 2023

Conversation

alisher-epam
Copy link
Contributor

@alisher-epam alisher-epam commented Dec 12, 2023

Purpose

UIREC-291 - Combine piece action buttons into action menu

Approach

Screen.Recording.2023-12-13.at.4.55.49.PM.mov

TODOS and Open Questions

Learning

Pre-Merge Checklist

Before merging this PR, please go through the following list and take appropriate actions.

  • I've added appropriate record to the CHANGELOG.md
  • Does this PR meet or exceed the expected quality standards?
    • Code coverage on new code is 80% or greater
    • Duplications on new code is 3% or less
    • There are no major code smells or security issues
  • Does this introduce breaking changes?
    • If any API-related changes - okapi interfaces and permissions are reviewed/changed correspondingly
    • There are no breaking changes in this PR.

If there are breaking changes, please STOP and consider the following:

  • What other modules will these changes impact?
  • Do JIRAs exist to update the impacted modules?
    • If not, please create them
    • Do they contain the appropriate level of detail? Which endpoints/schemas changed, etc.
    • Do they have all they appropriate links to blocked/related issues?
  • Are the JIRAs under active development?
    • If not, contact the project's PO and make sure they're aware of the urgency.
  • Do PRs exist for these changes?
    • If so, have they been approved?

Ideally all of the PRs involved in breaking changes would be merged in the same day to avoid breaking the folio-testing environment. Communication is paramount if that is to be achieved, especially as the number of intermodule and inter-team dependencies increase.

While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.

Copy link

github-actions bot commented Dec 12, 2023

Jest Unit Test Statistics

180 tests  +5   179 ✔️ +5   2m 50s ⏱️ -1s
  56 suites +2       1 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit 1398cf8. ± Comparison against base commit 4543d7b.

This pull request removes 1 and adds 6 tests. Note that renamed tests count towards both.
AddPieceModal Create another piece should update footer btns when 'Create another' is active ‑ AddPieceModal Create another piece should update footer btns when 'Create another' is active
AddPieceModal Create another piece should update footer button when 'Create another' is active ‑ AddPieceModal Create another piece should update footer button when 'Create another' is active
ModalActionButtons should call `onSave` function when save button clicked ‑ ModalActionButtons should call `onSave` function when save button clicked
ModalActionButtons should render component ‑ ModalActionButtons should render component
getPieceActionMenus should return array of action menus ‑ getPieceActionMenus should return array of action menus
getPieceActionMenus should return empty array if status is not in PIECE_ACTIONS_BY_STATUS ‑ getPieceActionMenus should return empty array if status is not in PIECE_ACTIONS_BY_STATUS
getPieceActionMenus should return empty array if status is not provided ‑ getPieceActionMenus should return empty array if status is not provided

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 12, 2023

BigTest Unit Test Statistics

0 tests  ±0   0 ✔️ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ±0 

Results for commit 1398cf8. ± Comparison against base commit 4543d7b.

♻️ This comment has been updated with latest results.

@alisher-epam alisher-epam requested review from usavkov-epam and a team December 12, 2023 11:53
@alisher-epam alisher-epam requested a review from a team December 12, 2023 12:20
@usavkov-epam
Copy link
Contributor

It seems that "Save and create another" not working after changes

@usavkov-epam
Copy link
Contributor

chrome_S8ZMwxqk63.mp4

@usavkov-epam
Copy link
Contributor

And I don't think we need "Delete" action for a new piece form

@usavkov-epam
Copy link
Contributor

usavkov-epam commented Dec 13, 2023

Since we have the new action for "Save & create another", "Save&close" button should always save a piece and close the modal. Currently after clicking "Save & create another", isCreateAnother state stays the same for the next piece modal: "save&close" btn change label (it must not), and after clicking just "save" it opens the modal again (we have separate action for that).

Saving flow has to be updated according to new requirements.

chrome_lPD4I6JE5k.mp4

@alisher-epam
Copy link
Contributor Author

@usavkov-epam here is the screen record for fixing

Screen.Recording.2023-12-13.at.7.11.04.PM.mov

change('isCreateAnother', true);
onSave(e);
}, [change, onSave]);
handleSubmit();
Copy link
Contributor

Choose a reason for hiding this comment

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

what about the validation on abandoned holdings b57abfd#diff-3dc65bda5cd25a0bdfd88592bcb6c213a492a05738d4bda9e2bcac1352bac488R115
will it be applied for the "save & create another" action?

Copy link
Contributor

Choose a reason for hiding this comment

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

I've checked locally - it's not

border-top-left-radius: 0;
margin-left: -1px;

&::before, &:focus::before {
Copy link
Contributor

Choose a reason for hiding this comment

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

UX of the dropdown btn should be the same as for other btns

}}
>
<DropdownMenu data-role="menu">
{actionMenus}
Copy link
Contributor

Choose a reason for hiding this comment

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

why is it plural?

@usavkov-epam
Copy link
Contributor

Please check both rtl and ltr directions:

image

Copy link

@alisher-epam alisher-epam merged commit 6ad7fef into master Dec 14, 2023
6 checks passed
@alisher-epam alisher-epam deleted the UIREC-291 branch December 14, 2023 09:41
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.

4 participants