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 #601

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

jsconan
Copy link
Contributor

@jsconan jsconan commented Aug 23, 2024

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

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

Please refer to the companion PR.

Copy link

Version

Target Version 3.7.0
Last version 3.6.0

There are 0 BREAKING CHANGE, 2 features, 0 fix

Copy link

Coverage Report

Totals Coverage
Statements: 76.89% ( 14350 / 18664 )
Methods: 80.27% ( 1815 / 2261 )
Lines: 81.4% ( 8590 / 10553 )
Branches: 67.44% ( 3945 / 5850 )

StandWithUkraine

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

@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

@gabrielfs7 gabrielfs7 self-requested a review August 29, 2024 08:13
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

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