-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat(ui): Add dark app loading theme #81611
Conversation
gets the user's config from `window.__initialData` and attempts to style the initial ui by adding a class to the body
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
Bundle ReportChanges will increase total bundle size by 1.09kB (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
static/less/shared-components.less
Outdated
.theme-dark { | ||
.loading { | ||
.loading-indicator { | ||
// surface200 |
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.
thank you for leaving the comments, makes finding future references much easier!
This patch refactors a 10-year-old hack where we used a template tag to produce the initial data JSON, making the contents of that blob unavailable to any Django template. With this, all views extending from base gets a `react_config` context object so we can do things like sniffing user's language or theme preferences if available and modify the HTML output based on that. Related #81611
This patch refactors a 10-year-old hack where we used a template tag to produce the initial data JSON, making the contents of that blob unavailable to any Django template. With this, all views extending from base gets a `react_config` context object so we can do things like sniffing user's language or theme preferences if available and modify the HTML output based on that. Related #81611
# Conflicts: # static/app/components/loadingTriangle.tsx
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #81611 +/- ##
=======================================
Coverage 80.34% 80.34%
=======================================
Files 7272 7272
Lines 321262 321266 +4
Branches 20947 20947
=======================================
+ Hits 258123 258127 +4
Misses 62736 62736
Partials 403 403 |
@@ -18,3 +18,5 @@ | |||
</div> | |||
</div> | |||
{% endblock %} | |||
|
|||
{% block wrapperclass %}{{ user_theme }}{% endblock %} |
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.
🚀
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.
Uh-mazing! 🌟
This patch refactors a 10-year-old hack where we used a template tag to produce the initial data JSON, making the contents of that blob unavailable to any Django template. With this, all views extending from base gets a `react_config` context object so we can do things like sniffing user's language or theme preferences if available and modify the HTML output based on that. Related #81611
uses react_context to add
theme-user_option_theme
to the body's class to avoid screen flashing before the app loadsinverted the svg which is inside the img tag which makes it harder to style. made it slightly opaque since the black/white was a bit loud.
fixes #81555
related #81654