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

Feature/AUT-3790/Resource manager deletion hook #4092

Merged
merged 3 commits into from
Sep 2, 2024

Conversation

jsconan
Copy link
Contributor

@jsconan jsconan commented Aug 27, 2024

Related to: https://oat-sa.atlassian.net/browse/AUT-3790

Requires:

Summary

Allow to hook the file deletion in the resource manager.

Details

The file deletion in the resource manager was relying on the ui/deleter helper, which is a global helper watching for elements having the data-delete attribute and adding behavior to them. However, it was impossible to hook it and insert a validation step in the middle. While this is possible to inject a step between the deletion event and the file deletion, the deletion event is emitted after the line is removed from the DOM. For this is reason, it is better to break the dependency to the ui/deleter helper and write a specific handling directly to the fileSelector component, adding an option to hook it.

How to test

  • checkout the branch: git checkout -t origin/feature/AUT-3790/resource-manager-deletion-hook
  • install the dependencies: cd views && npm i
  • please refer to the companion PR for the full feature

views/package.json Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Aug 27, 2024

Front-end summary Node 18

💯 Total ✅ Passed ⏭️ Skipped ❌ Failed
161 161 0 0

Copy link
Contributor

@viktar-dzmitryieu-tao viktar-dzmitryieu-tao left a comment

Choose a reason for hiding this comment

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

  • New code is covered by tests (if applicable)
  • Tests are running successfully (old and new ones) on my local machine (if applicable)
  • New code is respecting code style rules
  • New code is respecting best practices
  • New code is not subject to concurrency issues (if applicable)
  • Feature is working correctly on my local machine (if applicable)
  • Acceptance criteria are respected
  • Pull request title and description are meaningful
  • Pull request's target is not master

Copy link
Contributor

@gabrielfs7 gabrielfs7 left a comment

Choose a reason for hiding this comment

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

LGTM. Only package update, to be corrected before merge

Copy link

github-actions bot commented Sep 2, 2024

Version

Target Version 54.22.0
Last version 54.21.2

There are 0 BREAKING CHANGE, 1 feature, 0 fix

@jsconan jsconan merged commit 0093818 into develop Sep 2, 2024
6 checks passed
@jsconan jsconan deleted the feature/AUT-3790/resource-manager-deletion-hook branch September 2, 2024 07:39
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