webiny / webiny-js

Open-source serverless enterprise CMS. Includes a headless CMS, page builder, form builder, and file manager. Easy to customize and expand. Deploys to AWS.
https://www.webiny.com
Other
7.29k stars 601 forks source link

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

Open plsalvado opened 2 years ago

plsalvado commented 2 years ago

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"

Pavel910 commented 2 years ago

@plsalvado or should it be all uppercase? 🤔

plsalvado commented 2 years ago

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.