docs: rewrite Alert documentation according to new component doc schema#650
Open
docs: rewrite Alert documentation according to new component doc schema#650
Conversation
Agent-Logs-Url: https://github.com/public-ui/public-ui.github.io/sessions/8f0309c7-7134-4aee-8597-83db439868a2 Co-authored-by: laske185 <37439758+laske185@users.noreply.github.com>
Agent-Logs-Url: https://github.com/public-ui/public-ui.github.io/sessions/2c421a3d-cad8-4ac9-b55c-1d01386b1902 Co-authored-by: laske185 <37439758+laske185@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the Alert component documentation in both German and English, replacing older preview components with a new AlertPreview and reorganizing the content for better clarity and accessibility. The review feedback identifies an inconsistency where the descriptive text refers to _has-closer while the actual attribute name used in code snippets and component definitions is _hasCloser.
| Das `_alert`-Attribut funktioniert nur, wenn: | ||
| - Die **Alert**-Komponente initial neu gerendert wird, oder | ||
| - Sich der **Inhalt** des Alerts ändert | ||
| Mit dem Attribut `_has-closer` wird ein Schließen-Button eingeblendet. |
There was a problem hiding this comment.
| The `_alert` attribute only works if: | ||
| - The **Alert** component is initially re-rendered, or | ||
| - The **content** of the alert changes | ||
| The `_has-closer` attribute shows a close button. |
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request significantly restructures and expands the documentation for the Alert component in both German (
docs/30-components/alert.mdx) and English (i18n/en/docusaurus-plugin-content-docs/current/30-components/alert.mdx). The changes focus on improving clarity, providing comprehensive usage guidance, enhancing accessibility documentation, and modernizing examples with interactive previews. The documentation is now more user-friendly and better organized, with clear sections for best practices, accessibility, technical details, and code-based demonstrations.Key improvements include:
Documentation Structure and Content Overhaul
_type,_variant,_label,_level,_alert,_hasCloser) with dedicated subsections and interactive code previews, replacing static code samples and outdated example structures. [1] [2]Accessibility Guidance
_alertattribute for dynamic notifications. [1] [2]Best Practices and Use Cases
Modernized Examples
AlertPreviewcomponents, allowing for live previews of different alert configurations directly in the documentation. [1] [2]closeevent and references to relevant conceptual documentation. [1] [2]Links and References