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: Fix issue with wrapping certificate #585

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

Ririio
Copy link
Contributor

@Ririio Ririio commented Apr 12, 2023

This issue should close #560

Here's a demo on how it looks

2023-04-12.13-52-19.mp4

@Ririio Ririio added the category: front end Front end part of our web service label Apr 12, 2023
@Ririio Ririio added this to the Milestone 1.0a milestone Apr 12, 2023
@Ririio Ririio requested review from humphd and SerpentBytes April 12, 2023 17:54
@Ririio Ririio self-assigned this Apr 12, 2023
Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

Screenshot 2023-04-12 at 2 37 14 PM

This is still broken for me on Mac

@Ririio
Copy link
Contributor Author

Ririio commented Apr 12, 2023

This is still broken for me on Mac

That's odd... on windows for mine everything seems to be fine, do you mind providing me with the width and height, just so I can be sure

@humphd
Copy link
Contributor

humphd commented Apr 12, 2023

Let's get some other people to test too.

@Eakam1007
Copy link
Contributor

Tested this on Windows 11, and looks good:
image

(Unrelated) Though I noticed this happening for smaller screen sizes such as Galaxy Fold (280 x 653, w x h):
image

@SerpentBytes
Copy link
Contributor

I think it's not working on Mac.

@humphd
Copy link
Contributor

humphd commented Apr 12, 2023

Weird that it's no good on Mac. If it works well on Windows, that's the most important (more users on Windows). If we can fix on mac, that would be nice to have.

@Ririio
Copy link
Contributor Author

Ririio commented Apr 13, 2023

(Unrelated) Though I noticed this happening for smaller screen sizes such as Galaxy Fold (280 x 653, w x h):

@Eakam1007 I think that has something to do with the "Tabs" component

@humphd
Copy link
Contributor

humphd commented Apr 13, 2023

I tried working on this locally on my Mac, and this seems to do it:

diff --git a/app/components/certificate/certificate-display.tsx b/app/components/certificate/certificate-display.tsx
index c80b76a..d499e86 100644
--- a/app/components/certificate/certificate-display.tsx
+++ b/app/components/certificate/certificate-display.tsx
@@ -110,8 +110,9 @@ export default function CertificateDisplay({
               <Text
                 fontFamily="mono"
                 maxWidth={{ base: '2xs', xs: 'sm', sm: 'md', md: 'full' }}
+                minWidth="max-content"
                 fontSize={{ base: '3xs', xs: '2xs', sm: 'xs', md: 'md' }}
-                css={{ whiteSpace: 'pre-line' }}
+                css={{ whiteSpace: 'pre-line', wordWrap: 'normal' }}
               >
                 {value}
               </Text>

Here I'm telling it to not wrap text, and also to never go narrower than the content. Does this work?

@Ririio
Copy link
Contributor Author

Ririio commented Apr 13, 2023

I tried working on this locally on my Mac, and this seems to do it:

Here I'm telling it to not wrap text, and also to never go narrower than the content. Does this work?

It didn't cause any issue when I tested it locally, should I push this code or have some who uses mac try out the changes for themselves?

@humphd
Copy link
Contributor

humphd commented Apr 13, 2023

If it worked for you, sure, make the changes and add another commit to this PR.

@Ririio
Copy link
Contributor Author

Ririio commented Apr 13, 2023

@SerpentBytes do you mind checking the new commit to see if it works on Mac now?

Copy link
Contributor

@Genne23v Genne23v left a comment

Choose a reason for hiding this comment

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

It works all good on my Mac. It doesn't break in any viewpoint or different device view.

Copy link
Contributor

@Eakam1007 Eakam1007 left a comment

Choose a reason for hiding this comment

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

Looks good. I think we will need another issue to fix the tabs staying horizontal for smaller displays
image

@SerpentBytes
Copy link
Contributor

SerpentBytes commented Apr 13, 2023

It works!
Screenshot 2023-04-13 at 12 21 14 PM

@Ririio Ririio merged commit 33d60c4 into DevelopingSpace:main Apr 13, 2023
@Ririio Ririio deleted the issue-560 branch April 13, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: front end Front end part of our web service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Font size and wrapping issues with certificate show/hide
5 participants