Skip to content

SDK-5762: Push template UI improvements and timer state persistence#57

Open
reshab-code wants to merge 9 commits into
developfrom
task/SDK-5762-push-template-improvements
Open

SDK-5762: Push template UI improvements and timer state persistence#57
reshab-code wants to merge 9 commits into
developfrom
task/SDK-5762-push-template-improvements

Conversation

@reshab-code
Copy link
Copy Markdown

Summary

  • Fix left padding for title and message labels across all push templates (consistent horizontal inset)
  • Fix top-left padding for title and subtitle in the rating template
  • Add scrim overlay to the zero bezel template to improve text legibility over images
  • Persist timer state across notification expand/collapse so the countdown doesn't reset on re-open

@francispereira
Copy link
Copy Markdown

francispereira commented May 4, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@reshab-code reshab-code force-pushed the task/SDK-5762-push-template-improvements branch from a26983f to a578335 Compare May 4, 2026 08:59
titleLabel.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 8),
titleLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: Constraints.kCaptionLeftPadding),
titleLabel.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 16),
titleLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

use constant here and other places


subTitleLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 8),
subTitleLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: Constraints.kCaptionLeftPadding),
subTitleLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you try rendering with wrong image url and see if template looks fine? also test for case when rating is also not displayed along with wrong image url

bigImageView.translatesAutoresizingMaskIntoConstraints = false
return bigImageView
}()
private let scrimView: UIView = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what should be expected scrimView UI? Do you have any reference screenshot or screenshot from Android?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes I checked with Anush for android and added scrim for the lower 30% part of the view for better text clarity

}

func setupConstraints() {
let timerLabelWidth: CGFloat = thresholdSeconds >= 3600
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

since we are updating constraints, check if we have long text in title and message, it goes behind the timer label, we should show ... at end before timer label. Also when timer comes below 3600, the width should decrease allowing more title texts


var captionColor: String = ConstantKeys.kHexBlackColor
var subcaptionColor: String = ConstantKeys.kHexLightGrayColor
var captionColor: String = ConstantKeys.kHexWhiteColor
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why have we changed caption color? If we need change, do we need to change dark color also?

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.

3 participants