RedHat-UX / red-hat-design-system

Red Hat's Design System
https://ux.redhat.com
MIT License
92 stars 18 forks source link

[docs] patterns html files should be self-sufficient #1779

Closed bennypowers closed 2 days ago

bennypowers commented 2 weeks ago

Description

the files in docs/patterns/*/patterns/*.html contain <uxdot-pattern> and <rh-code-block> elements, in order to improve readability, we should move those out into the docs pages themselves, such that the html files contain only the code necessary to implement the pattern, and no special docs helpers i think it's ok for those files to link to pattern-definition css files like logo-wall.css for example, but not for them to contain uxdot helpers

That way, if a user would copy-and-paste the contents of a pattern html file into a blank html document (with an appropriate import map already available), they would receive the desired outcome.

Certainly, there must not be any <rh-code-block> elements in the pattern files, (except of course, the files related to code block patterns)

The uxdot-pattern element, and the docs-browsing experience it provides is excellent and we should keep it, just that we should wrap the contents of those files in that element, and not the other way around

Screenshots

No response

Steps to reproduce

see https://github.com/RedHat-UX/red-hat-design-system/blob/98e54690d82c35039f7f2743444b7177b46bd748/docs/patterns/card/patterns/asset.html#L51

Expected behaviour

there shouldn't be uxdot helper elements in those files

Operating System (OS)

iOS, macOS, Linux, Windows

Browser

No response

Additional browser or assistive technology info

No response

markcaron commented 2 weeks ago

Good idea