Skip to content

Commit 072a7cb

Browse files
committed
Fix the PG critic report in the editor for dark mode.
This is basically the same fix used for the hardcopy theme xml preview. This just adds the `text-dark` class to the container. Also switch the "Loading..." placeholder that shows while a problem is rendering to using the `bg-secondary-subtle` background instead of the `bg-secondary` background. The `bg-secondary-subtle` background is responsive to the color scheme, and so works for both light or dark mode.
1 parent 65def78 commit 072a7cb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

templates/ContentGenerator/Instructor/PGProblemEditor.html.ep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
<div class="pgedit-panel render mb-lg-0 order-first order-lg-last bg-white">
180180
<div class="p-0" id="pgedit-render-area">
181181
<div class="placeholder d-flex flex-column justify-content-center
182-
align-items-center bg-secondary h-100">
182+
align-items-center bg-secondary-subtle h-100">
183183
<div class="fs-1"><%= maketext('Loading...') %></div>
184184
<i class="fa-solid fa-spinner fa-spin fa-2x"></i>
185185
</div>

templates/ContentGenerator/Instructor/PGProblemEditor/pg_critic.html.ep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Perl::Critic::Violation::set_format('%m at line %l, column %c.');
22
%
3-
<div class="m-3 overflow-auto">
3+
<div class="m-3 overflow-auto text-dark">
44
<h2><%= maketext('PG Critic Violations') %></h2>
55
% my @pgCriticViolations = grep { $_->policy =~ /^Perl::Critic::Policy::PG::/ } @$violations;
66
% my @perlCriticViolations = grep { $_->policy !~ /^Perl::Critic::Policy::PG::/ } @$violations;

0 commit comments

Comments
 (0)