webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

Wrong casing in 404 page - "Take me home" button

Open plsalvado opened this issue 3 years ago • 2 comments

Version

5.29.0

Operating System

macOS

Browser

Chrome

What are the steps to reproduce this bug?

Force Webiny to serve the 404 page, e.g. hit a random URL like https://d1e03ena47allo.cloudfront.net/guide/untitled-l6bysdct/sweetcaroline

Now the catch is this. You will only see the problem if you've edited the button theme CSS and removed the uppercase styling - which is what I did in the example above.

In that case, we will render the text as it is in the /webiny-js/packages/api-page-builder/src/graphql/crud/install/notFoundPageData.ts file. And if you see line 125 you'll see the button text as buttonText: "TAKE ME HOme",

What is the expected behavior?

The button text should be "Take me home" with any additional styling applied through CSS. The casing should be consistent.

What do you see instead?

"TAKE ME HOme" - mixed casing

Additional information

No response

Possible solution

Edit /webiny-js/packages/api-page-builder/src/graphql/crud/install/notFoundPageData.ts - line 125 - and change the text to "Take me home"

plsalvado avatar Aug 02 '22 09:08 plsalvado

@plsalvado or should it be all uppercase? 🤔

Pavel910 avatar Aug 02 '22 09:08 Pavel910

If it's all uppercase by default and I want to make it lowercase I just need to apply text-transform: capitalize; in CSS. That will also work.

plsalvado avatar Aug 02 '22 20:08 plsalvado