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

Add defensiveness for placeholderCanvas if fileset width OR height are null. #149

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

mathewjordan
Copy link
Member

@mathewjordan mathewjordan commented Jun 22, 2023

What does this do?

This work adds two steps of defensiveness to determine writing of the placeholderCanvas property.

  • The big change is that placeholderCanvas is now excluded IF the fileset.width OR fileset.height are null.
  • As an additional measure, placeholderCanvas width and height values will be 100 if the property is somehow included and but the width and height are falsy

This work should make it so Manifests generated from the API never have null width and heights for placeholderCanvas and thus render correctly in Clover.

@mathewjordan mathewjordan changed the title Add defensiveness around placeholderCanvas if fileset width OR height… Add defensiveness for placeholderCanvas if fileset width OR height are null. Jun 22, 2023
@mathewjordan mathewjordan requested a review from adamjarling June 22, 2023 17:51
@mathewjordan mathewjordan self-assigned this Jun 22, 2023
Copy link
Contributor

@adamjarling adamjarling left a comment

Choose a reason for hiding this comment

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

Code looks clean and tests make sense. 👍

// expect(placeholderCanvas.id).to.eq(`${manifest.items[0].id}/placeholder`);
// expect(placeholderCanvas.type).to.eq("Canvas");
// });

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to leave this for later?

Copy link
Member Author

@mathewjordan mathewjordan Jun 22, 2023

Choose a reason for hiding this comment

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

Nope, don't need it. Good catch. That was where I put things initially but then decided a new describe() altogether,

@mathewjordan mathewjordan temporarily deployed to test June 22, 2023 18:43 — with GitHub Actions Inactive
@mathewjordan mathewjordan force-pushed the 4010-placeholder-canvas-defensiveness branch from f267bd9 to 1d9ace9 Compare June 22, 2023 18:44
@mathewjordan mathewjordan temporarily deployed to test June 22, 2023 18:44 — with GitHub Actions Inactive
@mathewjordan mathewjordan merged commit 3131036 into deploy/staging Jun 22, 2023
@mathewjordan mathewjordan deleted the 4010-placeholder-canvas-defensiveness branch June 22, 2023 18:44
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