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

Files with computed name #607

Open
wants to merge 2 commits into
base: fix-login-button-603
Choose a base branch
from

Conversation

ramirobg94
Copy link
Contributor

No description provided.

@ramirobg94 ramirobg94 requested a review from SteRiccio November 27, 2024 15:21
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Comment on lines +10 to +11
const {fileName: fileNameUuid, fileNameCalculated} =
node?.value?.fileName;
Copy link
Member

Choose a reason for hiding this comment

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

this one looks wrong, it should be:
const {fileName: fileNameUuid, fileNameCalculated} =
node?.value ?? {}

@@ -86,7 +86,7 @@ const NodeValueRender = ({node = false, nodeDef}) => {
return (
<>
<Container>
{node?.value ? (
{node?.value && node?.value?.fileName ? (
Copy link
Member

Choose a reason for hiding this comment

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

it could be simply node?.value?.fileName

Copy link
Member

@SteRiccio SteRiccio Nov 27, 2024

Choose a reason for hiding this comment

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

there are also helper methods in arena-core for this, e.g. NodeValues.getFileName

@@ -59,7 +65,7 @@ const useFile = ({nodeDef, node, isImage = false}) => {
const deleteFile = useCallback(() => {
handleDelete({
node,
label: node?.value?.fileName,
label: node?.value?.fileNameCalculated,
Copy link
Member

Choose a reason for hiding this comment

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

in this case, if fileNameCalculated is missing it should default to something else

@SteRiccio
Copy link
Member

also please check the SonarCloud issues

Base automatically changed from fix-multiple-entity-home-keys-visibility-599 to fix-login-button-603 November 28, 2024 17: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.

2 participants