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

Ability to update badge image size outside of framework #304

Merged
merged 5 commits into from
Nov 3, 2020

Conversation

BenShutt
Copy link
Contributor

@BenShutt BenShutt commented Oct 30, 2020

Description

Add

  1. blendedLearningImageBackgroundSize
  2. imageBackgroundSize

properties to CollectionItemViewCellConfiguration to configure the quiz badge imageView size.

Related Issue

https://3sidedcube.atlassian.net/browse/OU20-90

Motivation and Context

Requested to increase size of badge image in a referencing app

How Has This Been Tested?

Tested by running in companion app.

Screenshots (if appropriate):

IMG_24CE77269E55-1

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…onItemViewCellConfiguration` to make configurable
///
/// - Returns: The correct background size based on the `QuizConfiguration`
/// and `CollectionItemViewCellConfiguration`
static func imageBackgroundViewSize() -> CGFloat {
Copy link
Contributor Author

@BenShutt BenShutt Oct 30, 2020

Choose a reason for hiding this comment

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

This will apply to all CollectionItemViewCell, not just the quiz badge. This would only affect apps which configure these properties: blendedLearningImageBackgroundSize and imageBackgroundSize

@BenShutt
Copy link
Contributor Author

BenShutt commented Nov 2, 2020

@simonmitchell I feel like the white background around the badges is drawn by the CircleProgressLayer(with no progress) which I'm not sure is what we want for apps which don't use blended learning?

Can change the color to .clear here if that's desired, but it's been like that a while and nobody has mentioned anything. On the app using this the QuizBadgeTableViewCell is overriden and this white background is removed

@simonmitchell
Copy link
Contributor

IIRC there was previously a .clear on the CircleProgressLayer but it looked strange because it was still rendering the shadow possibly? It's worth perhaps consolidating with PMs and designers to make sure we're doing what they expect across all clients!

@BenShutt
Copy link
Contributor Author

BenShutt commented Nov 3, 2020

I'm going to merge @simonmitchell as this PR shouldn't be breaking anything (feature enhancement) as I need to tag this up.
But I do think the white badge backgrounds above perhaps needs some checking?

@BenShutt BenShutt merged commit b3bbd1e into develop Nov 3, 2020
@BenShutt BenShutt deleted the feature/badge-image-size branch November 3, 2020 17:45
@BenShutt BenShutt mentioned this pull request Nov 3, 2020
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.

None yet

2 participants