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

Bug report: Unexpected Behavior in Email Pop-Up UI #7

Closed
1 task done
mjoerke opened this issue Jun 21, 2023 · 3 comments · Fixed by #8
Closed
1 task done

Bug report: Unexpected Behavior in Email Pop-Up UI #7

mjoerke opened this issue Jun 21, 2023 · 3 comments · Fixed by #8
Assignees
Labels
bug Something isn't working

Comments

@mjoerke
Copy link

mjoerke commented Jun 21, 2023

Description

In our application, we use the SpeziContact module to display researcher emails. For example, in Contacts.swift, we have the following code:

import Foundation
import SpeziContact
import SwiftUI

struct Contacts: View {
    let contacts = [
        Contact(
            name: PersonNameComponents(
                givenName: "Matthew",
                familyName: "Jörke"
            ),
            title: "PhD Student",
            organization: "Computer Science",
            contactOptions: [
                .email(addresses: ["joerke@stanford.edu"])
            ]
        )
    ]

    var body: some View {
        NavigationStack {
            ContactsList(contacts: contacts)
                .navigationTitle(String(localized: "CONTACTS_NAVIGATION_TITLE"))
        }
    }
}

When you click the "Email" button, the following email pop-up is displayed:
IMG_4085

There are two unexpected behaviors in this view:

  1. When you click the send button, the email sends, but the view stays exactly the same. There is no feedback that the email has sent.
  2. When you click cancel or swipe down (and then choose either Save/Delete Draft), the view also does not disappear. You have to swipe down again to get it to disappear – clicking cancel again does not work.

Reproduction

This error can be reproduced in the SpeziTemplateApplication.

I tested on an iPhone 14 running iOS 16.5.

Expected behavior

  1. When the send button is pressed, the view should disappear, indicating to the user that email has been sent.
  2. When a user clicks cancel or swipes down, after confirming Save/Delete Draft, the view should disappear.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@mjoerke mjoerke added the bug Something isn't working label Jun 21, 2023
@PSchmiedmayer PSchmiedmayer linked a pull request Jun 23, 2023 that will close this issue
1 task
@PSchmiedmayer
Copy link
Member

PSchmiedmayer commented Jun 23, 2023

Thank you @mjoerke for the great bug report!
Very detailed and made it easy to reproduce the issue and address it! 🚀

I have incorporated a fix in #8. Will close this issue once the PR is merged.

@PSchmiedmayer PSchmiedmayer self-assigned this Jun 23, 2023
@mjoerke
Copy link
Author

mjoerke commented Jun 23, 2023

Hi @PSchmiedmayer, thank you very much for this fix! I wanted to let you know that our app does not compile with the new SpeziContact in Xcode 14.3 anymore. Is this something you can reproduce?

The errors are on lines 110 and 150 in ContactView.swift:

SpeziContact/Contact Views/ContactView.swift:110:47 Static member 'secondary' cannot be used on instance of type 'BackgroundStyle'

SpeziContact/Contact Views/ContactView.swift:110:47 Static property 'secondary' requires the types 'BackgroundStyle' and 'HierarchicalShapeStyle' be equivalent

SpeziContact/Contact Views/ContactView.swift:150:43 Static member 'secondary' cannot be used on instance of type 'BackgroundStyle'

SpeziContact/Contact Views/ContactView.swift:150:43 Static property 'secondary' requires the types 'BackgroundStyle' and 'HierarchicalShapeStyle' be equivalent

It would probably be nice for the code to support Xcode 14, at least until Xcode 15 is out of beta.

@PSchmiedmayer
Copy link
Member

@mjoerke Sorry about this. Fixed the issue in #9 and added a CI step that should fix these regressions in the future 👍
Will tag a new release in a few minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants