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

docs: fix font docs #2849

Merged
merged 2 commits into from
Nov 8, 2023
Merged

docs: fix font docs #2849

merged 2 commits into from
Nov 8, 2023

Conversation

langz
Copy link
Contributor

@langz langz commented Nov 6, 2023

When running /quickguide-designer/fonts/#font-weights locally, I get the following errors:

Warning: validateDOMNesting(...): <p> cannot appear as a descendant of <p>.
    at p
    at ElementInstance

What's happening is that \n somehow gets inserted when a prettier formats a <p>, leading to the content being wrapped in a <p>, so that we get <p>'s inside of <p>'s.
Here's a link to a related issue: storybookjs/storybook#18921

If this would only lead to the console error pasted above, it all would be fine, but in some scenarios when wrapping a p in a p, the visual result is actually different(so what's displayed in the docs is actually not what we want), compare the fix vs. what's on main. Screenshot as reference:

Screenshot 2023-11-06 at 13 39 33

Copy link

vercel bot commented Nov 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2023 0:20am

Copy link

codesandbox-ci bot commented Nov 6, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit fbca6b4:

Sandbox Source
eufemia-starter Configuration

@langz langz requested a review from tujoworker November 6, 2023 12:43
Copy link
Contributor Author

@langz langz left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for purposing a better alternative @tujoworker 🥇

@langz langz merged commit 13beec9 into main Nov 8, 2023
7 checks passed
@langz langz deleted the docs/fix-font-docs branch November 8, 2023 13:53
tujoworker pushed a commit that referenced this pull request Nov 12, 2023
## [10.13.0](v10.12.0...v10.13.0) (2023-11-12)

### 🐛 Bug Fixes

* **Autocomplete:** ensure correct value selection during data change ([#2863](#2863)) ([d229ec2](d229ec2))
* **Autocomplete:** ensure on_change is firered during dataset update ([266ab6a](266ab6a))
* **PhoneNumber:** ensure correct selection of value ([#2852](#2852)) ([a20a764](a20a764))
* remove nullish operator to support Storybook v6 ([#2873](#2873)) ([f0bab63](f0bab63))
* typescript react type resolution in monorepos ([#2866](#2866)) ([44f04f3](44f04f3))

### ✨ Features

* **Accordion:** change sbanken expand icon to chevron ([#2854](#2854)) ([a7cb8b9](a7cb8b9))
* add "use client" to components that use client side only React APIs (support for RSC) ([#2874](#2874)) ([a84e962](a84e962))
* **Button:** change sbanken primary button text color to white ([#2855](#2855)) ([1571138](1571138))
* **Typography:** change sbanken bold to medium ([#2808](#2808)) ([4b0f930](4b0f930))

### 📝 Documentation

* **About:** add Snorre/Henrik/Ynge as contributors ([#2885](#2885)) ([fff72da](fff72da))
* **Autocomplete:** adds default value to keep_value props ([#2867](#2867)) ([7cae1fd](7cae1fd))
* fix font docs ([#2849](#2849)) ([13beec9](13beec9))
* **Ingress:** adds Ingress to docs ([#2879](#2879)) ([f771f3d](f771f3d))
* **Lead:** adds Lead to docs ([#2877](#2877)) ([0c0da7f](0c0da7f))
@tujoworker
Copy link
Member

🎉 This PR is included in version 10.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants