Skip to content

Commit

Permalink
Fix 4466/Finalizing with remaining icons (#5562)
Browse files Browse the repository at this point in the history
Yay!

Fixes #4466
  • Loading branch information
ujjwalpathaak authored Jan 8, 2024
1 parent 8efb78e commit 75684fe
Show file tree
Hide file tree
Showing 63 changed files with 404 additions and 157 deletions.
Binary file removed app/assets/fonts/icons.eot
Binary file not shown.
Binary file removed app/assets/fonts/icons.ttf
Binary file not shown.
Binary file removed app/assets/fonts/icons.woff
Binary file not shown.
4 changes: 4 additions & 0 deletions app/assets/images/arrow-down_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/assets/images/arrow-down_icons_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/assets/images/arrow-up-icon_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/arrow-up_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/arrow_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/arrow_icons_small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion app/assets/images/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/assets/images/circle_q_mark_icon_hover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/assets/images/circle_q_mark_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/left_arrow_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/plus_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/plus_icons_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/rt_arrow_icon_purple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/assets/images/rt_arrow_icon_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/rt_arrow_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/assets/images/sortable-indicator-asc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/sortable-indicator-desc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 22 additions & 1 deletion app/assets/images/trash-red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions app/assets/images/trash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/up_arrow_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/z-external-link_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/images/z-external-link_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const ArticleList = createReactClass({
} else {
header = (
<h3 className="article tooltip-trigger">{ArticleUtils.I18n('edited', project)}
<span className="tooltip-indicator" />
<span className="tooltip-indicator-heading" />
<div className="tooltip dark">
<p>{ArticleUtils.I18n('cross_wiki_tracking', project)}</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const Tooltip = ({ message }) => {

// Button to add new assignments
const EditButton = ({
allowMultipleArticles, current_user, is_open, open, role, student,
allowMultipleArticles, current_user, is_open, setHover, open, role, student,
tooltip, tooltipIndicator, assignmentLength, project
}) => {
let assignText;
Expand All @@ -183,7 +183,7 @@ const EditButton = ({
if (is_open) finalText = I18n.t('users.assign_articles_done');

return (
<div className="tooltip-trigger">
<div className="tooltip-trigger" onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)}>
<button
className={`button border small assign-button ${is_open ? 'dark' : ''}`}
onClick={open}
Expand Down Expand Up @@ -377,12 +377,13 @@ const AssignButton = ({ course, role, course_id, wikidataLabels = {}, hideAssign
);
}

const [hover, setHover] = useState();
let editButton;
if (!showButton && permitted) {
let tooltip;
let tooltipIndicator;
if (tooltip_message && !isOpen) {
tooltipIndicator = (<span className="tooltip-indicator" />);
tooltipIndicator = (<span className={`${hover ? 'tooltip-indicator-hover' : 'tooltip-indicator'}`}/>);
tooltip = (<Tooltip message={tooltip_message} />);
}

Expand All @@ -392,6 +393,7 @@ const AssignButton = ({ course, role, course_id, wikidataLabels = {}, hideAssign
current_user={current_user}
is_open={isOpen}
open={open}
setHover={setHover}
role={role}
student={student}
tooltip={tooltip}
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/components/common/list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ const List = createReactClass({
<p>{I18n.t(keyObj.info_key, options)}</p>
</div>
), (
<span key="ttindicator" className="tooltip-indicator" />
<span key="ttindicator" className="tooltip-indicator-list" />
)];
}
const order = (keyObj.order) ? keyObj.order : '';
headers.push((
<th onClick={headerOnClick} className={`${headerClass} ${order}`} key={key}>
<span dangerouslySetInnerHTML={{ __html: keyObj.label }} />
<span className={`sortable-indicator ${order}`} />
<span className={`sortable-indicator-${order} ${order}`} />
{tooltip}
</th>
));
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/common/notifications.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const Notifications = () => {
<div className="container">
{message}
{
notification.closable && <button onClick={() => _handleClose(notification)} className="icon-close-small" />
notification.closable && <button onClick={() => _handleClose(notification)} className="pull-right icon-close-small" />
}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/enroll/enroll_card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const EnrollCard = ({
return (
<div className="module enroll">
{
course.passcode !== '' && <a href={courseLink} className="icon-close-small" />
course.passcode !== '' && <a href={courseLink} className="icon-close-small pull-right" />
}
{messageBody}
{Features.wikiEd && modalShown
Expand Down
5 changes: 2 additions & 3 deletions app/assets/javascripts/components/explore/explore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,18 @@ const Explore = ({ dashboardTitle }) => {
<div className="campaigns-actions" >
{showCreateButton && <a className="button dark" href="campaigns/new?create=true">{I18n.t('campaign.create_campaign')}</a>}
<a href="/campaigns" className="button">
{I18n.t('campaign.all_campaigns')} <span className="icon icon-rt_arrow" />
{I18n.t('campaign.all_campaigns')} <span className="icon2 icon-rt_arrow_dark" />
</a>
</div>
</div>
{Features.wikiEd
&& (
<div id="active_courses">

<ActiveCourseList campaignOnly={true}/>
<div className="campaigns-actions">
{showCreateButton && <a className="button dark" href="/course_creator">{I18n.t(`${Features.course_string_prefix}.creator.create_new`)}</a>}
<a href={`/campaigns/${Features.default_campaign_slug}/programs`} className="button">
{I18n.t(`${Features.course_string_prefix}.all_courses`)} <span className="icon icon-rt_arrow" />
{I18n.t(`${Features.course_string_prefix}.all_courses`)} <span className="icon2 icon-rt_arrow_dark" />
</a>
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions app/assets/javascripts/components/onboarding/intro.jsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
import React from 'react';
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';

const Intro = ({ currentUser, returnToParam }) => {
const [isHovered, setIsHovered] = useState(false);

return (
<div className="intro text-center">
<h1>Hi {currentUser.real_name || currentUser.username}</h1>
<p>We’re excited that you’re here!</p>
<Link
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
to={{
pathname: '/onboarding/form',
search: `?return_to=${returnToParam}`
}}
className="button border inverse-border"
>
Start <i className="icon icon-rt_arrow" />
Start <i className={`icon3 ${isHovered ? 'icon-rt_arrow_purple' : ' icon-rt_arrow'}`} />
</Link>
</div>
);
Expand Down
12 changes: 7 additions & 5 deletions app/assets/javascripts/components/onboarding/permissions.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from 'react';
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';

// Permissions slide
const Permissions = ({ currentUser, returnToParam }) => {
const [isHovered, setIsHovered] = useState(false);

let slide;

if (currentUser.instructor) {
Expand All @@ -20,8 +22,8 @@ const Permissions = ({ currentUser, returnToParam }) => {
<li>you send public messages to students</li>
</ul>
<p>All course content you contribute to this website will be freely available under the <a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank">Creative Commons Attribution-ShareAlike license</a> (the same one used by Wikipedia).</p>
<Link to={{ pathname: '/onboarding/finish', search: `?return_to=${returnToParam}` }} className="button border inverse-border">
Finish <i className="icon icon-rt_arrow" />
<Link onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} to={{ pathname: '/onboarding/finish', search: `?return_to=${returnToParam}` }} className="button border inverse-border">
Finish <i className={`icon3 ${isHovered ? 'icon-rt_arrow_purple' : ' icon-rt_arrow'}`} />
</Link>
</div>
);
Expand All @@ -40,8 +42,8 @@ const Permissions = ({ currentUser, returnToParam }) => {
<li>update your course´s wiki page when you join the course or choose an assignment topic</li>
</ul>
<p>All course content you contribute to this website will be freely available under the <a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank">Creative Commons Attribution-ShareAlike license</a> (the same one used by Wikipedia).</p>
<Link to={{ pathname: '/onboarding/finish', search: `?return_to=${returnToParam}` }} className="button border inverse-border">
Finish <i className="icon icon-rt_arrow" />
<Link onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} to={{ pathname: '/onboarding/finish', search: `?return_to=${returnToParam}` }} className="button border inverse-border">
Finish <i className={`icon3 ${isHovered ? 'icon-rt_arrow_purple' : ' icon-rt_arrow'}`} />
</Link>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const OnboardingSupplementary = createReactClass({
<textarea className="form-control" type="text" name="otherReason" defaultValue={this.state.otherReason} onChange={this._handleFieldChange.bind(this, 'otherReason')} />
</div>
<button disabled={disabled} type="submit" className="button dark right">
{submitText} <i className="icon icon-rt_arrow" />
{submitText} <i className="icon3 icon-rt_arrow" />
</button>
</form>
</div>
Expand Down
Loading

0 comments on commit 75684fe

Please sign in to comment.