-
Notifications
You must be signed in to change notification settings - Fork 198
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
Style the "Awaiting Grade" notice #7197
Conversation
This change is specifically to load the third-party theme's `learning-mode.css` file after the generic Sensei one. Now we won't have to make theme CSS selectors more specific than the default selectors in order to override them. Instead, we just need to match them, and the styles loaded last (i.e. the theme's styles) will win.
Codecov Report
@@ Coverage Diff @@
## trunk #7197 +/- ##
============================================
- Coverage 50.46% 50.46% -0.01%
- Complexity 10923 10931 +8
============================================
Files 605 605
Lines 46027 46062 +35
Branches 402 402
============================================
+ Hits 23228 23244 +16
- Misses 22472 22491 +19
Partials 327 327
Continue to review full report in Codecov by Sentry.
|
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.
Looks nice to me 👍 I've found a few small issues, not all of them are for addressing, as some looks like design inconsistencies to me-
- The text inside the notice is in two lines in the desktop version. I don't think it's important, but just mentioning as I've noticed this. Also looks like it's inconsistent among the variations
Current:
- The notice in the mobile view is full-width in the design, but currently it has lateral spacings
Current:
- The notice has a 4px border-radius in the design
Current:
- In the mobile view, the design has only 24px spacing below the restart button, in our case, the 24px gets added up with the button spacing and adds more space below the button text
Current:
Yup, this one felt like a design inconsistency. I opted not to use a line break because none of the mobile views have it, and it didn't feel like a good use of my time considering the very low impact.
Fixed in 56a373a. I think we should keep the button width consistent with what you've done in the footer, which is not full-width. WDYT?
Fixed here for just the Course theme - dbbdbdc
Fixed here - 6aa4ba7 |
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.
I think we should keep the button width consistent with what you've done in the footer, which is not full-width. WDYT?
Yap! it looks good to me too.
As we are rendering a button here and changing text based on different conditions, should we also add some tests to make sure they're rendering as expected and only when they should? But maybe we can also add the tests with the "Graded" notice when we'll have the full UI ready for all the states and conditions. I'm good with both.
I've also noticed that the "Pending teacher grade" button is being rendered in the graded quiz notice too while it should render only for quizzes awaiting grade. I'm good with that being handled in the "Graded" notice PR, but only a bit concerned as we're merging this PR to trunk and trunk can go to release, in which case it may result in a UI bug. It won't be an issue if we also merge the Graded notice PR before the next release.
I'm approving the PR as it looks great otherwise and in case we decide to take care of the concerns in another PR 👍 🚀
Yes, I noticed this as well. My plan is not to merge this PR until the graded quiz notice is ready too. I think I'll add tests with that PR as well. |
Also accept CSS classes as a parameter
I don't think we should be writing unit tests to test UI. We should use e2e tests for that. However, we currently don't have any e2e tests for quizzes 😅 , so I think that bit may need to be part of a larger initiative. I did write some unit tests in #7210 for a function that you originally wrote and I refactored. |
Also update the cursor style on hover.
Co-authored-by: Renatho De Carli Rosa <renatho@gmail.com>
Style the "Your Grade" notice
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.
Separately I think, given the notices look pretty bad in Production currently. 🙂 |
Resolves #7074.
Proposed Changes
learning-mode.css
file loads after the generic Sensei one. Now we won't have to make theme CSS selectors more specific than the default selectors in order to override them. Instead, we just need to match them, and the styles loaded last (i.e. the theme's styles) win.Testing Instructions
email_customization
feature flag and repeat step 11.Pre-Merge Checklist