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

PostDetailView Title - Text Wrapping macOS #23

Open
pqhf5kd opened this issue Aug 19, 2020 · 2 comments
Open

PostDetailView Title - Text Wrapping macOS #23

pqhf5kd opened this issue Aug 19, 2020 · 2 comments

Comments

@pqhf5kd
Copy link
Contributor

pqhf5kd commented Aug 19, 2020

Currently the post title becomes multiline on iOS but is truncated on macOS.

Simulator Screen Shot - iPhone SE (1st generation) - 2020-08-19 at 16 35 22

Screenshot 2020-08-19 at 16 34 16

@pqhf5kd
Copy link
Contributor Author

pqhf5kd commented Aug 19, 2020

One workaround would be to put the title in a ScrollView if os(macOS)

    var title: some View {
        let vstack = VStack(alignment: .leading) {
                #if os(iOS)
            Text(post.author)
                .font(.caption)
                .opacity(0.75)
            Text(post.title)
                .font(.title)
                .bold()
                #elseif os(macOS)
            Text(post.author)
                .font(.caption)
                .opacity(0.75)
            ScrollView(.horizontal){
                VStack {
                    Text(post.title)
                        .font(.title)
                        .bold()
                    Spacer()
                }
                .padding(.bottom, 5)
            }
                #endif
            }
        return vstack
    }

@pqhf5kd
Copy link
Contributor Author

pqhf5kd commented Aug 21, 2020

It looks like this issue also affects the post body and comments. Instead of resizing the comment block when adjusting the window, the text will line break until all existing lines are occupied and then truncate.

image

image

image

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

No branches or pull requests

1 participant