cisagov / tpt-reports

Process to build and distribute Technical Phishing Test (TPT) reports
Creative Commons Zero v1.0 Universal
4 stars 0 forks source link

Longer Names Wrap Text in Table Cells #70

Closed jthough9 closed 9 months ago

jthough9 commented 9 months ago

🐛 Summary

When producing the reports, under the "Domain Tested" field, the domain entered will wrap to the next line if it is too long to fit into the parameters specified.

To reproduce

Steps to reproduce the behavior:

  1. When producing a test report use "Testing County Board of Commissioners" as your stakeholder name and "testingcountyohio.org" as your domain
  2. Scroll down to the "Domain Tested" field on page 2
  3. Observe that the domain gets cut off and pushed to the next line

Expected behavior

We expect that the domain stays on one line instead of wrapping to the next. To make sure this happens our suggestion would be to reduce the font of the domain as it exceeds the space threshold in that text field to make sure that no matter how long the domain is, it will fit on one line.

Any helpful log output or screenshots

Reach out to analysts for helpful log output

Add any screenshots of the problem here.

ameliav commented 9 months ago

There will be a conditional to check the length of domain. If it is longer than the space, the font will shrink.

Need clarification if this should be the case for other table cells as well.

jthough9 commented 9 months ago

This would only be the case that needs this condition. Thank You Amelia!

ameliav commented 9 months ago

@jthough9 No problem! I also ended up adding a shrinking condition for the stakeholder name since that has the possibility of being long as well.

image

If this works, I'll work on merging the change today.