8000 PM-13432: Update toast design to support title and subtitle by matt-livefront · Pull Request #1039 · bitwarden/ios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PM-13432: Update toast design to support title and subtitle #1039

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

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

matt-livefront
Copy link
Collaborator
@matt-livefront matt-livefront commented Oct 11, 2024

🎟️ Tracking

PM-13432

📔 Objective

Updates the design of the toasts to match the new design. This new design includes support for a title and subtitle which required a bit of refactoring from just the text that existed previously.

  • 447e79b Refactors existing toast instances to use title instead of text
  • f00a7e8 Updates the design of the toast

📸 Screenshots

Screenshot 2024-10-11 at 4 19 33 PM

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 98.92473% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.17%. Comparing base (b62432c) to head (0cbd565).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...ared/UI/Platform/Application/Views/ToastView.swift 97.67% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1039      +/-   ##
==========================================
+ Coverage   89.15%   89.17%   +0.02%     
==========================================
  Files         662      662              
  Lines       41596    41609      +13     
==========================================
+ Hits        37085    37106      +21     
+ Misses       4511     4503       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor
github-actions bot commented Oct 11, 2024

Logo
Checkmarx One – Scan Summary & Details09c34454-891d-42b3-811b-e1cd0cff7281

No New Or Fixed Issues Found

phil-livefront
phil-livefront previously approved these changes Oct 14, 2024
Copy link
Collaborator
@phil-livefront phil-livefront left a comment

Choose a reason for hiding this comment

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

Looks great!

do {
try await Task.sleep(nanoseconds: 3 * NSEC_PER_SEC)
withAnimation {
self.toast = nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not really possible to test, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right, I don't think there's a way we can trigger this with view inspector.

func showToast(_ text: String) {
navigator?.showToast(Toast(text: text))
func showToast(_ title: String, subtitle: String? = nil) {
navigator?.showToast(Toast(title: title, subtitle: subtitle))
Copy link
Collaborator

Choose a reason for hiding this comment

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

same question here, we can't test this, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a test for this!

@matt-livefront matt-livefront merged commit e00898d into main Oct 14, 2024
9 checks passed
@matt-livefront matt-livefront deleted the matt/PM-13432-update-toasts branch October 14, 2024 16:34
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
0