-
Notifications
You must be signed in to change notification settings - Fork 35
Docs: Add frontend styling and theming best practices #2241
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
Conversation
|
Hello! 👋 This repository uses Auto for releasing packages using PR labels. ✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds best practices documentation for frontend development in Grafana plugins, specifically covering styling and theming guidelines.
Key changes:
- Adds a new "Frontend" section to the best practices documentation
- Documents three core frontend development practices: using Grafana UI components, Emotion for styling, and theme variables
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| ## Frontend | ||
|
|
||
| - **Use Grafana UI components** - Always use components from `@grafana/ui` when building your plugin's user interface. This ensures a consistent UI experience across Grafana and helps prevent UI breakages as Grafana evolves. These components are designed to work seamlessly with Grafana's theming system and follow the [Saga Design System](https://grafana.com/developers/saga/about/overview). For available components, refer to the [Grafana UI documentation](https://developers.grafana.com/ui/latest/index.html?path=/docs/docs-overview-intro--page). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should be mentioning Saga. @tolzhabayev @sympatheticmoose any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we should not, thanks for raising this @urbiz-grafana. See #2244
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one doubt!
What this PR does / why we need it:
Expands the Frontend section of the best practices documentation with guidance on UI styling and theming.
Which issue(s) this PR fixes:
Fixes #2240
Special notes for your reviewer: