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/2480/loading formerly loaded files #2548

Merged
merged 15 commits into from Dec 10, 2021

Conversation

Hall-Ma
Copy link
Contributor

@Hall-Ma Hall-Ma commented Dec 8, 2021

Loading formerly loaded files

Close: #2480

Description

Problem:

  • User could not load identical files (equal file name and MD5 hash) into CodeCharta

Solution:

  • Now user can upload identical files (equal file name and MD5 hash) without any error messages into CodeCharta, but only one file is showed
  • Now user can upload files with different files names but same MD5 hashes, replacing the previous file name with the new one
  • Now user can upload files with equal file names but different MD5 hashes, adding a number to the file names to better distinguish the files

@Hall-Ma Hall-Ma marked this pull request as ready for review December 9, 2021 15:58
@@ -1,7 +1,7 @@
{
"projectName": "Sample Project with Edges",
"apiVersion": "1.2",
"fileChecksum": "invalid-md5-sample",
"fileChecksum": "valid-md5-sample1",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit picking: Intentionally, "invalid-md5-sample" should express that the sample value is not a valid md5. So, "valid-md5-sample" is a bit confusing here. I agree that the former is not that obvious. Therefore, we could just omit the prefix "valid".

Copy link
Collaborator

@ce-bo ce-bo left a comment

Choose a reason for hiding this comment

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

LGTM! However, we could remove the recentFiles handling from the store because it is nowhere else needed and it just makes no sense to dispatch this. The recentFiles array is used to get access to the first uploaded file, so that it can be marked as selected. This can be done locally in codeCharta.service.ts.

@Hall-Ma Hall-Ma merged commit ab399b9 into main Dec 10, 2021
@Hall-Ma Hall-Ma deleted the fix/2480/loading-formerly-loaded-files branch December 10, 2021 19:25
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.

Loading formerly loaded files
3 participants