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

Fix(UI): Move setUpdatedName call inside updateName promise in Dataset name edit #12232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bhadhri03
Copy link

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

Why?

Currently, when a user edits the dataset name, the UI is updated immediately to reflect the new name, even if the underlying updateName promise fails. This is because the setUpdatedName call is outside of the promise, meaning it runs regardless of the promise result, leading to a mismatch between the UI state and the actual dataset name. So, Moved the setUpdatedName call inside the updateName promise's .then() block to ensure that the UI is only updated when the name change operation is successful. This ensures that the dataset name in the UI matches the actual name after a successful update, preventing the UI from prematurely showing an updated name when the operation fails.

@github-actions github-actions bot added product PR or Issue related to the DataHub UI/UX community-contribution PR or Issue raised by member(s) of DataHub Community labels Dec 27, 2024
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community needs-review Label for PRs that need review from a maintainer. product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant