Skip to content
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

Make sure that the assign text and buttons show in the right spot #40735

Merged
merged 3 commits into from
May 25, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class ScriptOverviewTopRow extends React.Component {
return (
<div style={styles.buttonRow} className="script-overview-top-row">
{!professionalLearningCourse && viewAs === ViewType.Student && (
<div>
<div style={styles.buttonsInRow}>
<Button
__useDeprecatedTag
href={`/s/${scriptName}/next`}
Expand Down Expand Up @@ -220,7 +220,13 @@ const styles = {
buttonRow: {
// ensure we have height when we only have our toggle (which is floated)
minHeight: 50,
position: 'relative'
position: 'relative',
display: 'flex',
flexDirection: 'column'
},
buttonsInRow: {
display: 'flex',
alignItems: 'center'
},
right: {
position: 'absolute',
Expand Down
8 changes: 6 additions & 2 deletions apps/src/templates/AssignButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,14 @@ class AssignButton extends React.Component {

const styles = {
buttonMargin: {
marginLeft: 10
marginLeft: 10,
display: 'flex',
alignItems: 'center'
},
buttonMarginRTL: {
marginRight: 10
marginRight: 10,
display: 'flex',
alignItems: 'center'
}
};

Expand Down
11 changes: 9 additions & 2 deletions apps/src/templates/Assigned.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,27 @@ export default class Assigned extends Component {
render() {
return (
<span style={styles.assigned} className={'uitest-assigned'}>
<FontAwesome icon="check" />
<span style={styles.checkmark}>
<FontAwesome icon="check" />
</span>
{i18n.assigned()}
</span>
);
}
}

const styles = {
checkmark: {
padding: 5
},
assigned: {
color: color.level_perfect,
fontSize: 16,
fontFamily: '"Gotham 5r", sans-serif',
lineHeight: '36px',
marginLeft: 10,
verticalAlign: 'top'
verticalAlign: 'top',
display: 'flex',
alignItems: 'center'
}
};
8 changes: 6 additions & 2 deletions apps/src/templates/UnassignButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ class UnassignButton extends React.Component {

const styles = {
buttonMargin: {
marginLeft: 10
marginLeft: 10,
display: 'flex',
alignItems: 'center'
},
buttonMarginRTL: {
marginRight: 10
marginRight: 10,
display: 'flex',
alignItems: 'center'
}
};

Expand Down
3 changes: 2 additions & 1 deletion apps/src/templates/courseOverview/CourseScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ const styles = {
marginRight: 0
},
flex: {
display: 'flex'
display: 'flex',
alignItems: 'center'
}
};
export const UnconnectedCourseScript = CourseScript;
Expand Down