-
Notifications
You must be signed in to change notification settings - Fork 0
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
Modify preview-card styles #88
Modify preview-card styles #88
Conversation
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.
Looking good, just small things and a different prop interface. Do you also want to include the smaller bubble sizes in this? The figma designs were made smaller after I made this branch.
src/components/Exercise.stories.tsx
Outdated
@@ -103,7 +104,7 @@ const exerciseWithQuestionStatesProps = (): ExerciseWithQuestionStatesProps => { | |||
is_answer_order_important: false, | |||
answers: [{ | |||
id: '1', | |||
correctness: undefined, | |||
correctness: '1.0', |
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.
Does this break any of the other stories? Seems alright, I just can't remember why it was undefined originally
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.
This marks a question as correct, I can keep it as undefined and create a new variable just for new stories
src/components/Exercise/styles.ts
Outdated
|
||
.question-info { | ||
font-weight: bold; | ||
font-size: 1.6rem; |
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.
Does this match Figma? I think Figma might be slightly smaller. Also I'm not sure when that other PR will get merged, so maybe we do include the fix you made last week for the broken separator :D
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.
You're right, it should be 1.2rem
|
||
beforeEach(() => { | ||
exercise = { | ||
uid: '1@1', |
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 these are indented 4 but we use 2 in this repo (and most of the repos)
/** | ||
* An Exercise version with less interaction with card and grants an Overlay with Include/Remove component | ||
*/ | ||
export const ExercisePreview = ( |
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'd prefer this to take selected
and onSelectionChange
props, that keeps it flexible on the consuming side
@@ -160,7 +160,7 @@ export const mixins = { | |||
.answer-letter-wrapper::before { | |||
color: ${invertBubble ? '#fff' : color}; | |||
border-color: ${color}; | |||
${invertBubble ? `background-color: ${color};` : null} | |||
${invertBubble ? `background-color: ${color} !important;` : null} |
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.
Which style is this overriding?
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.
When a card is selected, all background should change color(including letter wrappers). But when a letter is marked as correct, I forced to overrides the "correct theme"
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.
Ah I see now, I didn't realize we set an explicit background on those
@jivey bubbles mean "answer-letters" ? |
@jomcarvajal Yeah I think the |
New ExercisePreview component added (show_all_feedback: false )
New style for selected cards