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: add modules shouldn't reset after some time #3598

Merged
merged 15 commits into from
Jan 24, 2025

Conversation

dbadura
Copy link
Contributor

@dbadura dbadura commented Jan 16, 2025

Description

Changes proposed in this pull request:

  • update selectedModules state correctly

Related issue(s)

#3591

Definition of done

  • The PR's title starts with one of the following prefixes:
    • feat: A new feature
    • fix: A bug fix
    • docs: Documentation only changes
    • refactor: A code change that neither fixes a bug nor adds a feature
    • test: Adding tests
    • chore: Maintainance changes to the build process or auxiliary tools, libraries, workflows, etc.
  • Related issues are linked. To link internal trackers, use the issue IDs like backlog#4567
  • Explain clearly why you created the PR and what changes it introduces
  • All necessary steps are delivered, for example, tests, documentation, merging

@kyma-bot kyma-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 16, 2025
@dbadura dbadura changed the title fix: add modules shouldn't flicker fix: add modules shouldn't reset after some time Jan 20, 2025
@dbadura dbadura marked this pull request as ready for review January 20, 2025 17:14
@kyma-bot kyma-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 20, 2025
@mrCherry97 mrCherry97 self-assigned this Jan 21, 2025
Copy link
Contributor

@mrCherry97 mrCherry97 left a comment

Choose a reason for hiding this comment

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

View is not jumping, and also delete modal is not jumping, so looks good, but selectedModules or newModules state is not working correctly, when I select some of the modules, click Cancel -> Discard and open Add Modules one more time, then Modules are still selected (no of the module should be selected on first open of the Add)

Screen.Recording.2025-01-21.at.13.45.48.mov

@dbadura dbadura linked an issue Jan 22, 2025 that may be closed by this pull request
if (selectedModules && kymaResource) {
const mergedModules = activeKymaModules.concat(
selectedModules.filter(
i => !activeKymaModules.find(j => j.name === i.name),
Copy link
Contributor

Choose a reason for hiding this comment

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

rename this i and j to something more readable

@mrCherry97 mrCherry97 dismissed their stale review January 24, 2025 14:21

Looks that it's working in the Add Modules view, delete is still jumping, but we will revisit that after refactor.

@kyma-bot kyma-bot added the lgtm Looks good to me! label Jan 24, 2025
@dbadura dbadura merged commit b32cf54 into kyma-project:main Jan 24, 2025
15 checks passed
@dbadura dbadura deleted the fix-modules-state branch January 24, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modules view is jumping/re-rendering
4 participants